:root {
    --bg:        #05060d;
    --bg-2:      #0a0b14;
    --panel:     rgba(20, 22, 38, 0.55);
    --line:      rgba(200, 195, 230, 0.06);
    --line-2:    rgba(200, 195, 230, 0.11);
    --line-3:    rgba(200, 195, 230, 0.18);
    --fg:        #e8e5f4;
    --fg-2:      #a9a3c7;
    --fg-3:      #706b8f;
    --dim:       #3f3c5a;
    --accent:    #b8b0da;
    --accent-2:  #8a80b6;
    --ease:      cubic-bezier(0.22, 0.72, 0.14, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: var(--bg); color: var(--fg); }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation: bgFadeIn 1.2s ease 0.2s forwards;
}

#bgCanvas.visible { animation: bgFadeIn 1.2s ease 0.2s forwards; }

@keyframes bgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#bgAurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
    filter: blur(44px);
    background: var(--bg);
    will-change: transform, opacity;
    transform-origin: center center;
    backface-visibility: hidden;
}

#bgAurora.active { opacity: 1; }

/* Each theme animates ONLY transform / background-position / opacity —
   never filter. Blur is set once on the base #bgAurora and stays put,
   which keeps the GPU compositor smooth. Durations are long so motion
   reads as ambient drift, not animation. */

#bgAurora.theme-aurora {
    background:
        radial-gradient(60% 50% at 18% 22%, rgba(155, 218, 176, 0.18), transparent 60%),
        radial-gradient(55% 50% at 82% 78%, rgba(149, 200, 224, 0.22), transparent 60%),
        radial-gradient(45% 40% at 62% 36%, rgba(184, 176, 218, 0.22), transparent 60%),
        var(--bg);
    animation: bgAuroraDrift 36s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes bgAuroraDrift {
    0%   { background-position: 0% 0%, 100% 100%, 50% 50%; transform: translate3d(0, 0, 0) scale(1); }
    100% { background-position: 8% 4%, 92% 96%, 48% 52%; transform: translate3d(-0.6%, 0.4%, 0) scale(1.015); }
}

#bgAurora.theme-nebula {
    background:
        radial-gradient(70% 60% at 22% 28%, rgba(190, 110, 210, 0.24), transparent 60%),
        radial-gradient(60% 55% at 78% 72%, rgba(110, 110, 230, 0.26), transparent 60%),
        radial-gradient(48% 42% at 50% 50%, rgba(220, 140, 200, 0.14), transparent 60%),
        var(--bg);
    animation: bgNebulaDrift 48s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bgNebulaDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1)    rotate(0deg); }
    100% { transform: translate3d(-0.4%, 0.3%, 0) scale(1.02) rotate(0.6deg); }
}

#bgAurora.theme-ocean {
    background:
        radial-gradient(65% 55% at 20% 25%, rgba(80, 150, 200, 0.26), transparent 60%),
        radial-gradient(55% 50% at 80% 75%, rgba(60, 200, 180, 0.22), transparent 60%),
        radial-gradient(45% 40% at 50% 55%, rgba(100, 180, 220, 0.18), transparent 60%),
        linear-gradient(180deg, #03060d 0%, #060d18 100%);
    animation: bgOceanFlow 40s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bgOceanFlow {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-0.8%, 0.5%, 0) scale(1.018); }
}

#bgAurora.theme-sunset {
    background:
        radial-gradient(70% 60% at 22% 78%, rgba(232, 130, 102, 0.22), transparent 60%),
        radial-gradient(60% 55% at 78% 28%, rgba(186, 96, 138, 0.28), transparent 60%),
        radial-gradient(50% 45% at 50% 50%, rgba(220, 150, 132, 0.16), transparent 60%),
        linear-gradient(180deg, #0d0612 0%, #1c0a1a 100%);
    animation: bgSunsetDrift 44s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bgSunsetDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(0.4%, -0.4%, 0) scale(1.014); }
}

#bgAurora.theme-mono {
    background:
        radial-gradient(60% 50% at 30% 30%, rgba(200, 200, 222, 0.07), transparent 60%),
        radial-gradient(50% 45% at 70% 70%, rgba(180, 180, 210, 0.05), transparent 60%),
        linear-gradient(180deg, #0a0a10 0%, #050508 100%);
    animation: bgMonoBreathe 32s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bgMonoBreathe {
    0%   { opacity: 1;    transform: scale(1); }
    100% { opacity: 0.86; transform: scale(1.01); }
}

#bgAurora.theme-embers {
    background:
        radial-gradient(45% 40% at 24% 72%, rgba(224, 112, 60, 0.18), transparent 60%),
        radial-gradient(40% 35% at 76% 28%, rgba(204, 80, 52, 0.16), transparent 60%),
        radial-gradient(35% 30% at 60% 60%, rgba(232, 142, 80, 0.10), transparent 60%),
        linear-gradient(180deg, #0a0508 0%, #08060d 100%);
    animation: bgEmbersGlow 34s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bgEmbersGlow {
    0%   { opacity: 1;    transform: translate3d(0, 0, 0) scale(1); }
    100% { opacity: 0.88; transform: translate3d(0.3%, -0.3%, 0) scale(1.015); }
}

#app {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0;
    animation: appFadeIn 0.4s var(--ease) forwards;
}

@keyframes appFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(200, 195, 230, 0.09); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 195, 230, 0.16); }

::selection { background: rgba(184, 176, 218, 0.22); color: #fff; }

button, input, textarea, select { font-family: inherit; color: inherit; outline: none; }
button { cursor: pointer; background: none; border: none; }

.hidden { display: none !important; }

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ban-chip {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 11px;
    background: rgba(40, 16, 22, 0.85);
    border: 1px solid rgba(208, 130, 130, 0.32);
    border-radius: 999px;
    color: #f0c4c4;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(14px);
    transition: all 0.18s var(--ease);
    animation: slideDown 0.4s var(--ease);
    cursor: pointer;
}
.ban-chip:hover {
    background: rgba(60, 22, 30, 0.9);
    border-color: rgba(208, 130, 130, 0.5);
    transform: translateY(-1px);
}
.ban-chip svg { color: #d08282; }
.ban-chip-text {
    font-weight: 600;
    letter-spacing: 0.02em;
}
.ban-chip-timer {
    color: #f0c4c4;
    opacity: 0.75;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    padding-left: 6px;
    border-left: 1px solid rgba(208, 130, 130, 0.25);
    margin-left: 2px;
}

body.banned #searchHome {
    pointer-events: none;
    opacity: 0.5;
}
body.banned #searchHome::placeholder {
    color: #d08282;
}
body.banned #urlBar {
    pointer-events: none;
    opacity: 0.5;
}
