/* ============================================================
   ANIRADAR — "NEON GLASS" cyberpunk theme
   Loaded AFTER the Tailwind CDN. Overrides use `body`-prefixed
   selectors and/or !important so they win regardless of the
   order Tailwind injects its runtime <style>.
   ============================================================ */

:root {
    --bg:        #04050a;
    --bg-2:      #070912;
    --cy:        #22d3ee;   /* primary neon (cyan)   */
    --cy-2:      #67e8f9;
    --pp:        #a855f7;   /* secondary neon (purple) */
    --mg:        #ec4899;   /* magenta accent        */
    --gr:        #34d399;   /* neon green            */
    --gold:      #fbbf24;
    --line:      rgba(34,211,238,.16);
    --glass:     rgba(13,18,33,.55);
    --glass-2:   rgba(15,21,40,.72);
    --txt:       #c7d3e6;
    --glow-cy:   0 0 18px rgba(34,211,238,.45);
    --glow-pp:   0 0 22px rgba(168,85,247,.40);
}

/* ---------- Fonts ---------- */
h1, h2, .font-black, .logo, .font-display { font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif !important; letter-spacing: .02em; }
body { font-family: 'Rajdhani', 'Inter', ui-sans-serif, system-ui, sans-serif; letter-spacing: .015em; }
nav a, button, select, .btn-cyber, input::placeholder { font-family: 'Rajdhani', 'Inter', sans-serif; }

/* ---------- Base background (animated grid + neon orbs + scanlines) ---------- */
body.bg-zinc-950 { background: var(--bg) !important; color: var(--txt); position: relative; overflow-x: hidden; }

body::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(34,211,238,.13), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(168,85,247,.16), transparent 45%),
        radial-gradient(circle at 70% 95%, rgba(236,72,153,.10), transparent 45%),
        var(--bg);
}
body::after {
    content: ""; position: fixed; inset: -2px; z-index: -2; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(34,211,238,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,211,238,.06) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
            mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
    animation: grid-drift 22s linear infinite;
}
@keyframes grid-drift { from { background-position: 0 0, 0 0; } to { background-position: 46px 46px, 46px 46px; } }

/* faint CRT scanlines on top of everything */
html::after {
    content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.16) 3px);
    mix-blend-mode: overlay; opacity: .28;
}

::selection { background: rgba(34,211,238,.35); color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 9px; height: 8px; }
::-webkit-scrollbar-track { background: #05070d; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cy), var(--pp)); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--cy-2), var(--mg)); }

/* ---------- Nav / footer as glass slabs ---------- */
nav.sticky {
    background: linear-gradient(180deg, rgba(7,10,20,.92), rgba(7,10,20,.62)) !important;
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line) !important;
    box-shadow: 0 1px 0 rgba(34,211,238,.25), 0 8px 30px -12px rgba(34,211,238,.25);
}
footer { background: linear-gradient(0deg, rgba(7,10,20,.95), transparent) !important; border-top: 1px solid var(--line) !important; }

