:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: rgba(18, 25, 39, .84);
  --panel-solid: #111827;
  --panel-soft: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .11);
  --text: #f7f9fc;
  --muted: #9ca8ba;
  --blue: #6d8dff;
  --blue-strong: #526fff;
  --cyan: #63d9e8;
  --green: #5ee0a0;
  --danger: #ff6f85;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 45% -20%, rgba(80, 105, 218, .16), transparent 42%),
    linear-gradient(180deg, #080d18 0%, var(--bg) 50%, #060910 100%);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.ambient { position: fixed; border-radius: 999px; filter: blur(90px); pointer-events: none; opacity: .18; z-index: 0; }
.ambient-one { width: 420px; height: 420px; background: #3454ff; top: 8%; left: -220px; }
.ambient-two { width: 360px; height: 360px; background: #10a7bd; right: -220px; bottom: 8%; opacity: .11; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(76px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) clamp(22px, 4vw, 64px) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(7, 11, 20, .76);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand { display: inline-flex; align-items: center; gap: 12px; border: 0; padding: 0; background: none; cursor: pointer; justify-self: start; text-align: left; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 19px;
  background: linear-gradient(145deg, #7f9bff, #4d61e8 64%, #2d3aa3);
  box-shadow: 0 10px 28px rgba(70, 92, 232, .34), inset 0 1px rgba(255,255,255,.32);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); letter-spacing: .04em; }

.desktop-nav { padding: 4px; display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.nav-button { min-width: 82px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); padding: 9px 17px; cursor: pointer; font-weight: 650; }
.nav-button.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.watch-button, .secondary-button { justify-self: end; border: 1px solid rgba(130, 153, 255, .3); background: rgba(95, 119, 245, .13); color: #dce4ff; border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }

main { position: relative; z-index: 1; width: min(1440px, 100%); margin: 0 auto; }
.view { display: none; min-height: calc(100vh - 76px); padding: 0 clamp(22px, 5vw, 76px) 80px; }
.view.active { display: block; animation: fade-in .25s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero { max-width: 900px; margin: 0 auto; padding: clamp(72px, 10vw, 130px) 0 62px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: #8fa5ff; font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero h1, .page-heading h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 1.06; letter-spacing: -.045em; }
.hero-copy { max-width: 660px; margin: 19px auto 32px; color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.7; }

.search-box {
  width: min(760px, 100%);
  margin: auto;
  min-height: 68px;
  padding: 8px 9px 8px 20px;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: rgba(18, 25, 39, .86);
  box-shadow: 0 22px 70px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}
.search-box:focus-within { border-color: rgba(123, 148, 255, .66); box-shadow: 0 22px 70px rgba(0,0,0,.32), 0 0 0 4px rgba(100,126,255,.1); }
.search-box svg { width: 23px; fill: none; stroke: #7f8ca2; stroke-width: 1.9; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; color: white; font-size: 17px; }
.search-box input::placeholder { color: #707d91; }
.search-box button, .primary-button, .episode-button, .season-request-button, .login-form button {
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #7893ff, var(--blue-strong));
  color: white;
  padding: 14px 22px;
  min-height: 46px;
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(70, 92, 232, .24), inset 0 1px rgba(255,255,255,.25);
}
button:disabled { opacity: .5; cursor: wait; }
.quick-hints { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 24px; color: #7f8b9f; font-size: 12px; }
.quick-hints span::before { content: "✓"; margin-right: 6px; color: var(--green); }

.section-heading, .page-heading, .library-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 25px; }
.section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.page-heading { display: block; padding: 76px 0 42px; }
.page-heading h1 { font-size: clamp(42px, 6vw, 66px); }
.page-heading > p:last-child { color: var(--muted); font-size: 16px; }
.library-heading { display: flex; align-items: end; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.media-card { min-width: 0; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; }
.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(145deg, #182033, #0c111c);
  box-shadow: 0 14px 38px rgba(0,0,0,.28);
}
.poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.media-card:hover .poster img { transform: scale(1.035); filter: brightness(1.05); }
.poster-fallback { height: 100%; display: grid; place-items: center; color: #647087; font-size: 40px; }
.media-badge { position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 9px; background: rgba(4,8,15,.76); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.availability-badge { left: auto; right: 10px; color: #caffdf; background: rgba(16,92,57,.83); }
.media-card h3 { overflow: hidden; margin: 13px 2px 5px; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; line-height: 1.35; }
.media-card p { overflow: hidden; margin: 0 2px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }

.empty-state { max-width: 480px; margin: 20px auto 0; padding: 52px 24px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { width: 68px; height: 68px; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-soft); color: #91a2bd; font-size: 34px; }
.empty-state h2 { margin: 0 0 10px; color: #dfe5ef; font-size: 20px; }
.empty-state p { margin: 0; font-size: 14px; line-height: 1.7; }

.skeleton { overflow: hidden; position: relative; min-height: 310px; border-radius: 17px; background: #111827; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.player-overlay { position: fixed; inset: 0; z-index: 140; display: grid; grid-template-rows: auto minmax(0, 1fr); color: white; background: #03060b; }
.player-header { min-height: calc(68px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 13px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(7,10,16,.94); }
.player-header > div { min-width: 0; }
.player-header strong, .player-header span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-header strong { font-size: 16px; }
.player-header span { margin-top: 4px; color: #8d99aa; font-size: 11px; }
.player-back { width: 43px; height: 43px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; background: rgba(255,255,255,.055); color: white; cursor: pointer; font-size: 34px; line-height: 1; }
.player-actions { display: flex; align-items: center; gap: 9px; }
.player-library-button { min-height: 40px; border: 1px solid rgba(129,151,255,.3); border-radius: 11px; background: rgba(94,116,238,.15); color: #dfe6ff; padding: 8px 14px; cursor: pointer; font-size: 12px; font-weight: 750; }
.player-danmaku-button { width: 42px; height: 40px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.055); color: #9da8b9; cursor: pointer; font-size: 15px; font-weight: 850; }
.player-danmaku-button.active { border-color: rgba(105,224,174,.45); background: rgba(48,166,115,.18); color: #baffdc; }
.player-fullscreen-button { width: 42px; height: 40px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.055); color: white; cursor: pointer; font-size: 20px; line-height: 1; }
.player-stage { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; overscroll-behavior: none; background: black; -webkit-user-select: none; user-select: none; }
.player-stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: black; }
.danmaku-layer { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.danmaku-item { position: absolute; left: 0; max-width: 80%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: white; font-size: clamp(18px, 2.2vw, 30px); font-weight: 750; line-height: 1.15; text-shadow: -1px -1px 1px rgba(0,0,0,.95), 1px -1px 1px rgba(0,0,0,.95), -1px 1px 1px rgba(0,0,0,.95), 1px 1px 1px rgba(0,0,0,.95), 0 2px 4px rgba(0,0,0,.85); will-change: transform; }
.danmaku-item.fixed { max-width: 72%; text-align: center; }
.player-loading, .player-error { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; padding: 28px; background: rgba(2,4,8,.72); text-align: center; }
.player-loading span { width: 42px; height: 42px; border: 3px solid rgba(255,255,255,.18); border-top-color: #8ba2ff; border-radius: 50%; animation: player-spin .8s linear infinite; }
.player-loading p { margin: 15px 0 0; color: #aeb8c7; font-size: 13px; }
.player-error h2 { margin: 0 0 8px; font-size: 25px; }
.player-error p { margin: 0 0 20px; color: var(--muted); }
@keyframes player-spin { to { transform: rotate(360deg); } }
.gesture-hud { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 180px; max-width: calc(100% - 40px); padding: 18px 20px; display: grid; justify-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: rgba(8,12,20,.82); box-shadow: 0 16px 48px rgba(0,0,0,.4); backdrop-filter: blur(18px); pointer-events: none; text-align: center; }
.gesture-hud strong { font-size: 17px; }
.gesture-hud span { margin-top: 7px; color: #b6c0cf; font-size: 13px; }
.gesture-hud div { width: 140px; height: 5px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.gesture-hud i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6e8cff, #62dae9); }
.player-details { min-height: 0; overflow: auto; padding: clamp(28px, 5vw, 64px) max(22px, calc((100vw - 1120px) / 2)); background: radial-gradient(circle at 75% 0%, rgba(81,103,215,.16), transparent 36%), #080d16; }
.player-series-copy { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: end; max-width: 850px; margin-bottom: 34px; }
.player-series-copy img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.38); }
.player-series-copy h2 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.04em; }
.player-series-copy div > p:last-child { max-width: 660px; margin: 0; display: -webkit-box; overflow: hidden; color: #9da9b9; line-height: 1.7; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.player-season-tabs { display: flex; gap: 9px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; scrollbar-width: none; }
.player-season-tabs::-webkit-scrollbar { display: none; }
.player-season-tabs button { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.11); border-radius: 11px; background: rgba(255,255,255,.045); color: #9da8b9; padding: 10px 15px; cursor: pointer; }
.player-season-tabs button.active { border-color: rgba(126,149,255,.5); background: rgba(96,119,242,.2); color: white; }
.player-episode-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.player-episode { min-width: 0; display: grid; grid-template-columns: 47px minmax(0, 1fr) auto; gap: 13px; align-items: center; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(255,255,255,.035); color: white; padding: 13px; text-align: left; cursor: pointer; }
.player-episode:hover { border-color: rgba(127,151,255,.35); background: rgba(106,128,245,.08); }
.player-episode > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.07); color: #c7d1df; font-size: 12px; font-weight: 800; }
.player-episode div { min-width: 0; }
.player-episode strong, .player-episode small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-episode strong { font-size: 14px; }
.player-episode small { margin-top: 5px; color: #8490a1; font-size: 11px; }
.player-episode b { color: #8da4ff; font-size: 13px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: grid; place-items: center; background: rgba(2,5,10,.72); backdrop-filter: blur(16px); }
.modal-backdrop[hidden] { display: none; }
.modal-panel { position: relative; overflow: auto; width: min(940px, 100%); max-height: min(88vh, 900px); border: 1px solid rgba(255,255,255,.13); border-radius: 26px; background: #0d1421; box-shadow: var(--shadow); overscroll-behavior: contain; }
.modal-close { position: sticky; z-index: 4; float: right; top: 14px; right: 14px; width: 42px; height: 42px; margin: 14px 14px -56px 0; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; background: rgba(5,9,16,.76); color: white; font-size: 27px; line-height: 1; cursor: pointer; backdrop-filter: blur(12px); }
.detail-hero { min-height: 390px; padding: 42px; display: grid; grid-template-columns: 210px 1fr; gap: 35px; align-items: end; background-position: center; background-size: cover; }
.detail-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 390px; pointer-events: none; background: linear-gradient(90deg, rgba(9,14,24,.96) 0%, rgba(9,14,24,.79) 52%, rgba(9,14,24,.82)), linear-gradient(0deg, #0d1421 0%, transparent 55%); }
.detail-poster, .detail-copy { position: relative; z-index: 1; }
.detail-poster { width: 100%; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.48); }
.detail-copy h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.035em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: #b2bdcc; font-size: 13px; }
.detail-copy p { display: -webkit-box; overflow: hidden; max-width: 620px; margin: 17px 0 23px; color: #b7c0cd; line-height: 1.7; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status-pill { padding: 11px 14px; border: 1px solid rgba(94,224,160,.28); border-radius: 12px; background: rgba(36,125,80,.15); color: #a9f2c9; font-size: 13px; font-weight: 700; }

.tv-picker { padding: 2px 42px 42px; }
.picker-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 15px; }
.picker-heading h3 { margin: 0; font-size: 19px; }
.picker-heading span { color: var(--muted); font-size: 12px; }
.season-tabs { display: flex; gap: 9px; overflow-x: auto; padding: 1px 1px 14px; scrollbar-width: none; }
.season-tabs::-webkit-scrollbar { display: none; }
.season-tab { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); color: var(--muted); padding: 10px 14px; cursor: pointer; }
.season-tab.active { border-color: rgba(120,147,255,.5); background: rgba(93,116,241,.18); color: white; }
.season-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 4px 0 15px; padding: 13px 0; border-top: 1px solid var(--line); }
.season-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.season-request-button { min-height: 42px; padding: 10px 15px; font-size: 13px; }
.episode-list { display: grid; gap: 9px; }
.episode-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 13px; align-items: center; padding: 13px; border: 1px solid rgba(255,255,255,.075); border-radius: 14px; background: rgba(255,255,255,.025); }
.episode-number { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.065); color: #cad3e2; font-size: 12px; font-weight: 800; }
.episode-copy { min-width: 0; }
.episode-copy h4 { overflow: hidden; margin: 0 0 5px; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.episode-copy p { overflow: hidden; margin: 0; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.episode-button { min-height: 40px; padding: 9px 13px; border: 1px solid rgba(127,153,255,.28); background: rgba(92,115,237,.12); box-shadow: none; color: #dce4ff; font-size: 12px; }

.activity-list { display: grid; gap: 12px; }
.activity-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); backdrop-filter: blur(14px); }
.activity-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: rgba(103,128,255,.12); color: #a7b8ff; font-size: 22px; }
.activity-card h3 { margin: 0 0 5px; font-size: 15px; }
.activity-card p { margin: 0; color: var(--muted); font-size: 12px; }
.activity-status { min-width: 150px; color: #b9c5d7; text-align: right; font-size: 12px; font-weight: 700; }
.activity-status strong { display: block; color: #eef2ff; font-size: 15px; }
.download-bytes { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.progress { width: 120px; height: 5px; margin: 8px 0 0 auto; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }

.cloud-card { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(24px, 5vw, 46px); border: 1px solid var(--line); border-radius: 25px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.cloud-status-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(145deg, #ffd84e, #ff9f2e); color: #352200; box-shadow: 0 16px 38px rgba(255,170,42,.2); font-size: 30px; font-weight: 900; }
.cloud-status-icon.connected { background: linear-gradient(145deg, #66e6a6, #2dbb78); color: #062b1a; }
.cloud-copy h2 { margin: 0 0 9px; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.03em; }
.cloud-copy > p:not(.eyebrow) { max-width: 570px; margin: 0 0 22px; color: var(--muted); line-height: 1.65; }
.qr-panel { min-width: 280px; padding: 18px; display: grid; justify-items: center; border-radius: 20px; background: white; color: #111827; text-align: center; }
.qr-panel img { width: min(250px, 55vw); aspect-ratio: 1; display: block; }
.qr-panel strong { margin-top: 8px; font-size: 15px; }
.qr-panel span { margin-top: 5px; color: #64748b; font-size: 11px; }

.decision-backdrop { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(2,5,10,.78); backdrop-filter: blur(18px); }
.decision-card { width: min(430px, 100%); padding: clamp(26px, 6vw, 40px); border: 1px solid rgba(255,255,255,.14); border-radius: 25px; background: #101724; box-shadow: 0 26px 80px rgba(0,0,0,.52); text-align: center; }
.decision-icon { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,184,76,.14); color: #ffd08a; font-size: 27px; font-weight: 900; }
.decision-card h2 { margin: 0 0 12px; font-size: 26px; letter-spacing: -.025em; }
.decision-card > p { margin: 0; color: #a9b3c1; font-size: 14px; line-height: 1.75; }
.decision-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 27px; }
.decision-actions button { width: 100%; min-height: 48px; }
.decision-cancel { border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.055); color: #c2cad6; cursor: pointer; font-weight: 700; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(28px + var(--safe-bottom)); transform: translate(-50%, 24px); max-width: calc(100vw - 32px); padding: 13px 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(21,29,44,.95); box-shadow: 0 16px 50px rgba(0,0,0,.36); color: white; opacity: 0; pointer-events: none; transition: .25s ease; backdrop-filter: blur(15px); font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255,111,133,.35); color: #ffd7dd; }
.mobile-nav { display: none; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.login-wrap { width: 100%; }
.login-card { width: min(430px, 100%); margin: auto; padding: clamp(28px, 6vw, 46px); border: 1px solid var(--line); border-radius: 27px; background: rgba(15,22,35,.86); box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.login-brand { display: flex; gap: 13px; align-items: center; margin-bottom: 45px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.login-card h1 { margin: 0 0 9px; font-size: 34px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 29px; color: var(--muted); }
.login-form { display: grid; gap: 17px; }
.login-form label span { display: block; margin: 0 0 8px; color: #bdc7d5; font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-height: 51px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: rgba(255,255,255,.045); color: white; padding: 0 15px; font-size: 16px; }
.login-form input:focus { border-color: rgba(123,148,255,.6); box-shadow: 0 0 0 4px rgba(100,126,255,.1); }
.login-form button { margin-top: 5px; }
.form-error { min-height: 18px; color: #ff9aaa; text-align: center; font-size: 12px; }

@media (max-width: 760px) {
  .topbar { height: calc(65px + env(safe-area-inset-top, 0px)); grid-template-columns: 1fr auto; padding-left: 18px; padding-right: 18px; }
  .brand small, .desktop-nav { display: none; }
  .watch-button { padding: 9px 12px; font-size: 12px; }
  .view { padding: 0 16px calc(98px + var(--safe-bottom)); }
  .hero { padding: 58px 0 38px; text-align: left; }
  .hero h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero-copy { margin-left: 0; }
  .search-box { min-height: 61px; grid-template-columns: 22px 1fr; padding: 8px 14px; border-radius: 17px; }
  .search-box button { grid-column: 1 / -1; width: 100%; margin-top: 2px; }
  .quick-hints { justify-content: flex-start; }
  .quick-hints span:nth-child(2) { display: none; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 13px; }
  .poster { border-radius: 14px; }
  .section-heading { align-items: end; }
  .page-heading { padding: 48px 0 28px; }
  .library-heading { display: flex; }
  .secondary-button { padding: 9px 11px; font-size: 11px; }
  .mobile-nav { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); height: 65px; padding: 5px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(255,255,255,.11); border-radius: 20px; background: rgba(12,18,29,.9); box-shadow: 0 16px 50px rgba(0,0,0,.4); backdrop-filter: blur(24px) saturate(150%); }
  .mobile-nav button { border: 0; border-radius: 15px; background: transparent; color: #7f8b9f; font-size: 10px; font-weight: 700; }
  .mobile-nav button span { display: block; margin-bottom: 3px; color: inherit; font-size: 19px; }
  .mobile-nav button.active { background: rgba(255,255,255,.08); color: white; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal-panel { width: 100%; max-height: 93vh; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .detail-hero { min-height: 360px; padding: 62px 22px 28px; grid-template-columns: 105px 1fr; gap: 18px; }
  .detail-hero::before { height: 360px; }
  .detail-copy h2 { font-size: 29px; }
  .detail-copy p { margin: 12px 0 17px; font-size: 12px; -webkit-line-clamp: 3; }
  .detail-meta { font-size: 11px; }
  .primary-button { width: 100%; }
  .tv-picker { padding: 4px 18px calc(28px + var(--safe-bottom)); }
  .season-toolbar { align-items: flex-start; flex-direction: column; }
  .season-request-button { width: 100%; }
  .episode-row { grid-template-columns: 43px 1fr; padding: 11px; }
  .episode-button { grid-column: 1 / -1; width: 100%; }
  .activity-card { grid-template-columns: 47px 1fr; }
  .activity-icon { width: 47px; height: 47px; }
  .activity-status { grid-column: 2; min-width: 0; text-align: left; }
  .progress { margin-left: 0; }
  .cloud-card { grid-template-columns: 58px 1fr; gap: 17px; padding: 20px; }
  .cloud-status-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 25px; }
  .qr-panel { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .player-header { min-height: calc(61px + env(safe-area-inset-top, 0px)); grid-template-columns: 43px minmax(0, 1fr) auto; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .player-back { width: 39px; height: 39px; font-size: 30px; }
  .player-library-button { min-height: 37px; padding: 7px 11px; }
  .player-danmaku-button { width: 39px; height: 37px; }
  .player-fullscreen-button { width: 39px; height: 37px; }
  .player-details { padding: 25px 16px calc(36px + var(--safe-bottom)); }
  .player-series-copy { grid-template-columns: 92px 1fr; gap: 17px; align-items: center; margin-bottom: 26px; }
  .player-series-copy h2 { margin-bottom: 7px; font-size: 28px; }
  .player-series-copy div > p:last-child { font-size: 12px; -webkit-line-clamp: 3; }
  .player-episode-list { grid-template-columns: 1fr; }
  .decision-actions { grid-template-columns: 1fr; }
  .decision-cancel { order: 2; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
