@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quantico:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;700&display=swap');

:root {
    --highlight-color: #00ffff;
    --title-font: 'Orbitron', sans-serif;
    /* --title-font: 'Exo 2', sans-serif; */
    /* --title-font: 'Audiowide', cursive; */
    /* --title-font: 'Quantico', sans-serif; */
    /* --title-font: 'Chakra Petch', sans-serif; */
    --button-glow: 0 0 10px var(--highlight-color), 0 0 20px var(--highlight-color);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
}

#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

#game-wrapper {
    position: relative;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

h1 {
    font-family: var(--title-font);
    font-size: 3em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px var(--highlight-color),
        0 0 20px var(--highlight-color),
        0 0 30px var(--highlight-color),
        0 0 40px var(--highlight-color);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px var(--highlight-color),
            0 0 20px var(--highlight-color),
            0 0 30px var(--highlight-color),
            0 0 40px var(--highlight-color);
    }
    to {
        text-shadow: 
            0 0 20px var(--highlight-color),
            0 0 30px var(--highlight-color),
            0 0 40px var(--highlight-color),
            0 0 50px var(--highlight-color),
            0 0 60px var(--highlight-color);
    }
}

#game-mode-selector {
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
}

.mode-btn {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--highlight-color);
    border: 2px solid var(--highlight-color);
    padding: 10px 20px;
    margin: 0 10px;
    font-family: var(--title-font);
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-glow);
    border-radius: 5px;
    outline: none;
}

.mode-btn:hover {
    background-color: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.mode-btn.active {
    background-color: var(--highlight-color);
    color: #000;
    box-shadow: 0 0 15px var(--highlight-color), 0 0 30px var(--highlight-color);
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

#scoreboard {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 5px 0;
    font-size: 20px;
    font-weight: bold;
}

#player1-score {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

#player2-score {
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
}

#gameCanvas {
    border: 2px solid var(--highlight-color);
    box-shadow: 0 0 20px var(--highlight-color);
    max-width: 100%;
    height: auto;
    margin-top: -5px;
}

#instructions {
    margin-top: 10px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--highlight-color);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    transition: height 0.3s ease-in-out;
}

#instructions h2 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--highlight-color);
    font-size: 1.2em;
}

#instructions p {
    margin: 3px 0;
    font-size: 0.9em;
}

#instructions .cyan {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

#instructions .magenta {
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
}

@media (max-height: 800px) {
    h1 {
        font-size: 2em;
    }
    
    #scoreboard {
        font-size: 16px;
    }
    
    #gameCanvas {
        height: 65vh;
    }
    
    #instructions {
        font-size: 12px;
    }
}

@media (max-width: 1220px) {
    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

@keyframes dash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.dash-effect {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    width: 2px;
    height: 2px;
    border-radius: 50%;
    animation: dash 0.2s linear;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    pointer-events: none;
    animation: fadeOut 0.5s linear forwards;
}