: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;
}

*, *::before, *::after {
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='23' height='23'><path d='M5.4 4 L5.4 19.2 L9.3 15.5 L11.8 20.9 L14.1 19.8 L11.6 14.6 L16.7 14.6 Z' fill='%23000' opacity='0.28' transform='translate(0.6,0.7)'/><path d='M5 3.5 L5 18.9 L8.9 15.2 L11.5 20.7 L14 19.5 L11.4 14.2 L16.6 14.2 Z' fill='%23cdc2ff' stroke='%23241a45' stroke-width='1.25' stroke-linejoin='round'/></svg>") 5 4, auto !important;
}
a, button, [role="button"], select, summary, label[for], [onclick],
.clickable, .nav-card, .link-btn, .dock-btn, .rail-item, .quick-chip, .suggest-item,
.tab-item, .tab-add, .tab-close, .tb-btn, .game-card, .chip, .lib-chip, .g-sb-btn,
.seg-btn, .cfg-btn, .ai-quick-btn, .settings-nav-item, .toggle-wrap,
.swiper-button-next, .swiper-button-prev,
input[type=checkbox], input[type=radio], input[type=submit], input[type=button] {
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='23' height='23'><path d='M11 3.5a1.5 1.5 0 0 1 3 0v7.5h1V9a1.5 1.5 0 0 1 3 0v2h1v-1a1.5 1.5 0 0 1 3 0v6a5 5 0 0 1-5 5h-3a5 5 0 0 1-3.5-1.5l-3.5-3.5a1.5 1.5 0 0 1 2.1-2.1l1.9 1.9V3.5z' fill='%23cdc2ff' stroke='%23241a45' stroke-width='1.05' stroke-linejoin='round'/></svg>") 11 3, pointer !important;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]),
textarea, [contenteditable="true"], #urlBar, .search-field, #searchHome, #searchBar {
    cursor: text !important;
}

.verify-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); background: rgba(200, 195, 230, 0.04); color: var(--fg-2); white-space: nowrap; }
.verify-badge .verify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); flex-shrink: 0; }
.verify-badge.ok { color: #7ce0a8; border-color: rgba(124, 224, 168, 0.32); background: rgba(124, 224, 168, 0.09); }
.verify-badge.ok .verify-dot { background: #7ce0a8; box-shadow: 0 0 8px rgba(124, 224, 168, 0.65); }

#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; }

#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;
}

/* Lite mode - auto-enabled on low-power devices (e.g. school Chromebooks).
   Drops the GPU-heavy live blur, the animated star canvas, and the full-screen
   aurora blur, which are the main frame-killers on weak hardware. */
html.perf-lite { --panel: rgba(18, 20, 34, 0.94); }
html.perf-lite *,
html.perf-lite *::before,
html.perf-lite *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html.perf-lite #bgCanvas { display: none !important; }
html.perf-lite #bgAurora {
    filter: none !important;
    animation: none !important;
    will-change: 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;
}
