/* Game-specific styles */

.game-body {
    background: linear-gradient(180deg, #87CEEB 0%, #98D8E8 50%, var(--color-bone) 100%);
    min-height: 100vh;
}

.game-main {
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header h1 {
    color: var(--color-navy);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1rem;
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-slate);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    display: block;
    font-size: 2rem;
    color: var(--color-navy);
    font-weight: 800;
    line-height: 1;
}

.game-wrapper {
    position: relative;
    margin: 0 auto 2rem;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--color-white);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8E8 50%, #DEB887 100%);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(13, 27, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.overlay-content {
    text-align: center;
    color: var(--color-white);
    padding: 2rem;
    max-width: 300px;
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-white);
}

.overlay-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--color-gray);
    line-height: 1.5;
}

.game-instructions {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 0 auto;
}

.game-instructions h3 {
    color: var(--color-navy);
    margin-bottom: 1rem;
    text-align: center;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    background-color: var(--color-bone);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--color-blue);
}

.game-instructions li:last-child {
    margin-bottom: 0;
}

.game-instructions strong {
    color: var(--color-navy);
}

/* Game UI Elements */
.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.game-score {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    color: var(--color-navy);
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Mobile-specific game styles */
@media (max-width: 768px) {
    .game-container {
        padding: 0 0.5rem;
    }
    
    .game-header h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .score-container {
        gap: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
    
    .game-wrapper {
        max-width: 100%;
        margin-bottom: 1.5rem;
        border-radius: var(--border-radius);
    }
    
    .game-instructions {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .overlay-content {
        padding: 1.5rem;
        max-width: 280px;
    }
    
    .overlay-content h2 {
        font-size: 1.5rem;
    }
    
    .overlay-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .game-main {
        padding: 1rem 0;
    }
    
    .game-container {
        padding: 0 0.75rem;
    }
    
    .game-header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .score-container {
        gap: 1.5rem;
        flex-direction: row;
        justify-content: center;
    }
    
    .score-value {
        font-size: 1.25rem;
    }
    
    .score-label {
        font-size: 0.75rem;
    }
    
    .game-wrapper {
        margin-bottom: 1rem;
    }
    
    #gameCanvas {
        border-radius: var(--border-radius);
    }
    
    .game-instructions {
        padding: 1rem;
        margin: 0 0.25rem;
    }
    
    .game-instructions li {
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .game-instructions h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .overlay-content {
        padding: 1.25rem;
        max-width: 260px;
    }
    
    .overlay-content h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .overlay-content p {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Game animation classes */
.game-start-animation {
    animation: gameStart 0.5s ease-out;
}

.game-over-animation {
    animation: gameOver 0.3s ease-in;
}

@keyframes gameStart {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gameOver {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Score popup animation */
.score-popup {
    position: absolute;
    color: var(--color-white);
    font-weight: 700;
    font-size: 2rem;
    pointer-events: none;
    animation: scorePopup 1s ease-out forwards;
}

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