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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    transition: all 0.3s ease;
}

.game-container:fullscreen {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0;
    padding: 20px;
    max-width: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.game-container:-webkit-full-screen {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0;
    padding: 20px;
    max-width: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.game-container:-ms-fullscreen {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0;
    padding: 20px;
    max-width: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.game-area {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

#gameCanvas {
    border: 3px solid #667eea;
    border-radius: 10px;
    background: #f8f9fa;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.game-container:fullscreen #gameCanvas,
.game-container:-webkit-full-screen #gameCanvas,
.game-container:-ms-fullscreen #gameCanvas {
    border-width: 4px;
}

/* Compact header and controls in fullscreen */
.game-container:fullscreen header,
.game-container:-webkit-full-screen header,
.game-container:-ms-fullscreen header {
    margin-bottom: 15px;
}

.game-container:fullscreen h1,
.game-container:-webkit-full-screen h1,
.game-container:-ms-fullscreen h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.game-container:fullscreen .score-board,
.game-container:-webkit-full-screen .score-board,
.game-container:-ms-fullscreen .score-board {
    padding: 10px;
    font-size: 1rem;
}

.game-container:fullscreen .controls,
.game-container:-webkit-full-screen .controls,
.game-container:-ms-fullscreen .controls {
    margin-top: 15px;
}

.game-container:fullscreen .control-info,
.game-container:-webkit-full-screen .control-info,
.game-container:-ms-fullscreen .control-info {
    margin-bottom: 10px;
    padding: 10px;
    font-size: 0.8rem;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #f093fb;
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.controls {
    text-align: center;
}

.control-info {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
    font-size: 0.9rem;
}

.control-info p {
    margin: 5px 0;
}

.game-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:not(.btn-secondary) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:not(.btn-secondary):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
}

.btn:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 600px) {
    .game-container {
        margin: 20px;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}

/* Animation for score updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.score-update {
    animation: scoreUpdate 0.3s ease;
}