/* ---------- Logo: neon gradient + flicker ---------- */
.logo .text-indigo-500, a.logo .text-indigo-500,
nav a.text-indigo-500 .text-indigo-500 { color: var(--cy); }
a.logo, .logo {
    background: linear-gradient(90deg, var(--cy), var(--pp) 60%, var(--mg));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(34,211,238,.55));
    animation: logo-flicker 6s infinite;
}
a.logo .text-white { -webkit-text-fill-color: #fff; }
@keyframes logo-flicker { 0%,92%,100% { opacity: 1; } 93% { opacity: .55; } 95% { opacity: 1; } 96% { opacity: .7; } }

/* ---------- Accent re-map: indigo -> neon cyan/purple ---------- */
body .text-indigo-400, body .text-indigo-500,
body .hover\:text-indigo-400:hover, body .group:hover .group-hover\:text-indigo-400 {
    color: var(--cy) !important; text-shadow: 0 0 12px rgba(34,211,238,.5);
}
body .bg-indigo-600, body .bg-indigo-600\/20, body .bg-indigo-600\/15 {
    background: linear-gradient(135deg, rgba(34,211,238,.95), rgba(168,85,247,.95)) !important;
    color: #04050a !important; font-weight: 700;
}
body .bg-indigo-600\/20, body .bg-indigo-600\/15 {
    background: rgba(34,211,238,.14) !important; color: var(--cy) !important;
}
body .hover\:bg-indigo-500:hover { background: linear-gradient(135deg, var(--cy-2), var(--mg)) !important; }
body .border-indigo-500, body .border-indigo-600\/30,
body .hover\:border-indigo-500:hover, body .focus\:border-indigo-500:focus {
    border-color: var(--cy) !important; box-shadow: var(--glow-cy);
}
body .ring-indigo-500, body .focus\:ring-indigo-500:focus { box-shadow: var(--glow-cy) !important; }

/* secondary accent glows */
body .text-emerald-400 { color: var(--gr) !important; text-shadow: 0 0 12px rgba(52,211,153,.5); }
body .bg-emerald-600, body .bg-emerald-600\/20 { box-shadow: 0 0 16px rgba(52,211,153,.35); }
body .text-pink-500, body .border-pink-500 { color: var(--mg) !important; }
body .bg-pink-600 { box-shadow: 0 0 16px rgba(236,72,153,.4); }
body .text-amber-400, body .bg-amber-500 { text-shadow: 0 0 12px rgba(251,191,36,.5); box-shadow: 0 0 14px rgba(251,191,36,.35); }

/* section heading accent bars become neon */
body [class*="border-l-4"] { box-shadow: -3px 0 14px -2px currentColor; }

/* ---------- Glass panels (cards, forms, sidebars) ---------- */
body .bg-zinc-900, body .bg-zinc-900\/40, body .bg-zinc-900\/50,
body .bg-zinc-900\/60, body .bg-zinc-900\/80, body .bg-zinc-800\/80 {
    background: var(--glass) !important;
    backdrop-filter: blur(10px) saturate(130%);
    border-color: var(--line) !important;
}
body .border-zinc-800, body .border-zinc-800\/60, body .border-zinc-800\/50, body .border-zinc-900 {
    border-color: var(--line) !important;
}

/* ---------- Cards: neon hover frame + lift ---------- */
body a.group .rounded-xl,
body a.group .rounded-2xl { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
body a.group:hover .rounded-xl,
body a.group:hover .rounded-2xl {
    border-color: var(--cy) !important;
    box-shadow: 0 0 0 1px rgba(34,211,238,.5), 0 12px 40px -10px rgba(34,211,238,.45), 0 0 30px -6px rgba(168,85,247,.4);
    transform: translateY(-4px);
}

/* ---------- Inputs / selects / textareas ---------- */
body input, body select, body textarea {
    background: rgba(5,8,16,.7) !important;
    border-color: var(--line) !important;
    color: #e6edf7;
}
body input:focus, body select:focus, body textarea:focus {
    border-color: var(--cy) !important; box-shadow: var(--glow-cy); outline: none;
}

/* ---------- Buttons: techy + glow ---------- */
body button, body .btn-cyber, body a[class*="bg-indigo"] { transition: filter .2s ease, transform .12s ease, box-shadow .2s ease; }
body button:hover, body a[class*="bg-indigo"]:hover { filter: brightness(1.08); }
body button:active { transform: translateY(1px); }

/* Primary CTA — angular "cyber" cut + animated sheen */
.btn-cyber {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--cy), var(--pp)) !important;
    color: #04050a !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    box-shadow: 0 0 22px rgba(34,211,238,.5), inset 0 0 14px rgba(255,255,255,.18);
}
.btn-cyber::after {
    content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-20deg); transition: left .6s ease;
}
.btn-cyber:hover::after { left: 140%; }

/* ---------- Utility helpers usable in markup ---------- */
.neon-text  { color: var(--cy); text-shadow: 0 0 8px rgba(34,211,238,.7), 0 0 20px rgba(34,211,238,.4); }
.neon-purple{ color: var(--pp); text-shadow: 0 0 8px rgba(168,85,247,.7); }
.glass-card {
    background: var(--glass-2); backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid var(--line); box-shadow: 0 10px 40px -12px rgba(0,0,0,.7), inset 0 0 30px -20px rgba(34,211,238,.6);
}
.hud-corner { position: relative; }
.hud-corner::before, .hud-corner::after {
    content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--cy); opacity: .8;
}
.hud-corner::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-corner::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* image shimmer while loading */
img { background:
    linear-gradient(100deg, #0a0e18 30%, #131a2b 50%, #0a0e18 70%) no-repeat;
    background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
img[src] { animation: none; background: none; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Back-to-top ---------- */
#toTop {
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    width: 46px; height: 46px; display: none; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--cy), var(--pp)); color: #04050a; font-size: 20px; font-weight: 900;
    border-radius: 12px; box-shadow: var(--glow-cy); cursor: pointer; border: none;
    clip-path: polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px);
}
#toTop.show { display: flex; }
#toTop:hover { filter: brightness(1.1); }

/* ---------- News ticker (home) ---------- */
.ticker {
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(34,211,238,.06), rgba(168,85,247,.06));
    overflow: hidden; white-space: nowrap;
}
.ticker-track { display: inline-block; padding: 8px 0; animation: ticker 28s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { color: var(--cy); margin: 0 26px; font-weight: 600; text-decoration: none; }
.ticker .tag { color: var(--mg); font-weight: 800; margin-right: 8px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Full-futuristic polish ---------- */
/* animated neon line under the navbar */
nav.sticky::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cy), var(--pp), var(--mg), transparent);
    background-size: 200% 100%; animation: line-slide 6s linear infinite; opacity: .9;
}
@keyframes line-slide { from { background-position: 0 0; } to { background-position: 200% 0; } }

