* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Orbitron', monospace;
    overflow: hidden;
    position: relative;
}

.game-container {
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

@keyframes containerPulse {
    0% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 0 rgba(78, 205, 196, 0.2); }
    100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 15px rgba(78, 205, 196, 0.1); }
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.game-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 10;
}

.game-btn {
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.2), rgba(78, 205, 196, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-btn:hover {
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.2));
    border-color: rgba(78, 205, 196, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

h1 {
    color: #4ecdc4;
    font-size: 2.5em;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(78, 205, 196, 0.5),
        0 0 20px rgba(78, 205, 196, 0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
    margin: 0;
    flex-shrink: 0;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(78, 205, 196, 0.5), 0 0 20px rgba(78, 205, 196, 0.3); }
    100% { text-shadow: 0 0 20px rgba(78, 205, 196, 0.8), 0 0 30px rgba(78, 205, 196, 0.5); }
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.score-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: white;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 110px; /* Increased height to prevent clipping */
}

/* Removed hover effect from score cards since they're not clickable */

.score-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-bottom: 50px; /* Increased space for powerup status */
}

.score-value {
    display: block;
    font-size: 1.3em;
    color: #4ecdc4;
    margin-top: 3px;
}

.powerup-status {
    position: absolute;
    bottom: 5px;
    left: 8px;
    right: 8px;
    font-size: 0.7em;
    height: 45px; /* Slightly increased height for better spacing */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.powerup-active {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 4px;
    padding: 4px 6px;
    color: #4ecdc4;
    font-weight: bold;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
    transition: all 0.3s ease;
    animation: powerupAppear 0.5s ease forwards;
}

.powerup-active.expiring {
    animation: powerupExpiring 0.5s ease-in-out infinite alternate;
}

@keyframes powerupExpiring {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0.6;
        transform: translateY(0) scale(0.95);
    }
}

.powerup-active.removing {
    animation: powerupDisappear 0.3s ease forwards;
}

@keyframes powerupAppear {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-2px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes powerupDisappear {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
}

.powerup-frozen {
    background: rgba(0, 204, 255, 0.2);
    border: 1px solid rgba(0, 204, 255, 0.4);
    border-radius: 4px;
    padding: 4px 6px;
    color: #00ccff;
    font-weight: bold;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
    transition: all 0.3s ease;
    animation: powerupAppear 0.5s ease forwards;
}

.powerup-frozen.removing {
    animation: powerupDisappear 0.3s ease forwards;
}

.score-item.powerup-collected {
    animation: powerupFlash 1.2s ease-in-out;
}

.score-item.powerup-frozen {
    animation: powerupFrozenFlash 1.8s ease-in-out;
}

@keyframes powerupFlash {
    0% {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(78, 205, 196, 0.3);
        box-shadow: none;
    }
    30% {
        background: rgba(78, 205, 196, 0.15);
        border-color: rgba(78, 205, 196, 0.6);
        box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
    }
    60% {
        background: rgba(78, 205, 196, 0.25);
        border-color: rgba(78, 205, 196, 0.8);
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
    }
    100% {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(78, 205, 196, 0.3);
        box-shadow: none;
    }
}

@keyframes powerupFrozenFlash {
    0% {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(78, 205, 196, 0.3);
        box-shadow: none;
    }
    15% {
        background: rgba(0, 204, 255, 0.15);
        border-color: rgba(0, 204, 255, 0.6);
        box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
    }
    30% {
        background: rgba(0, 204, 255, 0.3);
        border-color: rgba(0, 204, 255, 0.8);
        box-shadow: 0 0 25px rgba(0, 204, 255, 0.6);
    }
    45% {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(78, 205, 196, 0.3);
        box-shadow: none;
    }
    60% {
        background: rgba(0, 204, 255, 0.15);
        border-color: rgba(0, 204, 255, 0.6);
        box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
    }
    75% {
        background: rgba(0, 204, 255, 0.3);
        border-color: rgba(0, 204, 255, 0.8);
        box-shadow: 0 0 25px rgba(0, 204, 255, 0.6);
    }
    100% {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(78, 205, 196, 0.3);
        box-shadow: none;
    }
}

.game-board {
    border: 3px solid rgba(78, 205, 196, 0.6);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.8);
    margin: 0 auto;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(78, 205, 196, 0.2);
    transition: all 0.3s ease;
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
}

.game-board:hover {
    border-color: rgba(78, 205, 196, 0.8);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(78, 205, 196, 0.3),
        0 0 50px rgba(78, 205, 196, 0.3);
}

.controls {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.control-item:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-2px);
}

.start-message {
    color: #4ecdc4;
    font-size: 1.2em;
    margin-top: 15px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.game-over.show {
    opacity: 1;
    visibility: visible;
}

.game-over-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: white;
    animation: gameOverSlide 0.5s ease-out;
}

@keyframes gameOverSlide {
    0% { transform: translateY(-50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.game-over h2 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.game-over p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Removed restart-btn styles - now using menu-btn */

/* Menu Styles */
.menu-screen {
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-content {
    width: 100%;
    max-width: 600px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.menu-btn {
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.2), rgba(78, 205, 196, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.4);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.menu-btn:hover {
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.2));
    border-color: rgba(78, 205, 196, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.menu-btn.secondary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-btn.secondary:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.4);
}

/* Removed btn-icon styling - no longer using emojis */

/* Player Setup Styles */
.player-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

/* Removed label styling - no longer needed */

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(78, 205, 196, 0.3);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1.1em;
    font-family: 'Orbitron', monospace;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.8);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Settings Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: #4ecdc4;
    font-weight: 700;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-item select {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(78, 205, 196, 0.3);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item select:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.8);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
}

.setting-item select option {
    background: #1a1a2e;
    color: white;
}

/* Updated Game Over Styles */
.final-scores {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.final-score-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Removed total score styling - no longer needed */

.final-score-value {
    font-size: 1.3em;
    color: #4ecdc4;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Help Screen Styles */
.help-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.help-content::-webkit-scrollbar {
    width: 8px;
}

.help-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.4);
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.6);
}

.help-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.help-section h3 {
    color: #4ecdc4;
    font-size: 1.3em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.help-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-row:last-child {
    border-bottom: none;
}

.help-key {
    color: #4ecdc4;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.help-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    text-align: right;
    flex-grow: 1;
    margin-left: 20px;
}

.help-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    padding: 5px 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .game-buttons {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
    }

    .game-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
    }
    
    .score-board {
        gap: 15px;
    }
    
    .score-item {
        font-size: 0.9em;
        padding: 8px 16px;
        min-width: 80px;
    }
    
    .score-value {
        font-size: 1.2em;
    }
    
    h1 {
        font-size: 2em;
    }

    .menu-btn {
        font-size: 1em;
        padding: 12px 20px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .player-inputs {
        gap: 15px;
    }

    .input-group input {
        font-size: 1em;
        padding: 12px 15px;
    }

    .final-score-item {
        font-size: 1em;
        padding: 12px 20px;
    }

    .help-content {
        gap: 20px;
    }

    .help-section {
        padding: 15px;
    }

    .help-section h3 {
        font-size: 1.1em;
    }

    .help-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .help-value {
        text-align: left;
        margin-left: 0;
    }

    .help-key {
        font-size: 0.8em;
    }

    .help-value {
        font-size: 0.8em;
    }

    .help-item {
        font-size: 0.8em;
    }
} 