/* ═══════════════════════════════════════════════════════════
   AQUA CHOMP — Web3.0 × Pixel Art Fusion Theme
   ═══════════════════════════════════════════════════════════ */

:root {
    --water-deep: #0A0E1A;
    --water-mid: #0F1B2E;
    --panel-bg: rgba(15, 25, 45, 0.6);
    --panel-dark: rgba(8, 14, 30, 0.8);
    --panel-border: rgba(56, 189, 248, 0.15);
    --panel-glow: rgba(56, 189, 248, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #8BA4B4;

    --neon-cyan: #38BDF8;
    --neon-blue: #6366F1;
    --neon-purple: #A855F7;
    --neon-pink: #EC4899;
    --neon-green: #34D399;
    --neon-orange: #FB923C;
    --neon-yellow: #FACC15;

    --green: #34D399;
    --green-dark: #059669;
    --cyan: #38BDF8;
    --cyan-dark: #0284C7;
    --yellow: #FACC15;
    --orange: #FB923C;
    --purple: #A855F7;
    --danger: #EF4444;
    --legendary: #FFB830;
    --epic: #A855F7;
    --rare: #6366F1;
    --uncommon: #34D399;
    --common: #94A3B8;
}

/* ─── Base ─── */
body {
    background: var(--water-deep);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

.pixel-text {
    font-family: 'Press Start 2P', monospace;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* ─── Glass Panels ─── */
.glass-panel {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.7), rgba(10, 15, 35, 0.5));
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.08), inset 0 0 30px rgba(56, 189, 248, 0.02);
}

/* Legacy pixel-panel support */
.pixel-panel {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.7), rgba(10, 15, 35, 0.5));
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.pixel-panel:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.08);
}

/* ─── Glow Buttons ─── */
.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    border: 2px solid;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.pixel-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.pixel-btn:hover::before { opacity: 1; }
.pixel-btn:hover { transform: translateY(-2px); }
.pixel-btn:active { transform: translateY(1px); }

