/* ========================================
   WATER GAME Styles
   ======================================== */

.game-section {
    background: linear-gradient(180deg, var(--off-white) 0%, var(--water-light) 100%);
}

/* Game Tabs */
.game-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.game-tab {
    padding: 12px 28px;
    border: 2px solid var(--primary-light);
    border-radius: 50px;
    background: var(--white);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.game-tab:hover {
    background: var(--water-light);
}

.game-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(26, 115, 167, 0.3);
}

/* Delivery game container */
.delivery-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.delivery-placeholder {
    background: linear-gradient(135deg, #1a3a5c, #1a73a7);
    color: white;
    text-align: center;
    padding: 60px 32px;
    border-radius: var(--radius-lg);
}

.delivery-placeholder h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.delivery-placeholder p {
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .game-tabs {
        flex-direction: column;
        align-items: center;
    }
    .game-tab {
        width: 80%;
        text-align: center;
    }
}

.game-wrapper {
    display: flex;
    justify-content: center;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(180deg, #87CEEB 0%, #1a73a7 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 3/2;
    min-height: 350px;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 79, 115, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.game-start-screen {
    text-align: center;
    color: var(--white);
    padding: 40px;
}

.game-drop-icon {
    font-size: 4rem;
    animation: dropBounce 1.2s ease-in-out infinite;
    margin-bottom: 16px;
}

.game-start-screen h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 12px;
}

.game-start-screen p {
    opacity: 0.85;
    margin-bottom: 32px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.game-btn {
    min-width: 200px;
    justify-content: center;
    font-size: 1.1rem;
}

/* Game HUD */
.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.3), transparent);
    z-index: 5;
    pointer-events: none;
}

.hud-score, .hud-level {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.hud-lives {
    font-size: 1.2rem;
    letter-spacing: 4px;
}

/* Game Over Screen */
.game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(13, 79, 115, 0.9);
    backdrop-filter: blur(8px);
    color: var(--white);
    z-index: 10;
    text-align: center;
    padding: 40px;
}

.game-over-screen h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 16px;
}

.game-over-screen p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.game-fact {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin-bottom: 24px;
    max-width: 400px;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-fact::before {
    content: '💧 ';
}

/* Touch friendly on mobile */
@media (max-width: 768px) {
    .game-container {
        border-radius: var(--radius-md);
        aspect-ratio: auto;
        min-height: 400px;
        height: 60vh;
    }

    .game-wrapper {
        padding: 0 8px;
    }

    .game-start-screen h3 {
        font-size: 1.5rem;
    }

    .game-start-screen p {
        font-size: 0.9rem;
    }

    .hud-score, .hud-level {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .hud-lives {
        font-size: 1rem;
    }
}

/* Game Instructions */
.game-instructions {
    margin-top: 48px;
    text-align: center;
}

.game-instructions h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.instr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.instr-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.instr-card h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.instr-card ul {
    list-style: none;
    padding: 0;
}

.instr-card li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.instr-card li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--primary);
    font-weight: bold;
}

@media (max-width: 600px) {
    .instr-grid {
        grid-template-columns: 1fr;
    }
}
