/* ============================================================================
   ⚡ COLISTICE-MANAGER — LINEAR / VERCEL / APPLE / STRIPE OBSIDIAN DESIGN SYSTEM
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600;700&family=Outfit:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-obsidian: #05070f;
    --bg-surface-1: rgba(13, 18, 32, 0.76);
    --bg-surface-2: rgba(19, 27, 46, 0.68);
    --bg-surface-elevated: rgba(24, 34, 58, 0.85);
    --border-hairline: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(56, 189, 248, 0.45);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #38bdf8;
    --accent-indigo: #6366f1;
    --accent-violet: #a855f7;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-obsidian);
    color-scheme: dark;
}

body {
    font-family: var(--font-sans) !important;
    background-color: var(--bg-obsidian) !important;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.12) 0%, transparent 38%),
        radial-gradient(circle at 50% 85%, rgba(168, 85, 247, 0.1) 0%, transparent 48%),
        linear-gradient(180deg, #05070f 0%, #080c18 50%, #05070f 100%) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .title, .logo {
    font-family: var(--font-display) !important;
    letter-spacing: -0.025em;
}

.stat-value, .stat-number, .pokemon-card-number, .coin-box, [data-tabular] {
    font-variant-numeric: tabular-nums;
}

/* ============================================================================
   1. GLOBAL BACKGROUND: AURORA MESH, PARTICLE CANVAS & CURSOR SPOTLIGHT
   ============================================================================ */

#colistice-aurora-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(95px);
    opacity: 0.38;
    will-change: transform;
    animation: auroraFloat 22s var(--ease-spring) infinite alternate;
}

.aurora-orb.orb-1 {
    width: 560px;
    height: 560px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55), rgba(56, 189, 248, 0.1) 70%);
}

.aurora-orb.orb-2 {
    width: 520px;
    height: 520px;
    top: 12%;
    right: -140px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45), rgba(168, 85, 247, 0.12) 70%);
    animation-duration: 28s;
    animation-delay: -6s;
}

.aurora-orb.orb-3 {
    width: 620px;
    height: 620px;
    bottom: -200px;
    left: 28%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.36), rgba(16, 185, 129, 0.08) 70%);
    animation-duration: 32s;
    animation-delay: -12s;
}

@keyframes auroraFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(45px, -35px, 0) scale(1.08); }
    100% { transform: translate3d(-35px, 40px, 0) scale(0.95); }
}

#colistice-particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
}

#colistice-cursor-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 680px;
    height: 680px;
    margin-left: -340px;
    margin-top: -340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.09) 0%, rgba(99, 102, 241, 0.04) 38%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    mix-blend-mode: screen;
}

/* Subtle architectural grid overlay */
#colistice-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-size: 48px 48px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
}

/* Ensure all page content sits cleanly above ambient canvas */
.navbar, section, main, .footer, .lab-shell, .trainer-hub-wrapper, .anime-hub-wrapper {
    position: relative;
    z-index: 2;
}

/* ============================================================================
   2. NAVIGATION BAR — LIQUID SPRING INDICATOR & GLASSMORPHISM
   ============================================================================ */

.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 0.7rem 0 !important;
    background: rgba(6, 9, 18, 0.74) !important;
    backdrop-filter: blur(22px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 36px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transition: background 0.25s ease, border-color 0.25s ease !important;
}

.nav-container {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.25rem !important;
}

.logo {
    font-size: 1.28rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 55%, #818cf8 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring) !important;
}

.logo:hover {
    transform: scale(1.02);
}

.nav-links {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    list-style: none !important;
    padding: 0.3rem !important;
    border-radius: 14px !important;
    background: rgba(15, 23, 42, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    flex-wrap: wrap !important;
}

/* Spring-physics gliding pill & morphing underline */
#nav-liquid-pill {
    position: absolute;
    top: 4px;
    left: 0;
    height: calc(100% - 8px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    will-change: transform, width, opacity;
}

#nav-liquid-underline {
    position: absolute;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    will-change: transform, width, opacity;
}

