/* Sea Mammal Mayhem Styles */

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 600px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

/* Game HUD */
.game-hud {
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hud-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hud-item.immunity {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hud-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.hud-item.immunity .hud-label {
    color: #000;
}

.hud-value {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 700;
}

.hud-item.immunity .hud-value {
    color: #000;
}

/* Pause Button */
.pause-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.pause-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.pause-btn.paused {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Game Canvas */
#gameCanvas {
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background: linear-gradient(180deg, #4A90E2 0%, #1E3A5F 100%);
    border-radius: 12px;
    border: 2px solid var(--border);
    display: block;
    cursor: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Game Over Screen */
.game-over-screen,
.shop-screen,
.pause-screen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.game-over-screen.active,
.shop-screen.active,
.pause-screen.active {
    display: block;
}

.game-over-screen h2,
.shop-screen h2,
.pause-screen h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.pause-screen p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.final-score,
.final-level,
.currency {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.final-score span,
.final-level span,
.currency span {
    color: var(--accent);
    font-weight: 700;
}

.game-over-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-buy {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

/* Shop */
.shop-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.shop-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
}

.shop-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.shop-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn-buy {
    width: 100%;
    background: var(--accent);
    color: white;
}

.btn-buy:hover {
    background: var(--accent-hover);
}

.btn-buy:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Instructions */
.instructions {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    width: 90%;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.instructions.hidden {
    display: none;
}

.instructions h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.instructions li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.instructions li::before {
    content: "🐟";
    position: absolute;
    left: 0;
}

.instructions strong {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-hud {
        gap: 1rem;
    }

    #gameCanvas {
        height: 400px;
    }

    .game-over-screen,
    .shop-screen {
        padding: 2rem 1.5rem;
    }

    .game-over-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    /* Allow scrolling on mobile */
    .instructions {
        position: static;
        transform: none;
        margin-top: 2rem;
        max-width: 100%;
    }

    .game-container {
        min-height: auto;
        overflow-y: visible;
    }
}

@media (max-width: 480px) {
    #gameCanvas {
        height: 300px;
    }

    .instructions {
        padding: 1.5rem;
    }
}
