:root {
  --bg: #08080c;
  --bg-2: #111118;
  --bg-3: #1a1a24;
  --line: #2a2a38;
  --text: #f4f4f7;
  --muted: #9a9aad;
  --accent: #ff2d55;
  --accent-2: #ff9f0a;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 30px; letter-spacing: 1px; line-height: 1; }
.logo b { font-weight: 400; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); position: relative; box-shadow: 0 0 18px rgba(255, 45, 85, .45), inset 0 0 0 3px rgba(0, 0, 0, .25); flex: none; }
.logo-icon::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); }
.logo-icon::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.logo-lg { font-size: 44px; }
.logo-lg .logo-icon { width: 46px; height: 46px; }
.logo-lg .logo-icon::before { inset: 7px; }
.logo-lg .logo-icon::after { left: 18px; top: 13px; border-left-width: 15px; border-top-width: 10px; border-bottom-width: 10px; }

/* ------------------------------------------------------------------ intro */
.intro { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; overflow: hidden; perspective: 900px; transition: opacity .6s ease, visibility .6s; }
.intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-rays { position: absolute; width: 200vmax; height: 200vmax; background: repeating-conic-gradient(from 0deg, rgba(255, 45, 85, .14) 0 6deg, transparent 6deg 18deg, rgba(255, 159, 10, .1) 18deg 24deg, transparent 24deg 36deg); mask-image: radial-gradient(circle, #000 0, transparent 45%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%); opacity: 0; animation: rays-in 1.2s .9s ease forwards, spin 14s linear infinite; }
.intro-beam { position: absolute; height: 2px; width: 0; background: linear-gradient(90deg, transparent, #fff, var(--accent), var(--accent-2), #fff, transparent); box-shadow: 0 0 24px 4px rgba(255, 80, 60, .7); animation: beam 1.3s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-logo { position: relative; display: flex; align-items: center; gap: 18px; animation: logo-out .9s 2.75s cubic-bezier(.6, 0, .8, .2) forwards; }
.intro-icon { width: clamp(64px, 11vw, 120px); aspect-ratio: 1; border-radius: 50%; position: relative; background: var(--grad); display: grid; place-items: center; transform: scale(0) rotate(-120deg); box-shadow: 0 0 60px rgba(255, 45, 85, .6); animation: icon-in .8s .45s cubic-bezier(.3, 1.6, .5, 1) forwards, glow 1.6s 1.3s ease-in-out infinite alternate; }
.intro-icon::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .55); }
.intro-icon svg { width: 62%; height: 62%; position: relative; }
.intro-word { font-family: var(--display); font-size: clamp(54px, 12vw, 150px); letter-spacing: 3px; line-height: 1; display: flex; transform-style: preserve-3d; }
.intro-word span { display: inline-block; opacity: 0; transform: translateY(60px) rotateX(-95deg); filter: blur(10px); animation: letter-in .7s calc(.8s + var(--i) * .065s) cubic-bezier(.2, 1.3, .4, 1) forwards; }
.intro-word span.t { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-shine { position: absolute; inset: -20px -40px; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%); mix-blend-mode: overlay; transform: translateX(-120%); animation: shine .9s 1.9s ease-in-out forwards; pointer-events: none; }
.intro-tagline { position: absolute; bottom: 22%; letter-spacing: .4em; text-transform: uppercase; font-size: clamp(11px, 1.6vw, 15px); color: #ddd; opacity: 0; animation: fade-up .8s 1.9s ease forwards, fade-out .4s 2.7s ease forwards; }
.intro-streaks { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 1.2vw; opacity: 0; animation: streaks 1s 2.75s ease-in forwards; }
.intro-streaks i { display: block; width: 1.4vw; min-width: 6px; height: 100vh; border-radius: 99px; transform: scaleY(0); background: linear-gradient(transparent, var(--c), transparent); animation: streak 1s calc(2.75s + var(--d)) cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-skip { position: absolute; right: 24px; bottom: 24px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; padding: 8px 16px; border-radius: 99px; cursor: pointer; opacity: 0; animation: fade-up .5s .6s forwards; }
.intro-skip:hover { background: rgba(255, 255, 255, .18); }

@keyframes beam { 0% { width: 0; opacity: 1; } 60% { width: 90vw; opacity: 1; } 100% { width: 90vw; opacity: 0; } }
@keyframes icon-in { to { transform: scale(1) rotate(0); } }
@keyframes glow { to { box-shadow: 0 0 100px rgba(255, 120, 40, .9); } }
@keyframes letter-in { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes rays-in { to { opacity: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes logo-out { 0% { transform: scale(1); opacity: 1; filter: blur(0); } 100% { transform: scale(7); opacity: 0; filter: blur(12px); } }
@keyframes streaks { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes streak { to { transform: scaleY(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .intro *, .intro { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ------------------------------------------------------------------ buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 700; cursor: pointer; transition: transform .15s, filter .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(255, 45, 85, .3); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: #ddd; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--text); border: 1px solid rgba(255, 255, 255, .12); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-danger { background: #3a1016; color: #ff6b81; border: 1px solid #5c1a24; }
.btn-danger:hover { background: #5c1a24; color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }
.link:hover { color: var(--text); }

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > span { font-size: 14px; font-weight: 600; color: #cfcfdc; }
.field small { color: var(--muted); font-weight: 400; }
.req { color: var(--accent); }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea { width: 100%; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 45, 85, .2); }
textarea { resize: vertical; min-height: 100px; }
select option, select optgroup { background: var(--bg-2); }
.form-error { color: #ff6b81; min-height: 1.2em; margin: -6px 0 12px; font-size: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ------------------------------------------------------------------ login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: hidden; }
.login-bg { position: absolute; inset: -20%; background: radial-gradient(circle at 20% 30%, rgba(255, 45, 85, .35), transparent 40%), radial-gradient(circle at 80% 70%, rgba(255, 159, 10, .28), transparent 40%), radial-gradient(circle at 60% 20%, rgba(120, 60, 255, .2), transparent 40%); filter: blur(30px); animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(5%, -4%) rotate(8deg) scale(1.1); } }
.login-card { position: relative; width: min(420px, 100%); background: rgba(17, 17, 24, .78); backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 38px 32px 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: fade-up .6s ease; }
.login-card h1 { margin: 26px 0 4px; font-size: 26px; }
.login-card p.muted { margin: 0 0 24px; }

/* ------------------------------------------------------------------ nav */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 14px 4vw; background: linear-gradient(rgba(8, 8, 12, .95), rgba(8, 8, 12, .75)); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.nav-links { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: #c6c6d4; font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .15s, background .15s; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-links a.active { color: #fff; background: rgba(255, 45, 85, .16); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 99px; padding: 0 12px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; background: transparent; padding: 8px 0; width: 170px; box-shadow: none !important; }

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav-links { order: 3; width: 100%; }
  .search input { width: 110px; }
}

/* ------------------------------------------------------------------ layout */
.view { min-height: calc(100vh - 140px); padding-bottom: 40px; animation: fade-up .35s ease; }
.page { padding: 34px 4vw; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.back { color: var(--muted); font-weight: 600; display: inline-block; margin-bottom: 10px; }
.back:hover { color: #fff; }
.footer { display: flex; gap: 18px; justify-content: center; align-items: center; padding: 26px; color: #777; font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .05); flex-wrap: wrap; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: min(68vh, 620px); display: flex; align-items: flex-end; padding: 0 4vw 60px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); animation: hero-zoom 20s ease-out forwards; }
@keyframes hero-zoom { to { transform: scale(1.15); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 8, 12, .95) 0%, rgba(8, 8, 12, .55) 45%, transparent 75%), linear-gradient(0deg, var(--bg) 0%, transparent 45%); }
.hero-content { position: relative; z-index: 1; max-width: 620px; animation: fade-up .7s ease; }
.hero-kicker { font-weight: 800; letter-spacing: .25em; font-size: 12px; text-transform: uppercase; color: var(--accent-2); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 8vw, 96px); line-height: .95; margin: 10px 0 14px; letter-spacing: 1px; }
.hero p { color: #d4d4de; font-size: 17px; line-height: 1.5; margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; color: #ccc; font-weight: 600; font-size: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ rows & cards */
.row { padding: 0 4vw; margin: 34px 0; }
.row-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.row-head h2 { margin: 0; font-size: 21px; }
.row-head a { color: var(--muted); font-size: 14px; font-weight: 600; }
.row-head a:hover { color: var(--accent-2); }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 14px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

.card { position: relative; border: 0; padding: 0; background: var(--bg-2); border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; scroll-snap-align: start; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; aspect-ratio: 16 / 10; }
.card:hover, .card:focus-visible { transform: scale(1.06); z-index: 2; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 159, 10, .6); outline: none; }
.card img, .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster { display: grid; place-items: center; padding: 14px; font-family: var(--display); font-size: 30px; text-align: center; line-height: 1; letter-spacing: 1px; color: rgba(255, 255, 255, .92); }
.card-info { position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .92)); }
.card-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { display: flex; gap: 8px; align-items: center; margin-top: 5px; font-size: 12px; color: #bbb; }
.card-play { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(0, 0, 0, .55); border: 2px solid #fff; opacity: 0; transform: scale(.7); transition: .2s; }
.card-play::after { content: ""; position: absolute; left: 19px; top: 14px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.card:hover .card-play { opacity: 1; transform: scale(1); }

.badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: .02em; border: 1.5px solid var(--c, #888); color: var(--c, #ccc); background: rgba(0, 0, 0, .35); white-space: nowrap; }
.badge-lg { font-size: 22px; padding: 6px 14px; border-radius: 10px; border-width: 2.5px; min-width: 92px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 600; }

.empty { text-align: center; padding: 90px 20px; }
.empty-icon { font-size: 64px; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.empty h2 { margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }

/* ------------------------------------------------------------------ folders */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.folder { position: relative; display: block; padding-top: 18px; transition: transform .2s; }
.folder:hover { transform: translateY(-6px); }
.folder-back { position: absolute; top: 0; left: 0; width: 45%; height: 30px; border-radius: 12px 12px 0 0; background: var(--fc); filter: brightness(.75); }
.folder-body { position: relative; aspect-ratio: 16 / 10; border-radius: 4px 14px 14px 14px; background: linear-gradient(160deg, var(--fc), color-mix(in srgb, var(--fc) 55%, #000)); overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.folder-peek { position: absolute; inset: 14px 14px auto; display: flex; gap: 6px; }
.folder-peek > * { position: relative; flex: 1; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .25); transform: rotate(var(--r)); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.folder-peek .poster { font-size: 13px; padding: 4px; }
.folder-label { position: absolute; inset: auto 0 0 0; padding: 12px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.folder-label strong { display: block; font-size: 19px; }
.folder-label span { font-size: 13px; color: rgba(255, 255, 255, .8); }

/* ------------------------------------------------------------------ ratings page */
.rating-group { margin-bottom: 44px; }
.rating-group > h2 { margin: 0 0 4px; font-size: 26px; }
.rating-group > p { margin: 0 0 18px; color: var(--muted); }
.rating-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.rating-card { background: var(--bg-2); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .3s; }
.rating-card.flash { box-shadow: 0 0 0 3px var(--c), 0 0 40px color-mix(in srgb, var(--c) 40%, transparent); }
.rating-card header { display: flex; align-items: center; gap: 16px; }
.rating-card h3 { margin: 0; font-size: 19px; }
.rating-card .age { color: var(--c); font-weight: 700; font-size: 14px; }
.rating-card p { margin: 0; line-height: 1.55; color: #d4d4de; }
.rating-card ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.7; }
.rating-card footer { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.rating-card footer a { color: var(--accent-2); font-weight: 600; }

/* ------------------------------------------------------------------ upload */
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 30px; align-items: start; }
@media (max-width: 900px) { .upload-layout { grid-template-columns: 1fr; } }
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; aspect-ratio: 16 / 10; border: 2px dashed #3a3a4c; border-radius: 18px; background: var(--bg-2); cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; padding: 20px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #1a1018; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { font-size: 46px; }
.dropzone strong { font-size: 18px; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone.has-file { border-style: solid; border-color: var(--line); }
.dz-file { position: absolute; inset: auto 0 0 0; padding: 30px 16px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); text-align: left; font-size: 14px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.progress { height: 10px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.progress div { height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.notice { background: rgba(255, 159, 10, .08); border: 1px solid rgba(255, 159, 10, .3); color: #ffd18a; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; margin-top: 16px; }
.rating-hint { font-size: 13px; color: var(--muted); margin-top: -10px; margin-bottom: 16px; min-height: 1.2em; }

/* ------------------------------------------------------------------ admin */
.admin-login { max-width: 420px; margin: 40px auto; text-align: center; }
.admin-login .lock { font-size: 54px; margin-bottom: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 14px; }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-tools input { max-width: 300px; }
.table-wrap { overflow-x: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-3); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, .02); }
.t-thumb { position: relative; width: 96px; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--bg-3); }
.t-thumb .poster { font-size: 14px; padding: 4px; }
.t-name { font-weight: 700; }
.t-desc { color: var(--muted); font-size: 13px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-actions { display: flex; gap: 8px; justify-content: flex-end; }
.status-up { color: var(--accent-2); font-weight: 700; font-size: 13px; }
.section-title { margin: 36px 0 14px; font-size: 22px; }
.folder-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.folder-admin > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); animation: fade-in .2s; }
.modal-box { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 90px rgba(0, 0, 0, .7); animation: pop .3s cubic-bezier(.2, 1.2, .4, 1); }
.modal-box.small { width: min(520px, 100%); padding: 28px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(20px); } }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; cursor: pointer; }
.modal-close:hover { background: rgba(0, 0, 0, .9); }
.detail-hero { position: relative; aspect-ratio: 16 / 8; background: var(--bg-3); }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg-2)); }
.detail-hero .poster { font-size: 54px; }
.detail-body { padding: 0 30px 30px; margin-top: -60px; position: relative; z-index: 1; }
.detail-body h2 { font-family: var(--display); font-weight: 400; font-size: 52px; margin: 0 0 10px; letter-spacing: 1px; line-height: 1; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; color: #ccc; font-size: 14px; }
.detail-desc { color: #d4d4de; line-height: 1.6; white-space: pre-wrap; margin: 0 0 22px; }
.rating-explain { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-3); border-radius: 12px; padding: 14px 16px; margin-top: 22px; font-size: 14px; color: #cfcfdc; line-height: 1.5; }
.rating-explain a { color: var(--accent-2); font-weight: 600; }

/* ------------------------------------------------------------------ player */
.player { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; flex-direction: column; animation: fade-in .3s; }
.player-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-weight: 700; }
.player video, .player iframe { flex: 1; width: 100%; min-height: 0; background: #000; border: 0; }
.player-top #player-drive-link { margin-left: auto; }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 400; transform: translate(-50%, 30px); background: #fff; color: #000; padding: 12px 20px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: .3s; max-width: calc(100vw - 40px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #ff4d6a; color: #fff; }

/* ------------------------------------------------------------------ google drive */
.tabs { display: inline-flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 5px; margin-bottom: 22px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 16px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab:hover { color: #fff; }
.tab.active { background: var(--bg-3); color: #fff; box-shadow: 0 0 0 1px var(--line); }
.gd-logo { width: 18px; height: 16px; background: conic-gradient(from 210deg, #0f9d58 0 120deg, #4285f4 120deg 240deg, #f4b400 240deg 360deg); clip-path: polygon(50% 0, 100% 86%, 0 86%); display: inline-block; }
.drive-help h3 { margin: 0 0 12px; }
.drive-help ol { margin: 0; padding-left: 20px; line-height: 1.9; color: #d4d4de; }
.drive-help a { color: var(--accent-2); font-weight: 600; }
.drive-preview { margin-top: 16px; }
.drive-preview img, .drive-preview .poster { position: relative; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--bg-3); }
.drive-preview p { font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
.drive-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #8ab4f8; background: rgba(66, 133, 244, .15); border: 1px solid rgba(66, 133, 244, .4); }
a.drive-chip:hover { background: rgba(66, 133, 244, .3); }

.drive-admin { margin-bottom: 10px; }
.drive-admin h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.drive-admin p { line-height: 1.55; }
.drive-admin a:not(.btn) { color: var(--accent-2); }
.drive-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.drive-head h3 { margin: 0; }
.ok-dot { color: #22c55e; font-weight: 700; font-size: 14px; }
.small { font-size: 13px; }
.space { margin: 10px 0 4px; font-size: 14px; color: #ddd; }
.space .progress { height: 12px; margin-bottom: 6px; }
.drive-space { color: #dbe7ff; background: rgba(66, 133, 244, .08); border-color: rgba(66, 133, 244, .35); }
.inline-form { display: inline-flex; align-items: center; gap: 8px; }
.inline-form label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.inline-form input { width: 90px; padding: 7px 10px; }
.steps { line-height: 1.8; color: #d4d4de; padding-left: 20px; }
.steps a { color: var(--accent-2); font-weight: 600; }
code.copy { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--line); user-select: all; word-break: break-all; }
.creds-form { max-width: 520px; margin-top: 10px; }
details summary { cursor: pointer; color: var(--muted); margin-top: 14px; }
.count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; background: var(--grad); font-size: 15px; vertical-align: middle; }
.review-list { display: grid; gap: 10px; }
.review-item { display: flex; align-items: center; gap: 14px; background: var(--bg-2); border: 1px solid rgba(255, 159, 10, .35); border-radius: 12px; padding: 10px 14px; }
.review-info { flex: 1; min-width: 0; }
.review-info .t-desc { max-width: none; white-space: normal; }
@media (max-width: 700px) { .review-item { flex-wrap: wrap; } }

.off-dot { color: var(--muted); font-weight: 700; font-size: 14px; }
.drive-steps { display: grid; gap: 14px; margin-top: 14px; }
.dstep { display: flex; gap: 16px; padding: 18px; border-radius: 14px; background: var(--bg-3); border: 1px solid var(--line); }
.dstep.done { border-color: rgba(34, 197, 94, .45); }
.dnum { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--grad); }
.dstep.done .dnum { background: #16a34a; }
.dbody { flex: 1; min-width: 0; }
.dbody h4 { margin: 4px 0 8px; font-size: 18px; }
.dbody p { margin: 6px 0 10px; }
.btn-lg { padding: 14px 24px; font-size: 17px; }
.btn.disabled { opacity: .45; pointer-events: none; }
.link-locked { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.chip-btn { border: 1px solid var(--line); background: var(--bg-2); padding: 8px 14px; border-radius: 99px; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent-2); }
.chip-btn.active { background: var(--grad); border-color: transparent; }
.alloc-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.alloc-row input[type=range] { flex: 1; min-width: 180px; accent-color: var(--accent); }
.alloc-num { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.alloc-num input { width: 100px; padding: 8px 10px; }
#alloc-hint { line-height: 1.6; margin: 10px 0 0; }
.warn { color: #fbbf24; }

/* ------------------------------------------------------------------ storage charts */
.viz-root { position: relative; margin: 14px 0 6px; --surface-1: var(--bg-2); }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.viz-title { margin: 0; font-size: 18px; }
.viz-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.viz-sub b { color: var(--text); }
.stackbar { display: flex; gap: 2px; height: 46px; background: var(--surface-1); }
.seg { position: relative; min-width: 3px; background: var(--c); display: flex; align-items: center; overflow: hidden; outline: none; transition: filter .15s; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg:only-child { border-radius: 4px; }
.seg:hover, .seg:focus-visible { filter: brightness(1.18); }
.seg:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.seg-free { background: repeating-linear-gradient(135deg, #24242f 0 6px, #1c1c25 6px 12px); }
.seg-label { padding: 0 8px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.seg-free .seg-label { color: var(--muted); text-shadow: none; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 12px 0 0; font-size: 14px; color: var(--text); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none; }
.sw-free { background: repeating-linear-gradient(135deg, #3a3a48 0 3px, #24242f 3px 6px); border: 1px solid var(--line); }
.lg-val { color: var(--muted); }
.mrows { display: grid; gap: 4px; margin-top: 12px; }
.mrow { display: grid; grid-template-columns: minmax(120px, 240px) 1fr 80px; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 6px; outline: none; }
.mrow:hover, .mrow:focus-visible { background: rgba(255, 255, 255, .04); }
.mrow:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }
.mname { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtrack { height: 14px; }
.mbar { display: block; height: 100%; background: var(--c); border-radius: 0 4px 4px 0; min-width: 3px; }
.mval { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
#viz-more { margin-top: 10px; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: #f4f4f7; color: #111; padding: 8px 11px; border-radius: 8px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-width: 280px; }
.viz-tip .tip-muted { color: #555; }
.viz-table { width: 100%; min-width: 0; margin-top: 4px; }
.viz-table th, .viz-table td { padding: 8px 10px; }
@media (max-width: 640px) { .mrow { grid-template-columns: 1fr 70px; } .mtrack { grid-column: 1 / -1; grid-row: 2; } }

/* ------------------------------------------------------------------ legal pages */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.65; color: #d4d4de; }
.legal .logo { margin-bottom: 26px; }
.legal h1 { color: var(--text); margin: 0 0 4px; font-size: 34px; }
.legal h2 { color: var(--text); margin: 30px 0 8px; font-size: 21px; }
.legal a:not(.logo) { color: var(--accent-2); }
.legal ul { padding-left: 22px; }
.login-legal { text-align: center; margin: 18px 0 0; font-size: 13px; } .login-legal a { color: var(--muted); } .login-legal a:hover { color: #fff; }

/* ------------------------------------------------------------------ processing */
.processing-wait { max-width: 640px; margin: 30px auto; text-align: center; }
.processing-wait h1 { font-size: 26px; margin: 16px 0 10px; }
.processing-wait p { line-height: 1.6; }
.processing-wait .hero-actions { justify-content: center; margin-top: 18px; }
.spinner { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; border: 5px solid var(--bg-3); border-top-color: var(--accent); border-right-color: var(--accent-2); animation: spin 1s linear infinite; }
td .link.small { display: block; margin-top: 4px; font-size: 13px; }

/* ------------------------------------------------------------------ invite templates */
.modal-box.wide { width: min(1060px, 100%); }
.invite { padding: 28px; }
.invite-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 26px; margin-top: 16px; }
@media (max-width: 820px) { .invite-grid { grid-template-columns: 1fr; } }
.invite-out .tabs { margin-bottom: 14px; }
.invite-out textarea { font-family: var(--font); line-height: 1.55; background: #0d0d13; resize: vertical; }
.invite-out input[readonly], .invite-out textarea[readonly] { cursor: text; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #cfcfdc; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