.nav-links > li {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.nav-links a:not(.btn-logout) {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.48rem 0.88rem !important;
    border-radius: 10px !important;
    color: #94a3b8 !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: color 0.18s ease, transform 0.18s var(--ease-spring) !important;
    background: transparent !important;
}

.nav-links a:not(.btn-logout)::after {
    display: none !important;
}

.nav-links a:not(.btn-logout):hover {
    color: #f8fafc !important;
}

.nav-links a:not(.btn-logout).active {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

/* ============================================================================
   3. BUTTONS — MAGNETIC HOVER, SHIMMER SWEEP, RIPPLE WAVE & SPRING CLICK
   ============================================================================ */

.btn,
.btn-discord,
.btn-switch-account {
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    padding: 0.68rem 1.35rem !important;
    border-radius: 12px !important;
    font-family: var(--font-sans) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition:
        transform 0.2s var(--ease-spring),
        box-shadow 0.22s var(--ease-spring),
        border-color 0.2s ease,
        background 0.22s ease !important;
    will-change: transform;
}

/* Diagonal Shimmer Sweep */
.btn::before,
.btn-discord::before {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 65%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.55s var(--ease-out-expo);
    pointer-events: none;
}

.btn:hover::before,
.btn-discord:hover::before {
    left: 145%;
}

.btn:active,
.btn-discord:active,
.anime-act-btn:active,
.lab-button:active,
.filter-pill:active,
.tab-btn:active {
    transform: scale(0.97) !important;
}

.btn,
.btn-discord,
.anime-act-btn,
.lab-button,
.filter-pill,
.tab-btn,
.p-subtab,
.hud-btn {
    overflow: hidden !important;
    position: relative;
    max-width: 100%;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #8b5cf6 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(186, 230, 253, 0.35) !important;
    box-shadow:
        0 10px 26px -6px rgba(99, 102, 241, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.btn-primary:hover {
    box-shadow:
        0 16px 34px -6px rgba(56, 189, 248, 0.6),
        0 0 22px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.78) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.88) !important;
    color: #ffffff !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 12px 26px -6px rgba(56, 189, 248, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(167, 243, 208, 0.35) !important;
    box-shadow: 0 10px 24px -6px rgba(16, 185, 129, 0.45) !important;
}

.btn-danger {
    background: rgba(244, 63, 94, 0.16) !important;
    color: #fda4af !important;
    border: 1px solid rgba(244, 63, 94, 0.38) !important;
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.32) !important;
    color: #ffffff !important;
    border-color: #f43f5e !important;
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(165, 180, 252, 0.35) !important;
    box-shadow: 0 6px 18px rgba(88, 101, 242, 0.4) !important;
    padding: 0.48rem 1rem !important;
    font-size: 0.84rem !important;
}

/* Click Ripple Effect */
.pro-ripple-wave,
.btn-ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, rgba(56, 189, 248, 0.16) 65%, transparent 100%);
    transform: scale(0);
    pointer-events: none;
    animation: proRippleExpand 0.42s var(--ease-out-expo) forwards;
}

@keyframes proRippleExpand {
    to {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================================================
   4. 3D TILT CARDS, CURSOR SPOTLIGHT BORDER & PARALLAX DEPTH
   ============================================================================ */

.feature-card,
.stat-item,
.stat,
.pro-poke-card,
.bento-card {
    position: relative;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.82) 0%, rgba(9, 13, 24, 0.9) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow:
        0 18px 40px -15px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform-style: preserve-3d;
    will-change: transform;
    transition:
        transform 0.22s var(--ease-spring),
        border-color 0.25s ease,
        box-shadow 0.25s ease !important;
    overflow: hidden;
}

/* Dynamic Cursor-Tracking Spotlight Glow on Cards */
.feature-card::after,
.pro-poke-card::after,
.bento-card::after,
.stat-item::after,
.stat::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(56, 189, 248, 0.15),
        rgba(99, 102, 241, 0.06) 40%,
        transparent 75%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
}

.feature-card:hover::after,
.pro-poke-card:hover::after,
.bento-card:hover::after,
.stat-item:hover::after,
.stat:hover::after {
    opacity: 1;
}

.feature-card:hover,
.stat-item:hover,
.stat:hover,
.bento-card:hover {
    border-color: rgba(56, 189, 248, 0.42) !important;
    box-shadow:
        0 26px 56px -14px rgba(0, 0, 0, 0.82),
        0 0 28px rgba(56, 189, 248, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

/* ============================================================================
   5. SCROLL REVEAL & PAGE TRANSITION SYSTEM
   ============================================================================ */

.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
        opacity 0.6s var(--ease-out-expo),
        transform 0.6s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-on-scroll.reveal-left {
    transform: translate3d(-28px, 0, 0);
}

.reveal-on-scroll.reveal-right {
    transform: translate3d(28px, 0, 0);
}

.reveal-on-scroll.reveal-scale {
    transform: translate3d(0, 18px, 0) scale(0.96);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Animated Gradient Text */
.aurora-gradient-text {
    background: linear-gradient(
        110deg,
        #ffffff 0%,
        #7dd3fc 25%,
        #818cf8 50%,
        #c084fc 75%,
        #ffffff 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: auroraTextFlow 7s linear infinite;
}

@keyframes auroraTextFlow {
    to { background-position: 220% center; }
}

/* Upgraded Pro Toast Notification with Spring Pop */
.pro-toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: 14px;
    background: rgba(11, 17, 32, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.38);
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.18);
    backdrop-filter: blur(18px);
    animation: proToastPopIn 0.38s var(--ease-spring) forwards;
}

.pro-toast-notification.success {
    border-color: rgba(16, 185, 129, 0.55);
}

.pro-toast-notification.error {
    border-color: rgba(244, 63, 94, 0.55);
}

@keyframes proToastPopIn {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Inputs & Interactive Focus Rings */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: rgba(56, 189, 248, 0.75) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 0 18px rgba(56, 189, 248, 0.15) !important;
}

/* Footer Dark Obsidian */
.footer {
    background: rgba(4, 6, 14, 0.92) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    color: #94a3b8 !important;
    padding: 2.5rem 1.5rem !important;
}

/* Modals Dark Glassmorphism */
.modal {
    background: rgba(3, 6, 14, 0.78) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}

.modal-content {
    background: linear-gradient(165deg, rgba(13, 19, 35, 0.96) 0%, rgba(8, 12, 24, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 22px !important;
    color: #f8fafc !important;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.1) !important;
}

.close-btn {
    color: #94a3b8 !important;
}

.close-btn:hover {
    color: #f8fafc !important;
}