/* glass cards get an interactive neon lift */
.glass-card { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.glass-card:hover {
    border-color: rgba(34,211,238,.5);
    box-shadow: 0 16px 50px -16px rgba(34,211,238,.4), inset 0 0 40px -28px rgba(168,85,247,.8);
}

/* HUD corner brackets glow */
.hud-corner::before, .hud-corner::after { box-shadow: 0 0 10px rgba(34,211,238,.6); }

/* section heading neon accent bars */
h2[class*="border-l-4"], h3[class*="border-l-4"] { position: relative; }

/* hero gets a slow sweeping scan light */
#hero-slider::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 15; opacity: .25;
    background: linear-gradient(115deg, transparent 40%, rgba(34,211,238,.18) 50%, transparent 60%);
    background-size: 250% 100%; animation: hero-scan 7s ease-in-out infinite;
}
@keyframes hero-scan { 0%,100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }

/* news ticker tag uses neon */
.ticker .tag { letter-spacing: .12em; }

/* radio/checkbox accent */
input[type="radio"], input[type="checkbox"] { accent-color: var(--cy); }

/* ---------- PRO member badge + animated avatar frame ---------- */
.pro-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
    color: #1a1305;
    background: linear-gradient(110deg, #fde68a, #fbbf24 30%, #f59e0b 50%, #fbbf24 70%, #fde68a);
    background-size: 220% 100%;
    box-shadow: 0 0 12px rgba(251,191,36,.55), inset 0 0 6px rgba(255,255,255,.5);
    animation: pro-shine 2.6s linear infinite, pro-pulse 2.2s ease-in-out infinite;
}
.pro-badge svg { width: 11px; height: 11px; }
@keyframes pro-shine { from { background-position: 0 0; } to { background-position: 220% 0; } }
@keyframes pro-pulse { 0%,100% { box-shadow: 0 0 10px rgba(251,191,36,.45), inset 0 0 6px rgba(255,255,255,.5); } 50% { box-shadow: 0 0 20px rgba(251,191,36,.85), inset 0 0 8px rgba(255,255,255,.7); } }

/* Animated rotating gradient ring around a Pro member's avatar */
.pro-frame {
    position: relative; display: inline-grid; place-items: center;
    padding: 3px; border-radius: 999px; isolation: isolate;
}
.pro-frame::before {
    content: ""; position: absolute; inset: 0; border-radius: 999px; z-index: -1;
    background: conic-gradient(from 0deg, var(--cy), var(--pp), var(--mg), var(--gold), var(--cy));
    animation: pro-spin 3.5s linear infinite;
    filter: drop-shadow(0 0 6px rgba(168,85,247,.6));
}
.pro-frame::after {
    content: ""; position: absolute; inset: 2px; border-radius: 999px; background: #04050a; z-index: -1;
}
.pro-frame img { border-radius: 999px; display: block; }
@keyframes pro-spin { to { transform: rotate(360deg); } }

/* square variant for large profile avatars */
.pro-frame.pro-frame-sq { padding: 4px; border-radius: 1.25rem; }
.pro-frame.pro-frame-sq::before { border-radius: 1.25rem; }
.pro-frame.pro-frame-sq::after  { inset: 4px; border-radius: 1rem; }
.pro-frame.pro-frame-sq img { border-radius: 1rem; }

@media (prefers-reduced-motion: reduce) {
    .pro-badge, .pro-frame::before { animation: none !important; }
}

/* ---------- App-like mobile tab bar ---------- */
.app-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; justify-content: space-around; align-items: stretch;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(7,10,20,.96), rgba(7,10,20,.82));
    backdrop-filter: blur(16px) saturate(140%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px -10px rgba(34,211,238,.4);
}
.app-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 2px; border-radius: 12px; color: #6b7689; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; transition: color .2s ease, transform .12s ease;
}
.app-tab:active { transform: scale(.92); }
.app-tab.is-active { color: var(--cy); }
.app-tab.is-active svg { filter: drop-shadow(0 0 8px rgba(34,211,238,.8)); }
.app-tab.is-active::after {
    content: ""; position: absolute; bottom: calc(2px + env(safe-area-inset-bottom)); width: 22px; height: 3px;
    border-radius: 3px; background: linear-gradient(90deg, var(--cy), var(--pp)); box-shadow: var(--glow-cy);
}
/* keep content clear of the tab bar on mobile */
@media (max-width: 1023px) { body { padding-bottom: 68px; } }

/* bigger, app-like tap targets on touch screens */
@media (max-width: 640px) {
    button, .btn-cyber, nav a, select { min-height: 40px; }
    h1 { line-height: 1.1; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    body::after, .ticker-track, .logo, .btn-cyber::after, img { animation: none !important; }
}
