/* ── VARIABLES ─────────────────────────────────────────────────── */
:root { --accent: #93c5ae; --accent-dim: rgba(147,197,174,0.12); --accent-border: rgba(147,197,174,0.3); }
* { box-sizing: border-box; }
body { background: #1a1a1a; color: #e5e5e5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── PAGES ─────────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }
.view { display: none; }
.view.active { display: flex; }

/* ── NAV ───────────────────────────────────────────────────────── */
.nav-link { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; margin-bottom: 2px; color: #666; text-decoration: none; font-size: 13px; transition: all 0.15s; cursor: pointer; }
.nav-link:hover { color: #ccc; background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }
.nav-link .icon { width: 16px; text-align: center; font-size: 12px; }

/* ── POSTERS ────────────────────────────────────────────────────── */
.poster { position: relative; cursor: pointer; }
.poster img, .poster .noposter { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px; display: block; background: #222; border: 1px solid #2a2a2a; }
.poster .noposter { display: flex; align-items: center; justify-content: center; color: #444; font-size: 11px; text-align: center; padding: 6px; }
.poster:hover img, .poster:hover .noposter { border-color: var(--accent); }

/* ── HORIZONTAL SCROLL ROW ──────────────────────────────────────── */
.scroll-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .poster { flex-shrink: 0; width: 100px; }
.scroll-row .poster img, .scroll-row .poster .noposter { width: 100px; height: 150px; }
.scroll-row .poster-title { font-size: 11px; color: #666; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100px; }

/* ── PROGRESS BAR ───────────────────────────────────────────────── */
.pbar { height: 2px; background: #2a2a2a; margin-top: 4px; border-radius: 1px; }
.pbar-fill { height: 100%; background: var(--accent); border-radius: 1px; transition: width 0.3s; }

/* ── GRID ───────────────────────────────────────────────────────── */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px; }

/* ── SEASON POSTER CARDS ────────────────────────────────────────── */
.season-cards { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.season-cards::-webkit-scrollbar { display: none; }
.season-card { flex-shrink: 0; width: 130px; cursor: pointer; }
.season-card img, .season-card .season-noimg { width: 130px; height: 195px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; display: block; background: #222; transition: border-color 0.15s; }
.season-card .season-noimg { display: flex; align-items: center; justify-content: center; color: #444; font-size: 12px; }
.season-card:hover img, .season-card:hover .season-noimg { border-color: #555; }
.season-card.active-season img, .season-card.active-season .season-noimg { border-color: var(--accent); }
.season-card-label { font-size: 12px; color: #ccc; margin-top: 6px; font-weight: 500; }
.season-card-sub { font-size: 11px; color: #555; margin-top: 1px; }

/* ── EPISODE CARDS ──────────────────────────────────────────────── */
.ep-cards { display: flex; flex-direction: column; gap: 0; }
.ep-card { display: flex; gap: 0; border-bottom: 1px solid #1e1e1e; position: relative; }
.ep-card:last-child { border-bottom: none; }
.ep-card.watched-card { background: rgba(255,255,255,0.01); }
.ep-still { width: 300px; height: 170px; object-fit: cover; flex-shrink: 0; display: block; background: #1e1e1e; }
.ep-still-placeholder { width: 300px; height: 170px; background: #1e1e1e; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-right: 1px solid #222; }
.ep-body { flex: 1; padding: 16px 24px; display: flex; flex-direction: column; min-width: 0; max-width: 680px; }
.ep-code { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.ep-title { font-size: 15px; font-weight: 500; color: #e0e0e0; margin-bottom: 4px; }
.ep-meta { font-size: 12px; color: #555; margin-bottom: 8px; }
.ep-overview { font-size: 13px; color: #888; line-height: 1.65; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex-shrink: 0; margin-bottom: 4px; }
.ep-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #1e1e1e; }
.ep-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #333; background: transparent; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.ep-tick:hover { border-color: var(--accent); }
.ep-tick.done { background: var(--accent-dim); border-color: var(--accent); }
.ep-tick.done::after { content: ''; display: block; width: 5px; height: 8px; border: 1.5px solid var(--accent); border-top: none; border-left: none; transform: rotate(45deg) translate(-1px,-1px); }

/* ── NEWS GRID ──────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.news-grid-card { background: #1e1e1e; border: 1px solid #252525; border-radius: 6px; overflow: hidden; cursor: pointer; transition: border-color 0.15s; }
.news-grid-card:hover { border-color: #444; }
.news-grid-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #252525; }
.news-grid-card .ngc-body { padding: 10px 12px 12px; }
.news-grid-card .ngc-show { font-size: 11px; color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.news-grid-card .ngc-title { font-size: 12px; color: #ccc; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-grid-card .ngc-meta { font-size: 10px; color: #444; margin-top: 6px; }

/* ── SHOW HERO ──────────────────────────────────────────────────── */
.show-backdrop { width: 100%; height: 280px; object-fit: cover; object-position: top; display: block; background: #1a1a1a; }
.show-hero { position: relative; }
.show-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(26,26,26,0) 30%, #1a1a1a 100%); }
.show-hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 0 32px 24px; display: flex; gap: 20px; align-items: flex-end; }
.show-hero-poster { width: 90px; height: 135px; object-fit: cover; border-radius: 3px; border: 1px solid #333; flex-shrink: 0; background: #222; }
.show-hero-meta { flex: 1; padding-bottom: 4px; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 4px; font-size: 12px; cursor: pointer; border: 1px solid #333; background: transparent; color: #888; transition: all 0.15s; font-family: inherit; }
.btn:hover { border-color: #555; color: #ccc; }
.btn.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1a1a; font-weight: 500; }
.btn.danger { border-color: rgba(239,68,68,0.3); color: #f87171; }
.btn.danger:hover { background: rgba(239,68,68,0.1); }

/* ── MODALS ─────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal { background: #202020; border: 1px solid #2e2e2e; border-radius: 10px; width: 90%; max-width: 460px; max-height: 85vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid #2a2a2a; }
.modal-body { padding: 16px 20px 20px; }

/* ── FORMS ──────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; color: #666; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field select { width: 100%; background: #1a1a1a; border: 1px solid #2e2e2e; border-radius: 6px; padding: 9px 12px; font-size: 13px; color: #e5e5e5; outline: none; font-family: inherit; transition: border-color 0.15s; }
.field input:focus, .field select:focus { border-color: var(--accent); }

/* ── TAGS ───────────────────────────────────────────────────────── */
.tag { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 3px; display: inline-block; }
.tag-sub   { background: var(--accent-dim); color: var(--accent); }
.tag-watch { background: rgba(251,191,36,0.12); color: #fbbf24; }
.tag-done  { background: rgba(107,114,128,0.15); color: #9ca3af; }
.tag-owner { background: rgba(239,68,68,0.12); color: #f87171; }
.tag-mod   { background: rgba(139,92,246,0.12); color: #a78bfa; }

/* ── NEWS CARDS ─────────────────────────────────────────────────── */
.news-card { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #212121; cursor: pointer; }
.news-card:hover .news-title { color: var(--accent); }
.news-card:last-child { border-bottom: none; }
.news-thumb { width: 140px; height: 80px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #222; border: 1px solid #2a2a2a; }

/* ── TOAST ──────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #2a2a2a; border: 1px solid #383838; border-radius: 99px; padding: 10px 18px 10px 14px; font-size: 13px; z-index: 999; opacity: 0; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-icon { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--accent-border); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--accent); flex-shrink: 0; }

/* ── PROFILE ────────────────────────────────────────────────────── */
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: #252525; border: 2px solid #333; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #555; margin-bottom: 14px; }

/* ── SETTINGS ───────────────────────────────────────────────────── */
.setting-box   { background: #1e1e1e; border: 1px solid #252525; border-radius: 6px; padding: 16px; margin-bottom: 10px; }
.setting-label { font-size: 10px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }

/* ── LOADING ────────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; gap: 10px; padding: 32px; color: #555; font-size: 13px; }
.w-full { width: 100%; justify-content: center; }

/* ── SPINNER ────────────────────────────────────────────────────── */
.spin { width: 18px; height: 18px; border: 2px solid #2a2a2a; border-top-color: var(--accent); border-radius: 50%; animation: spinning 0.7s linear infinite; }
@keyframes spinning { to { transform: rotate(360deg); } }

/* ── AUTH ───────────────────────────────────────────────────────── */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #141414; }
.auth-box { width: 100%; max-width: 360px; padding: 0 20px; }
.auth-logo { font-size: 22px; font-weight: 600; color: #f0f0f0; text-align: center; margin-bottom: 32px; letter-spacing: -0.02em; }
.auth-logo span { color: var(--accent); }

/* ── SECTION HEADERS ────────────────────────────────────────────── */
.sh { font-size: 11px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

/* ── ADMIN ──────────────────────────────────────────────────────── */
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #212121; }
.admin-row:last-child { border-bottom: none; }

/* ── STATUS DOT ─────────────────────────────────────────────────── */
.sdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sdot-green  { background: #4ade80; }
.sdot-yellow { background: #fbbf24; }
.sdot-red    { background: #f87171; }

/* ── SEARCH RESULT CARDS ────────────────────────────────────────── */
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.src-card { cursor: pointer; }
.src-card img, .src-card .noposter { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px; border: 1px solid #2a2a2a; display: block; background: #222; }
.src-card .noposter { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #444; text-align: center; padding: 6px; }
.src-card:hover img, .src-card:hover .noposter { border-color: var(--accent); }
.src-title { font-size: 11px; color: #777; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-year  { font-size: 10px; color: #444; }

/* ── SECTION DIVIDER ────────────────────────────────────────────── */
.sdiv { height: 1px; background: #212121; margin: 24px 0; }

/* ── COLOR SWATCHES ─────────────────────────────────────────────── */
.swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s; }
.swatch.selected { border-color: white; }

/* ── CUSTOMISE NAVIGATION ───────────────────────────────────────── */
.customise-nav-item { transition: all 0.2s; }
.customise-nav-item:hover { background: #1e1e1e !important; color: #ccc !important; }
