/* ============================================================
   FLUX — Creative Cloud (placeholder site)
   Design system + components. Self-contained, no dependencies.
   ============================================================ */

:root {
  /* palette */
  --bg: #060912;
  --bg-2: #0a0f1e;
  --surface: #0f1626;
  --surface-2: #141d33;
  --surface-3: #1a2540;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #e6edf7;
  --muted: #93a3bd;
  --muted-2: #64748b;

  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --grad: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.12));
  --glow: 0 0 40px rgba(99, 102, 241, 0.35);

  /* type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* metrics */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --header-h: 68px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(34, 211, 238, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
::selection { background: rgba(99, 102, 241, 0.4); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-sm { padding: 48px 0; }
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--text);
  font-size: .95rem; font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: 0 0 55px rgba(34, 211, 238, 0.45); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-outline { background: transparent; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 13px; }
.btn-sm { padding: 7px 13px; font-size: .85rem; border-radius: 9px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(6, 9, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: var(--glow);
}
.brand .logo-mark svg { width: 20px; height: 20px; color: #fff; }
.brand small { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; display: block; line-height: 1; }

.main-nav { display: flex; gap: 6px; margin-left: 12px; }
.main-nav a {
  padding: 9px 14px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: .95rem;
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: 9px; padding: 8px; color: var(--text); }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- language switcher ---------- */
.lang-slot { position: relative; }
.lang-switch { position: relative; display: inline-flex; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); font-size: .85rem; font-weight: 700; letter-spacing: .03em;
  transition: transform .15s ease, border-color .2s, background .2s, box-shadow .2s;
}
.lang-btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--glow); }
.lang-btn svg { width: 17px; height: 17px; color: var(--accent-2); }
.lang-btn .chev { width: 14px; height: 14px; color: var(--muted); }
.lang-current { min-width: 12px; text-align: center; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 158px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow);
  display: none; z-index: 210;
}
.lang-menu.open { display: block; }
.lang-menu li { padding: 9px 12px; border-radius: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.lang-menu li:hover { background: var(--surface-3); color: var(--text); }
.lang-menu li.active { background: var(--surface-3); color: var(--accent-2); }
.lang-menu li.active span { font-weight: 700; }
@media (max-width: 720px) { .lang-btn { padding: 8px 10px; } }

/* ---------- hero ---------- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(99,102,241,.22), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-meta { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--success); }

/* ---------- hero visual / mock ---------- */
.mock-window {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.mock-dot { width: 11px; height: 11px; border-radius: 50%; background: #3a4763; }
.mock-dot.r { background: #f87171; } .mock-dot.y { background: #fbbf24; } .mock-dot.g { background: #34d399; }
.mock-url { margin-left: 12px; flex: 1; font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 7px; padding: 5px 12px; font-family: var(--mono); }
.mock-body { padding: 20px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card .icon-tile {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
}
.card .icon-tile svg { width: 24px; height: 24px; color: var(--accent-2); }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- stats ---------- */
.stats-band { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* ---------- pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-size: 2.6rem; font-weight: 800; margin: 6px 0 2px; }
.price-card .price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; flex: 1; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.price-card li svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 3px; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--glow); position: relative; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; background: var(--grad); color: #fff;
}
.price-card.featured .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }

/* ---------- forms ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 50px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.7rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.input, .select {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  color: var(--text); font-size: .97rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.input::placeholder { color: var(--muted-2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--muted); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: .8rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social-btn { padding: 11px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); display: grid; place-items: center; }
.social-btn svg { width: 20px; height: 20px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.auth-alt a { color: var(--accent-2); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 60px 0 34px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer-grid a { color: var(--muted); font-size: .93rem; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); font-size: .93rem; max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .85rem; flex-wrap: wrap; gap: 14px; }
.socials { display: flex; gap: 12px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }
.socials a:hover { color: var(--text); border-color: var(--border-strong); }
.socials svg { width: 17px; height: 17px; }

/* ---------- app layout ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.app-sidebar {
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 18px; font-weight: 800; font-size: 1.1rem; }
.side-brand .logo-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); }
.side-brand .logo-mark svg { width: 18px; height: 18px; color: #fff; }
.side-nav { display: grid; gap: 4px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); padding: 14px 12px 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; color: var(--muted); font-size: .93rem; font-weight: 500;
  transition: background .18s, color .18s;
}
.side-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.side-link:hover { color: var(--text); background: var(--surface); }
.side-link.active { color: var(--text); background: var(--surface-2); }
.side-link.active svg { color: var(--accent-2); }
.side-storage { margin-top: auto; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.side-storage .bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 10px 0 6px; }
.side-storage .bar span { display: block; height: 100%; width: 72%; background: var(--grad); border-radius: 99px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--border); margin-top: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; flex-shrink: 0; }
.side-user .who { line-height: 1.2; overflow: hidden; }
.side-user .who b { font-size: .9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: .76rem; color: var(--muted); }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  height: var(--header-h); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  position: sticky; top: 0; background: rgba(6,9,18,.7); backdrop-filter: blur(12px); z-index: 30;
}
.topbar-title { font-weight: 700; font-size: 1.12rem; }
.searchbox { margin-left: auto; position: relative; }
.searchbox input { width: 280px; max-width: 40vw; padding: 10px 14px 10px 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: .9rem; }
.searchbox svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; position: relative; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--bg-2); }
.app-content { padding: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; }

/* ---------- widgets / tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.tile .t-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.tile .t-num { font-size: 1.7rem; font-weight: 800; }
.tile .t-delta { font-size: .8rem; font-weight: 600; }
.t-delta.up { color: var(--success); } .t-delta.down { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel h3 { font-size: 1.05rem; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.panel h3 a { font-size: .82rem; font-weight: 600; color: var(--accent-2); }

/* sparkline / chart */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.chart .bar { flex: 1; background: var(--grad-soft); border: 1px solid var(--border); border-radius: 5px 5px 0 0; min-height: 8px; transition: height .4s ease; position: relative; }
.chart .bar:hover { background: var(--grad); border-color: transparent; }
.chart .bar b { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); opacity: 0; transition: opacity .2s; font-family: var(--mono); }
.chart .bar:hover b { opacity: 1; }

/* ---------- tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: 14px 18px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.file-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.file-name .f-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.file-name .f-ic svg { width: 18px; height: 18px; }
.f-ic.video { background: rgba(99,102,241,.18); color: #818cf8; }
.f-ic.image { background: rgba(34,211,238,.16); color: var(--accent-2); }
.f-ic.doc { background: rgba(52,211,153,.16); color: var(--success); }
.f-ic.audio { background: rgba(251,191,36,.16); color: var(--warning); }
.f-ic.zip { background: rgba(168,85,247,.16); color: var(--accent-3); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); display: grid; place-items: center; }
.row-actions button:hover { color: var(--text); background: var(--surface-3); }
.row-actions svg { width: 15px; height: 15px; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--border); }
.pill .d { width: 7px; height: 7px; border-radius: 50%; }
.pill.ok { color: var(--success); } .pill.ok .d { background: var(--success); }
.pill.warn { color: var(--warning); } .pill.warn .d { background: var(--warning); }
.pill.run { color: var(--accent-2); } .pill.run .d { background: var(--accent-2); animation: pulse 1.4s infinite; }
.pill.off { color: var(--muted); } .pill.off .d { background: var(--muted-2); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- toolbar / chips ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .86rem; font-weight: 500; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 4px; gap: 4px; }
.segmented button { padding: 7px 13px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: .85rem; font-weight: 500; display: inline-flex; gap: 7px; align-items: center; }
.segmented button.active { background: var(--surface-3); color: var(--text); }
.segmented svg { width: 15px; height: 15px; }

/* ---------- media grid (stream / files cards) ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.media-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.poster { aspect-ratio: 16/9; position: relative; display: grid; place-items: center; overflow: hidden; }
.poster .ph { position: absolute; inset: 0; opacity: .9; }
.poster .play {
  position: relative; z-index: 2; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(6,9,18,.55); border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; backdrop-filter: blur(4px);
  transition: transform .2s, background .2s;
}
.media-card:hover .play { transform: scale(1.1); background: var(--grad); }
.poster .play svg { width: 22px; height: 22px; color: #fff; margin-left: 3px; }
.poster .tag { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 9px; border-radius: 7px; font-size: .68rem; font-weight: 700; background: rgba(6,9,18,.7); backdrop-filter: blur(4px); border: 1px solid var(--border); }
.poster .dur { position: absolute; bottom: 10px; right: 10px; z-index: 2; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-family: var(--mono); background: rgba(6,9,18,.75); }
.media-card .m-body { padding: 14px 16px; }
.media-card .m-body h4 { font-size: .98rem; margin-bottom: 4px; }
.media-card .m-body .m-sub { color: var(--muted); font-size: .82rem; }

/* gradient posters (no external images needed) */
.ph-1 { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.ph-2 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.ph-3 { background: linear-gradient(135deg, #0891b2, #22c55e); }
.ph-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ph-5 { background: linear-gradient(135deg, #2563eb, #a855f7); }
.ph-6 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.ph-7 { background: linear-gradient(135deg, #ef4444, #8b5cf6); }
.ph-8 { background: linear-gradient(135deg, #d97706, #22d3ee); }

/* ---------- video editor ---------- */
.editor { display: grid; grid-template-columns: 260px 1fr 260px; gap: 16px; height: calc(100vh - var(--header-h) - 56px); min-height: 560px; }
.editor-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.editor-col .col-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: space-between; }
.editor-col .col-body { padding: 14px; overflow: auto; flex: 1; }
.preview { flex: 1; background: #000; display: grid; place-items: center; position: relative; min-height: 220px; }
.preview .ratio { width: 82%; aspect-ratio: 16/9; border-radius: 8px; background: linear-gradient(135deg,#1e293b,#0f172a); display: grid; place-items: center; color: var(--muted); border: 1px solid var(--border); }
.preview .ratio svg { width: 46px; height: 46px; opacity: .6; }
.preview .safe { position: absolute; width: 40%; height: 40%; border: 1px dashed rgba(255,255,255,.18); border-radius: 6px; }
.timeline-wrap { border-top: 1px solid var(--border); background: var(--bg-2); padding: 14px 16px; }
.timeline-ruler { display: flex; gap: 3px; margin-bottom: 8px; font-family: var(--mono); font-size: .66rem; color: var(--muted-2); }
.timeline-ruler span { flex: 1; border-left: 1px solid var(--border); padding-left: 5px; }
.track { margin-bottom: 10px; display: flex; gap: 4px; align-items: stretch; }
.track-label { width: 46px; font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.track-label svg { width: 13px; height: 13px; }
.clips { flex: 1; display: flex; gap: 4px; height: 40px; }
.clip { border-radius: 6px; flex: 1; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.clip.v1 { background: linear-gradient(135deg,#6366f1,#22d3ee); }
.clip.v2 { background: linear-gradient(135deg,#a855f7,#ec4899); }
.clip.a1 { background: repeating-linear-gradient(90deg, #34d399 0 6px, #059669 6px 12px); opacity: .8; }
.clip.a2 { background: repeating-linear-gradient(90deg, #fbbf24 0 6px, #d97706 6px 12px); opacity: .8; }
.clip .c-tag { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: .62rem; color: rgba(255,255,255,.85); white-space: nowrap; }
.clip.wide { flex: 2.2; } .clip.narrow { flex: .7; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

/* properties list */
.prop-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.prop-row:last-child { border-bottom: none; }
.prop-row .k { color: var(--muted); }
.prop-row .v { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); position: relative; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left .2s, background .2s; }
.switch.on { background: var(--grad); }
.switch.on::after { left: 18px; background: #fff; }
.slider-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.slider-row:last-child { border-bottom: none; }
.slider-row .s-head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 9px; }
.slider-row .s-head .k { color: var(--muted); }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px; background: var(--surface-3); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--grad); cursor: pointer; box-shadow: 0 0 8px rgba(99,102,241,.6); }
.slider::-moz-range-thumb { width: 15px; height: 15px; border: none; border-radius: 50%; background: #22d3ee; cursor: pointer; }

/* media asset list (editor left) */
.asset { display: flex; gap: 11px; align-items: center; padding: 9px; border-radius: 10px; border: 1px solid transparent; }
.asset:hover { background: var(--surface-2); border-color: var(--border); }
.asset .a-thumb { width: 46px; height: 34px; border-radius: 7px; flex-shrink: 0; }
.asset .a-info { min-width: 0; flex: 1; }
.asset .a-info b { font-size: .85rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .a-info span { font-size: .74rem; color: var(--muted); font-family: var(--mono); }

/* ---------- upload / dropzone ---------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--muted);
  background: var(--surface); transition: border-color .2s, background .2s;
}
.dropzone.drag { border-color: var(--accent-2); background: var(--surface-2); }
.dropzone svg { width: 42px; height: 42px; color: var(--accent-2); margin: 0 auto 12px; }
.dropzone .dz-title { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.upload-row { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.upload-row:last-child { border-bottom: none; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 120px; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s ease; }

/* ---------- player (watch) ---------- */
.player-shell { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.player { background: #000; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); position: relative; }
.player video, .player canvas.flux-player { width: 100%; aspect-ratio: 16/9; background: #000; object-fit: contain; display: block; }
.player .p-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at center, rgba(6,9,18,.2), rgba(6,9,18,.75));
  transition: opacity .25s; cursor: pointer;
}
.player .p-overlay.hidden { opacity: 0; pointer-events: none; }
.player .big-play { width: 84px; height: 84px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: var(--glow); }
.player .big-play svg { width: 34px; height: 34px; color: #fff; margin-left: 4px; }
.player .p-controls {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  display: flex; flex-direction: column; gap: 10px;
}
.p-progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.22); cursor: pointer; position: relative; }
.p-progress .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--grad); border-radius: 99px; }
.p-progress .knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); box-shadow: 0 0 8px rgba(0,0,0,.5); }
.p-bar { display: flex; align-items: center; gap: 16px; }
.p-bar button { background: none; border: none; color: #fff; display: grid; place-items: center; padding: 4px; }
.p-bar button svg { width: 22px; height: 22px; }
.p-time { font-family: var(--mono); font-size: .82rem; color: #e2e8f0; }
.p-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.p-quality { font-size: .78rem; font-weight: 700; border: 1px solid rgba(255,255,255,.4); padding: 3px 9px; border-radius: 7px; color: #fff; background: none; cursor: pointer; }

/* related list */
.related { display: grid; gap: 14px; }
.rel-item { display: flex; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid transparent; }
.rel-item:hover { background: var(--surface); border-color: var(--border); }
.rel-item .r-thumb { width: 128px; aspect-ratio: 16/9; border-radius: 9px; flex-shrink: 0; position: relative; display: grid; place-items: center; }
.rel-item .r-thumb .dur { position: absolute; bottom: 6px; right: 6px; font-size: .64rem; font-family: var(--mono); background: rgba(0,0,0,.7); padding: 1px 6px; border-radius: 5px; }
.rel-item .r-info { min-width: 0; }
.rel-item .r-info h5 { font-size: .92rem; margin: 0 0 4px; line-height: 1.3; }
.rel-item .r-info .m-sub { color: var(--muted); font-size: .8rem; }

/* ---------- misc ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--muted-2); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; opacity: .5; margin: 0 auto 14px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 100;
  opacity: 0; transition: opacity .25s, transform .25s; font-size: .92rem; display: flex; gap: 10px; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; color: var(--success); }

/* ---------- 404 ---------- */
.err-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.err-wrap .code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .cols-2, .player-shell { grid-template-columns: 1fr; }
  .tiles, .stats-band, .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .editor { grid-template-columns: 1fr; height: auto; }
  .editor-col { min-height: 260px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 14px; gap: 4px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-actions .btn-ghost { display: none; }
  .app { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: -260px; width: 244px; transition: left .25s; z-index: 60; }
  .app-sidebar.open { left: 0; }
  .tiles, .stats-band, .cols-3, .cols-4, .footer-grid, .social-row { grid-template-columns: 1fr; }
  .searchbox { display: none; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
}
.sidebar-scrim { display: none; }
.sidebar-scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }
.side-toggle { display: none; }
@media (max-width: 720px) { .side-toggle { display: grid; } }