.pixel-btn-green {
    background: linear-gradient(135deg, #34D399, #059669);
    border-color: rgba(52, 211, 153, 0.4);
    color: white;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}
.pixel-btn-green:hover { box-shadow: 0 0 30px rgba(52, 211, 153, 0.4); }

.pixel-btn-cyan {
    background: linear-gradient(135deg, #38BDF8, #0284C7);
    border-color: rgba(56, 189, 248, 0.4);
    color: white;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}
.pixel-btn-cyan:hover { box-shadow: 0 0 30px rgba(56, 189, 248, 0.4); }

.pixel-btn-purple {
    background: linear-gradient(135deg, #A855F7, #7C3AED);
    border-color: rgba(168, 85, 247, 0.4);
    color: white;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.pixel-btn-yellow { background: linear-gradient(135deg, #FACC15, #EAB308); border-color: rgba(250, 204, 21, 0.4); color: #0A0E1A; }
.pixel-btn-orange { background: linear-gradient(135deg, #FB923C, #EA580C); border-color: rgba(251, 146, 60, 0.4); color: white; }
.pixel-btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); border-color: rgba(239, 68, 68, 0.4); color: white; }

/* Outline style */
.btn-outline {
    background: transparent;
    border: 2px solid rgba(56, 189, 248, 0.3);
    color: var(--neon-cyan);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}
.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

/* ─── Rarity Colors ─── */
.rarity-common { color: var(--common); }
.rarity-uncommon { color: var(--uncommon); }
.rarity-rare { color: var(--rare); }
.rarity-epic { color: var(--epic); }
.rarity-legendary { color: var(--legendary); }

.rarity-badge {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rarity-badge-common { background: rgba(148, 163, 184, 0.2); color: var(--common); border: 1px solid rgba(148, 163, 184, 0.3); }
.rarity-badge-uncommon { background: rgba(52, 211, 153, 0.15); color: var(--uncommon); border: 1px solid rgba(52, 211, 153, 0.3); }
.rarity-badge-rare { background: rgba(99, 102, 241, 0.15); color: var(--rare); border: 1px solid rgba(99, 102, 241, 0.3); }
.rarity-badge-epic { background: rgba(168, 85, 247, 0.15); color: var(--epic); border: 1px solid rgba(168, 85, 247, 0.3); }
.rarity-badge-legendary { background: rgba(255, 184, 48, 0.15); color: var(--legendary); border: 1px solid rgba(255, 184, 48, 0.3); }

/* ─── Hero Section ─── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0A0E1A 0%, #0F1B2E 50%, #0A1525 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Floating pixel fish in hero */
.hero-fish {
    position: absolute;
    left: 0;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 1;
}

/* Even fish: swim right to left (face left = scaleX(-1)) */
.hero-fish:nth-child(even) {
    animation: swim-rtl linear infinite;
}

/* Odd fish: swim left to right (face right = default) */
.hero-fish:nth-child(odd) {
    animation: swim-ltr linear infinite;
}

@keyframes swim-ltr {
    0% { transform: translateX(-150px) translateY(0) scaleX(1); }
    25% { transform: translateX(25vw) translateY(-12px) scaleX(1); }
    50% { transform: translateX(50vw) translateY(8px) scaleX(1); }
    75% { transform: translateX(75vw) translateY(-8px) scaleX(1); }
    100% { transform: translateX(calc(100vw + 150px)) translateY(0) scaleX(1); }
}

@keyframes swim-rtl {
    0% { transform: translateX(calc(100vw + 150px)) translateY(0) scaleX(-1); }
    25% { transform: translateX(75vw) translateY(-10px) scaleX(-1); }
    50% { transform: translateX(50vw) translateY(6px) scaleX(-1); }
    75% { transform: translateX(25vw) translateY(-12px) scaleX(-1); }
    100% { transform: translateX(-150px) translateY(0) scaleX(-1); }
}

/* Glowing orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: pulse-orb 6s ease-in-out infinite alternate;
}

@keyframes pulse-orb {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.2); }
}

/* ─── Title Effects ─── */
.title-glow {
    text-shadow:
        0 0 10px rgba(56, 189, 248, 0.5),
        0 0 30px rgba(56, 189, 248, 0.3),
        0 0 60px rgba(99, 102, 241, 0.2);
}

.subtitle-gradient {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Stat Cards ─── */
.stat-card {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.6), rgba(10, 15, 35, 0.4));
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 40px rgba(0,0,0,0.3); }

/* ─── Fish Carousel / Grid ─── */
.fish-showcase {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.fish-showcase::-webkit-scrollbar { display: none; }

.fish-card {
    flex: 0 0 auto;
    width: 140px;
    background: linear-gradient(180deg, rgba(15, 25, 50, 0.8), rgba(10, 15, 35, 0.6));
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fish-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, rgba(56, 189, 248, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.fish-card:hover { transform: translateY(-8px) scale(1.02); }
.fish-card:hover::after { opacity: 1; }

.fish-card.rarity-legendary-card { border-color: rgba(255, 184, 48, 0.3); }
.fish-card.rarity-epic-card { border-color: rgba(168, 85, 247, 0.3); }
.fish-card.rarity-rare-card { border-color: rgba(99, 102, 241, 0.3); }

.fish-card.rarity-legendary-card:hover { box-shadow: 0 0 40px rgba(255, 184, 48, 0.15); }
.fish-card.rarity-epic-card:hover { box-shadow: 0 0 40px rgba(168, 85, 247, 0.15); }
.fish-card.rarity-rare-card:hover { box-shadow: 0 0 40px rgba(99, 102, 241, 0.15); }

/* ─── Feature Cards ─── */
.feature-card {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.5), rgba(10, 15, 35, 0.3));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 60%);
    transition: opacity 0.4s;
    opacity: 0;
}

.feature-card:hover::before { opacity: 1; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(56, 189, 248, 0.2); }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ─── Player Cards ─── */
.player-card {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.7), rgba(10, 15, 35, 0.5));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.player-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.player-rank-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ─── Aquarium Preview ─── */
.aquarium-container {
    background: linear-gradient(180deg, #060D1A 0%, #0C1829 20%, #122440 50%, #1A3A4A 80%, #2A4A3A 95%, #1E3828 100%);
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.1);
}

.aquarium-fish {
    position: absolute;
    animation: bob 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.2s;
}

.aquarium-fish:hover { transform: scale(1.3); z-index: 10; }

.aquarium-sand {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, #2A4A3A, #1E3828);
    border-radius: 0 0 16px 16px;
}

.aquarium-bubble {
    position: absolute;
    bottom: 40px;
    width: 6px;
    height: 6px;
    background: rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    animation: bubble 4s ease-in infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bubble {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    100% { transform: translateY(-250px) scale(0.3); opacity: 0; }
}

/* ─── Marquee / Scroll ─── */
.fish-marquee {
    display: flex;
    animation: marquee 40s linear infinite;
    gap: 2rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Navigation ─── */
.nav-glass {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active { color: white; }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 2px;
}

/* ─── Section Dividers ─── */
.section-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.2), transparent);
    margin: 4rem 0;
}

/* ─── Tabs ─── */
.tab-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    padding: 0.6rem 1.2rem;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
}
.tab-btn:hover { color: var(--neon-cyan); background: rgba(56, 189, 248, 0.05); }
.tab-btn.active { color: var(--neon-cyan); border-bottom-color: var(--neon-cyan); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, 0.4); }

/* ─── Animations ─── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fade-up 0.6s ease-out forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .pixel-btn { font-size: 0.55rem; padding: 0.75rem 1.25rem; }
    .btn-outline { font-size: 0.55rem; padding: 0.75rem 1.25rem; }
    .glass-panel, .pixel-panel { padding: 1rem; }
    .hero-section { min-height: 90vh; padding-top: 2rem; }

    /* Shrink hero fish on mobile so they don't overwhelm */
    .hero-fish { max-width: 30px !important; opacity: 0.3 !important; }

    /* Tighter nav */
    .nav-glass .pixel-text { font-size: 0.6rem; }

    /* Feature cards stack nicely */
    .feature-card { padding: 1.25rem; }
    .feature-icon { width: 44px; height: 44px; font-size: 1.2rem; }

    /* Fish cards smaller */
    .fish-card { width: 110px; padding: 1rem 0.75rem; }

    /* Player podium equal height on mobile */
    .player-card { margin-bottom: 0 !important; }
}
