:root {
    --bg: #07070c;
    --bg-2: #0d0d14;
    --surface: #13131d;
    --line: rgba(255,255,255,.08);
    --text: #f3f4f8;
    --muted: #9aa1b8;
    --accent: #7c5cff;
    --accent-2: #22e3c3;
    --danger: #ff5d73;
    --ok: #3ee0a0;
    --shadow: 0 20px 60px rgba(0,0,0,.45);
    --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.sx-body {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(124,92,255,.18), transparent 50%),
                radial-gradient(900px 500px at 90% 0%, rgba(34,227,195,.08), transparent 45%),
                var(--bg);
    color: var(--text);
    font-family: Outfit, system-ui, sans-serif;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.sx-header {
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(7,7,12,.92), rgba(7,7,12,.55) 70%, transparent);
}
.sx-header-inner {
    max-width: 1440px; margin: 0 auto; padding: 16px 28px;
    display: flex; align-items: center; gap: 28px;
}
.sx-logo { display: flex; align-items: center; gap: 10px; font-family: Sora, Outfit, sans-serif; }
.sx-mark { width: 36px; height: 36px; }
.sx-word { font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; }
.sx-word span { color: var(--accent-2); }
.sx-nav { display: flex; align-items: center; gap: 22px; }
.sx-nav a, .sx-drop > button {
    background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer;
}
.sx-nav a:hover, .sx-drop > button:hover { color: var(--text); }
.sx-drop { position: relative; }
.sx-drop-menu {
    display: none; position: absolute; top: 130%; left: 0; min-width: 200px;
    background: #161622; border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow);
}
.sx-drop:hover .sx-drop-menu, .sx-drop:focus-within .sx-drop-menu { display: grid; }
.sx-drop-menu a, .sx-drop-menu button {
    display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0;
    background: none; color: var(--text); border-radius: 8px; font: inherit; cursor: pointer;
}
.sx-drop-menu a:hover, .sx-drop-menu button:hover { background: rgba(124,92,255,.15); }
.sx-drop-label { padding: 8px 10px; color: var(--muted); font-size: .85rem; }
.sx-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sx-search {
    position: relative; display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
    border-radius: 999px; padding: 8px 14px; min-width: 260px;
}
.sx-search input { background: none; border: 0; color: var(--text); width: 100%; outline: none; }
.sx-search-lg { max-width: 720px; margin: 8px 0 28px; padding: 14px 18px; }
.sx-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #151522; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.sx-suggest a { display: flex; justify-content: space-between; padding: 10px 14px; color: var(--text); }
.sx-suggest a:hover { background: rgba(124,92,255,.12); }
.sx-avatar-btn {
    width: 38px; height: 38px; border-radius: 12px; overflow: hidden; border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #061014; font-weight: 800;
}
.sx-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.sx-burger { display: none; background: none; border: 0; width: 42px; }
.sx-burger span { display: block; height: 2px; background: #fff; margin: 6px 0; }

.sx-btn {
    display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
    border-radius: 999px; padding: 12px 18px; font-weight: 700; font-family: inherit;
}
.sx-btn-primary { background: linear-gradient(135deg, #8d6bff, #22e3c3); color: #061014; }
.sx-btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.sx-btn-line { background: transparent; color: #fff; border: 1px solid var(--line); }

.sx-hero {
    min-height: 78vh; position: relative; display: flex; align-items: flex-end;
    background: var(--hero) center/cover no-repeat;
    padding: 120px 28px 70px;
}
.sx-hero-empty { background: linear-gradient(135deg, #16122b, #08201c); }
.sx-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(7,7,12,.92) 0%, rgba(7,7,12,.4) 55%, transparent 100%),
                linear-gradient(0deg, #07070c 0%, transparent 45%);
}
.sx-hero-copy { position: relative; max-width: 680px; }
.sx-kicker { color: var(--accent-2); letter-spacing: .18em; text-transform: uppercase; font-size: .75rem; font-weight: 700; }
h1, h2, h3 { font-family: Sora, Outfit, sans-serif; margin: 0 0 12px; }
.sx-lead { color: #d5d8e6; line-height: 1.6; max-width: 58ch; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.sx-chips span {
    border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .82rem; color: #d7dbea;
}
.sx-rate { border-color: var(--accent) !important; }
.sx-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.sx-catalog { padding: 10px 0 40px; }
.sx-row { padding: 8px 28px 28px; }
.sx-row-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
.sx-row-nav button {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
    background: #141422; color: #fff; cursor: pointer;
}
.sx-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
    scrollbar-width: none;
}
.sx-rail::-webkit-scrollbar { display: none; }
.sx-card { scroll-snap-align: start; color: inherit; }
.sx-card-art {
    position: relative; aspect-ratio: 2/3; border-radius: 16px; overflow: hidden;
    background: #1a1a28; box-shadow: var(--shadow);
}
.sx-card-art img, .sx-card-ph { width: 100%; height: 100%; object-fit: cover; }
.sx-card-ph { display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; background: #222238; }
.sx-card-hover {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
    opacity: 0; transition: opacity .25s ease;
}
.sx-card:hover .sx-card-hover { opacity: 1; }
.sx-card-hover i {
    width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
    background: #fff; color: #111;
}
.sx-card-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; background: rgba(255,255,255,.2); border-radius: 99px; }
.sx-card-bar span { display: block; height: 100%; background: var(--accent-2); border-radius: inherit; }
.sx-card-meta { margin-top: 8px; }
.sx-card-meta strong { display: block; font-size: .95rem; }
.sx-card-meta span { color: var(--muted); font-size: .8rem; }

.sx-page { max-width: 1440px; margin: 0 auto; padding: 28px; }
.sx-page-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.sx-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-filters a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--muted); }
.sx-filters a.is-on, .sx-pager a.is-on { background: var(--accent); color: #fff; border-color: transparent; }
.sx-pager { display: flex; gap: 8px; margin-top: 24px; }
.sx-pager a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }

.sx-detail { position: relative; padding: 120px 28px 40px; background: var(--hero) center/cover; }
.sx-detail-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #07070c 20%, rgba(7,7,12,.72), #07070c); }
.sx-detail-grid { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.sx-poster img { border-radius: 18px; box-shadow: var(--shadow); }
.sx-episodes { display: grid; gap: 12px; }
.sx-episode {
    display: grid; grid-template-columns: 180px 1fr; gap: 16px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 16px; padding: 10px; align-items: center;
}
.sx-episode-thumb { aspect-ratio: 16/9; overflow: hidden; border-radius: 10px; background: #1c1c2a; display: grid; place-items: center; }
.sx-episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sx-trailer, .sx-embed iframe { width: 100%; max-width: 960px; border-radius: 16px; border: 0; aspect-ratio: 16/9; background: #000; }

.sx-auth { min-height: 70vh; display: grid; place-items: center; padding: 40px 16px; }
.sx-auth-card, .sx-panel {
    width: min(460px, 100%); background: rgba(19,19,29,.92); border: 1px solid var(--line);
    border-radius: 24px; padding: 28px; box-shadow: var(--shadow);
}
.sx-form { display: grid; gap: 12px; }
.sx-form label { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
.sx-form input, .sx-form textarea, .sx-form select {
    background: #0e0e16; border: 1px solid var(--line); color: var(--text);
    border-radius: 12px; padding: 11px 12px; font: inherit;
}
.sx-auth-links { display: flex; justify-content: space-between; margin-top: 16px; color: var(--muted); }
.sx-alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.sx-alert-ok { background: rgba(62,224,160,.12); color: var(--ok); }
.sx-alert-err { background: rgba(255,93,115,.12); color: var(--danger); }
.sx-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.sx-account .sx-panel { width: auto; }
.sx-muted { color: var(--muted); }
.sx-people { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.sx-people a { border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; }

.sx-profiles { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.sx-profile-grid { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.sx-profile-card button { background: none; border: 0; color: inherit; cursor: pointer; }
.sx-profile-avatar {
    width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #2a2348); font-size: 2rem; font-weight: 800; margin-bottom: 10px;
    overflow: hidden;
}
.sx-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sx-body-plain .sx-plain-top { padding: 24px; }
.sx-check { display: flex !important; align-items: center; gap: 8px; }
.sx-error { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px; }
.sx-footer { border-top: 1px solid var(--line); padding: 40px 28px; color: var(--muted); }
.sx-footer-inner { max-width: 1100px; margin: 0 auto; }
.sx-footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }

@media (max-width: 900px) {
    .sx-nav, .sx-search { display: none; }
    .sx-nav.is-open {
        display: flex; flex-direction: column; position: absolute; inset: 70px 16px auto;
        background: #12121c; padding: 18px; border-radius: 16px; border: 1px solid var(--line);
    }
    .sx-burger { display: block; }
    .sx-header-inner { flex-wrap: wrap; }
    .sx-detail-grid, .sx-account-grid, .sx-episode { grid-template-columns: 1fr; }
    .sx-hero { min-height: 70vh; padding: 100px 18px 40px; }
    .sx-rail { grid-auto-columns: 150px; }
}
