:root {
  --bg: #08080c;
  --bg-elev: #111119;
  --bg-card: #161622;
  --glass: rgba(18, 18, 28, 0.82);
  --glass-strong: rgba(14, 14, 22, 0.94);
  --border: rgba(255, 255, 255, 0.085);
  --border-bright: rgba(255, 255, 255, 0.16);
  --text: #f5f7fb;
  --text-dim: #a1a6b8;
  --text-muted: #6c7288;
  --cyan: #00f2ea;
  --pink: #ff2a5f;
  --violet: #8b5cf6;
  --green: #10b981;
  --amber: #f59e0b;
  --header-h: 62px;
  --sidebar-w: 252px;
  --mobile-bar-h: 64px;
  --radius: 16px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

[hidden] {
  display: none !important;
}

/* Custom sleek scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }

/* ===================== BRAND MARK ===================== */
.brand-logo-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #101018;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: -2px 0 14px rgba(0, 242, 234, 0.25), 2px 0 14px rgba(255, 42, 95, 0.25);
}

.brand-logo-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-logo-mark .mark-cyan {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cyan);
  filter: blur(11px);
  top: -6px;
  left: -6px;
  opacity: 0.75;
}

.brand-logo-mark .mark-pink {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  filter: blur(11px);
  bottom: -6px;
  right: -6px;
  opacity: 0.75;
}

.brand-logo-mark .mark-core {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  text-shadow: -1.5px 0 0 var(--cyan), 1.5px 0 0 var(--pink);
}

.brand-logo-mark.small .mark-core {
  font-size: 16px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #ffffff 30%, #bffef9 70%, #ffc2d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== DEVICE PICKER GATE ===================== */
.device-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 20%, rgba(0, 242, 234, 0.14), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(255, 42, 95, 0.16), transparent 45%),
              rgba(6, 6, 10, 0.94);
  backdrop-filter: blur(28px);
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.gate-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-1 { width: 320px; height: 320px; background: var(--cyan); top: -80px; left: -60px; }
.orb-2 { width: 360px; height: 360px; background: var(--pink); bottom: -100px; right: -80px; }
.orb-3 { width: 260px; height: 260px; background: var(--violet); top: 40%; left: 50%; transform: translate(-50%, -50%); opacity: 0.22; }

.gate-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  background: rgba(16, 16, 24, 0.86);
  border: 1px solid var(--border-bright);
  border-radius: 28px;
  padding: 36px 32px 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.gate-brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(0, 242, 234, 0.18), rgba(255, 42, 95, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

.gate-heading {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gate-sub {
  margin: 0 auto 26px;
  max-width: 480px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.gate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.gate-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.gate-choice:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(0, 242, 234, 0.55);
  box-shadow: 0 14px 36px rgba(0, 242, 234, 0.12);
}

.gate-choice[data-choose-device="desktop"]:hover {
  border-color: rgba(255, 42, 95, 0.58);
  box-shadow: 0 14px 36px rgba(255, 42, 95, 0.14);
}

.gate-choice.recommended {
  border-color: rgba(0, 242, 234, 0.45);
  background: linear-gradient(145deg, rgba(0, 242, 234, 0.08), rgba(255, 42, 95, 0.06));
}

.gate-detect-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(0, 242, 234, 0.18);
  border: 1px solid rgba(0, 242, 234, 0.4);
  color: var(--cyan);
}

.gate-choice-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: #fff;
}

.gate-choice-icon svg {
  width: 26px;
  height: 26px;
}

.gate-choice-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}

.gate-choice-desc {
  font-size: 13px;
  line-height: 1.48;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex: 1;
}

.gate-choice-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
}

.gate-choice[data-choose-device="desktop"] .gate-choice-cta {
  color: #ff6b8f;
}

.gate-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .gate-card { padding: 24px 18px 20px; border-radius: 22px; }
  .gate-options { grid-template-columns: 1fr; gap: 12px; }
  .gate-choice { padding: 16px; }
  .gate-choice-icon { width: 42px; height: 42px; margin-bottom: 10px; }
}

/* ===================== APP SHELL & DEVICE MODE SWITCHING ===================== */
.app-shell {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* ---------- DESKTOP MODE ---------- */
body[data-device="desktop"] .mobile-topbar,
body[data-device="desktop"] .mobile-bottom-bar,
body[data-device="desktop"] .mobile-search-inline {
  display: none !important;
}

/* ---------- MOBILE MODE ---------- */
body[data-device="mobile"] .desktop-header,
body[data-device="mobile"] .desktop-sidebar,
body[data-device="mobile"] .desktop-context-panel,
body[data-device="mobile"] .desktop-feed-arrows {
  display: none !important;
}

/* When user selects Mobile mode on a wide desktop screen -> crisp centered phone stage! */
@media (min-width: 561px) {
  body[data-device="mobile"] {
    background: radial-gradient(circle at 20% 20%, rgba(0, 242, 234, 0.08), transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(255, 42, 95, 0.09), transparent 40%),
                #040407;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  body[data-device="mobile"] .app-shell {
    width: 430px;
    max-width: 100vw;
    height: min(94dvh, 880px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75), 0 0 0 6px rgba(255, 255, 255, 0.03);
  }
}

/* ===================== DESKTOP HEADER ===================== */
.desktop-header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(10, 10, 16, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  z-index: 40;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 12px;
}

.ai-only-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  color: #06060a;
}

.header-search {
  flex: 1;
  max-width: 470px;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-form:focus-within {
  border-color: rgba(0, 242, 234, 0.55);
  background: rgba(255, 255, 255, 0.09);
}

.search-ico {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-form input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 10px;
  font-size: 13.5px;
  color: var(--text);
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  font-size: 13px;
  color: var(--text-dim);
  padding: 4px 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-generate-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, #ff2a5f 0%, #8b5cf6 52%, #00d4ce 100%);
  background-size: 180% 180%;
  box-shadow: 0 6px 22px rgba(255, 42, 95, 0.34);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-generate-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 242, 234, 0.32);
  filter: brightness(1.06);
}

.icon-pill-btn {
  padding: 8px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  transition: background 0.18s, color 0.18s;
}

.icon-pill-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.icon-circle-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text);
}

.icon-circle-btn svg {
  width: 18px;
  height: 18px;
}

.icon-circle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 2px #0a0a10;
}

.notif-dot.small {
  top: -2px;
  right: -3px;
  width: 8px;
  height: 8px;
}

.user-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.user-header-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

.avatar-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 242, 234, 0.2);
  display: grid;
  place-items: center;
  font-size: 15px;
}

/* ===================== APP BODY & SIDEBAR ===================== */
.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

.desktop-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(11, 11, 17, 0.92);
  border-right: 1px solid var(--border);
  padding: 14px 12px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: background 0.16s, color 0.16s;
  text-align: left;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 42, 95, 0.18), rgba(0, 242, 234, 0.1));
  color: #fff;
  border: 1px solid rgba(255, 42, 95, 0.25);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--cyan);
  color: #06060a;
}

.side-gen-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 242, 234, 0.11), rgba(139, 92, 246, 0.14), rgba(255, 42, 95, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.side-gen-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
}

.side-gen-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 12px;
}

.side-gen-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  color: #06060a;
  background: linear-gradient(90deg, var(--cyan), #67f8f3);
  transition: transform 0.15s, filter 0.15s;
}

.side-gen-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.side-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 6px;
  margin-bottom: 8px;
}

.side-creators {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-creator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 11px;
  text-align: left;
  transition: background 0.15s;
}

.side-creator-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sc-meta {
  min-width: 0;
  flex: 1;
}

.sc-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-user {
  font-size: 11.5px;
  color: var(--text-muted);
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}

.tag-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.16s;
}

.tag-pill:hover {
  border-color: rgba(0, 242, 234, 0.5);
  color: var(--cyan);
  background: rgba(0, 242, 234, 0.09);
}

/* ===================== MOBILE TOP & BOTTOM BARS ===================== */
.mobile-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.78) 0%, rgba(6, 6, 10, 0) 100%);
  pointer-events: none;
}

.mobile-topbar > * {
  pointer-events: auto;
}

.mobile-topbar.solid {
  background: rgba(10, 10, 16, 0.95);
  border-bottom: 1px solid var(--border);
}

.mobile-top-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
}

.mobile-top-icon svg {
  width: 19px;
  height: 19px;
}

.mobile-feed-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.m-tab {
  position: relative;
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  padding: 6px 2px;
  transition: color 0.16s;
}

.m-tab.active {
  color: #fff;
}

.m-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.mobile-bottom-bar {
  height: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(8, 8, 13, 0.96);
  border-top: 1px solid var(--border);
  z-index: 40;
}

.m-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  height: 100%;
}

.m-nav-btn svg {
  width: 22px;
  height: 22px;
}

.m-nav-btn.active {
  color: #fff;
}

.m-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

/* Iconic TikTok-style center Create button */
.m-create-btn {
  position: relative;
  width: 52px;
  height: 34px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.m-create-glow-l, .m-create-glow-r {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  border-radius: 11px;
}

.m-create-glow-l {
  left: 0;
  background: var(--cyan);
}

.m-create-glow-r {
  right: 0;
  background: var(--pink);
}

.m-create-inner {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  color: #08080c;
  font-size: 19px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ===================== MAIN STAGE & VIEWS ===================== */
.main-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0, 242, 234, 0.12);
  border-bottom: 1px solid rgba(0, 242, 234, 0.25);
  font-size: 13px;
  font-weight: 600;
  z-index: 32;
}

body[data-device="mobile"] .filter-banner {
  margin-top: 56px;
}

.filter-clear-btn {
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.view-section {
  display: none;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.view-section.active {
  display: flex;
}

/* ===================== VERTICAL VIDEO FEED ===================== */
.feed-workspace {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.feed-viewport-wrap {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.08), transparent 60%), var(--bg);
}

.feed-scroller {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.feed-scroller::-webkit-scrollbar {
  display: none;
}

.video-slide {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop card framing */
body[data-device="desktop"] .video-slide {
  padding: 16px 24px;
}

.player-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 100%;
}

body[data-device="desktop"] .player-stage {
  height: calc(100% - 8px);
  max-height: 860px;
}

body[data-device="mobile"] .player-stage {
  width: 100%;
  height: 100%;
  gap: 0;
}

.video-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  background: #040407;
  overflow: hidden;
  user-select: none;
}

body[data-device="desktop"] .video-frame {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

body[data-device="mobile"] .video-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #050509;
}

.video-frame.landscape video {
  object-fit: contain;
}

.video-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(4, 4, 8, 0.92) 0%, rgba(4, 4, 8, 0.45) 55%, rgba(4, 4, 8, 0) 100%);
  pointer-events: none;
}

/* Play/Pause center flash */
.play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.video-frame.paused .play-indicator {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Double tap floating heart */
.heart-burst {
  position: absolute;
  font-size: 82px;
  pointer-events: none;
  z-index: 25;
  transform: translate(-50%, -50%) scale(0.4);
  filter: drop-shadow(0 8px 24px rgba(255, 42, 95, 0.65));
  animation: heartPop 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heartPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-14deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(8deg); }
  65% { opacity: 0.95; transform: translate(-50%, -72%) scale(1.0) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -115%) scale(1.35) rotate(6deg); }
}

/* Bottom overlay metadata */
.video-meta-overlay {
  position: absolute;
  left: 14px;
  right: 72px;
  bottom: 22px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

body[data-device="desktop"] .video-meta-overlay {
  right: 18px;
  bottom: 24px;
}

.meta-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.model-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 242, 234, 0.2);
  border: 1px solid rgba(0, 242, 234, 0.45);
  color: #c8fffc;
  backdrop-filter: blur(8px);
}

.model-badge-pill.i2v {
  background: rgba(255, 42, 95, 0.22);
  border-color: rgba(255, 42, 95, 0.5);
  color: #ffd1df;
}

.rec-reason-pill {
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(15, 15, 24, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.meta-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-author-link {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.verified-tick {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  color: #050509;
  font-size: 10px;
  font-weight: 900;
}

.meta-title {
  font-size: 13.5px;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-tag-btn {
  font-size: 12.5px;
  font-weight: 700;
  color: #9ffaf6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.meta-prompt-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(12, 12, 20, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-prompt-btn:hover {
  border-color: rgba(0, 242, 234, 0.45);
  color: #fff;
}

/* Video progress bar */
.video-progress-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.video-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  transition: height 0.15s;
}

.video-progress-wrap:hover .video-progress-track {
  height: 6px;
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

/* ===================== RIGHT ACTION RAIL (BOTH DESKTOP & MOBILE) ===================== */
.video-actions-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 18;
  padding-bottom: 12px;
}

body[data-device="mobile"] .video-actions-rail {
  position: absolute;
  right: 10px;
  bottom: 24px;
  gap: 12px;
  padding-bottom: 0;
}

.action-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}

.action-avatar-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.action-follow-plus {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(255, 42, 95, 0.6);
}

.action-follow-plus.following {
  background: var(--green);
  font-size: 11px;
}

.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
}

.rail-ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  transition: transform 0.16s, background 0.16s, color 0.16s;
}

body[data-device="mobile"] .rail-ico {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.36);
}

.rail-ico svg {
  width: 22px;
  height: 22px;
}

.rail-btn:hover .rail-ico {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.18);
}

.rail-btn.liked .rail-ico {
  color: var(--pink);
  background: rgba(255, 42, 95, 0.22);
  border-color: rgba(255, 42, 95, 0.5);
}

.rail-btn.saved .rail-ico {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
}

.rail-btn.remix .rail-ico {
  background: linear-gradient(135deg, rgba(0, 242, 234, 0.25), rgba(139, 92, 246, 0.32));
  border-color: rgba(0, 242, 234, 0.5);
  color: #dffefb;
}

.rail-count {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.sound-disc {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b2b3b 24%, #111119 52%, #242434 100%);
  border: 2px solid rgba(255, 255, 255, 0.24);
  display: grid;
  place-items: center;
  font-size: 16px;
  animation: spinDisc 6s linear infinite;
}

.sound-disc.muted {
  animation-play-state: paused;
  opacity: 0.72;
}

@keyframes spinDisc {
  to { transform: rotate(360deg); }
}

/* Desktop prev/next floating controls */
.desktop-feed-arrows {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 24;
}

.arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-bright);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: background 0.16s, transform 0.16s;
}

.arrow-btn:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: scale(1.06);
}

.arrow-btn.refresh-btn {
  margin-top: 8px;
  font-size: 18px;
  color: var(--cyan);
}

/* ===================== DESKTOP CONTEXT PANEL (COMMENTS + PROMPT) ===================== */
.desktop-context-panel {
  width: 365px;
  flex-shrink: 0;
  background: rgba(12, 12, 18, 0.96);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: width 0.22s ease, opacity 0.2s ease;
}

.desktop-context-panel.collapsed {
  width: 0;
  opacity: 0;
  border-left: none;
  overflow: hidden;
  pointer-events: none;
}

.panel-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.panel-tabs.inline-tabs {
  padding: 0;
  border-bottom: none;
}

.panel-tab {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.15s;
}

.panel-tab.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.panel-close-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
}

.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.panel-body, .sheet-body {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.panel-body.active, .sheet-body.active {
  display: flex;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-bottom: 3px;
}

.comment-author {
  font-weight: 700;
  color: #fff;
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  word-wrap: break-word;
}

.comment-like-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px;
}

.comment-like-btn.liked {
  color: var(--pink);
}

.comment-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(16, 16, 24, 0.96);
}

.comment-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
}

.comment-input-bar input:focus {
  border-color: rgba(0, 242, 234, 0.55);
}

.comment-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* AI Prompt Inspector */
.prompt-inspector {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pi-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.pi-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.pi-prompt-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #fff;
  white-space: pre-wrap;
}

.pi-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pi-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.pi-stat small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.pi-stat strong {
  font-size: 13px;
}

.pi-actions {
  display: flex;
  gap: 8px;
}

.pi-actions button {
  flex: 1;
}

/* ===================== SUBVIEWS (EXPLORE, JOBS, INBOX, PROFILE) ===================== */
.subview-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px 28px 60px;
}

body[data-device="mobile"] .subview-scroll {
  padding: 66px 14px 28px;
}

.subview-header {
  margin-bottom: 22px;
}

.subview-header.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.subview-header h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.subview-header p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.mobile-search-inline {
  margin-bottom: 18px;
}

.explore-block {
  margin-bottom: 28px;
}

.block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.block-title-row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.block-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.link-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
}

.models-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.model-showcase-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s, border-color 0.16s;
}

.model-showcase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 242, 234, 0.45);
}

.msc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msc-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15.5px;
}

.msc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(0, 242, 234, 0.14);
  color: var(--cyan);
}

.msc-desc {
  font-size: 13px;
  line-height: 1.48;
  color: var(--text-dim);
  flex: 1;
}

.msc-actions {
  display: flex;
  gap: 8px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
}

body[data-device="mobile"] .video-cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-grid-card {
  position: relative;
  aspect-ratio: 9 / 15;
  border-radius: 16px;
  overflow: hidden;
  background: #12121b;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s;
}

.video-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 242, 234, 0.45);
}

.video-grid-card img,
.video-grid-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vgc-overlay {
  position: absolute;
  inset: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(0deg, rgba(5, 5, 10, 0.9) 0%, transparent 45%, rgba(5, 5, 10, 0.45) 100%);
}

.vgc-model {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--cyan);
}

.vgc-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.vgc-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* Jobs list */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.job-thumb {
  width: 58px;
  height: 88px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 22px;
}

.job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-info {
  flex: 1;
  min-width: 200px;
}

.job-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.job-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
}

.job-status-pill.processing, .job-status-pill.queued, .job-status-pill.downloading {
  background: rgba(0, 242, 234, 0.18);
  color: var(--cyan);
}

.job-status-pill.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.job-status-pill.failed, .job-status-pill.canceled {
  background: rgba(255, 42, 95, 0.2);
  color: #ff6b8f;
}

.job-prompt {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.job-msg {
  font-size: 12px;
  color: var(--text-dim);
}

.job-progress-mini {
  margin-top: 8px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.job-progress-mini > div {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 0.35s ease;
}

/* Notifications */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: left;
  transition: background 0.15s;
}

.notif-card.unread {
  border-color: rgba(0, 242, 234, 0.35);
  background: rgba(0, 242, 234, 0.06);
}

.notif-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notif-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Profile */
.profile-header-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.profile-avatar-lg {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 38px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.profile-meta {
  flex: 1;
  min-width: 200px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-name-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.profile-handle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 2px 0 8px;
}

.profile-bio {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 12px;
}

.profile-stats-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.p-stat strong {
  font-size: 16px;
  margin-right: 4px;
}

.p-stat span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.profile-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

.p-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.p-tab.active {
  color: #fff;
  border-bottom-color: var(--cyan);
}

/* ===================== FLOATING BACKGROUND JOB PILL ===================== */
.floating-job-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(16, 16, 26, 0.94);
  border: 1px solid rgba(0, 242, 234, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  max-width: calc(100vw - 24px);
}

body[data-device="mobile"] .floating-job-pill {
  left: 12px;
  right: 12px;
  bottom: calc(var(--mobile-bar-h) + 12px + env(safe-area-inset-bottom));
}

.fjp-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 242, 234, 0.25);
  border-top-color: var(--cyan);
  animation: spinDisc 0.9s linear infinite;
  flex-shrink: 0;
}

.fjp-info {
  flex: 1;
  min-width: 140px;
}

.fjp-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fjp-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.fjp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 0.35s ease;
}

.fjp-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
}

.fjp-open-btn {
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

/* ===================== MODALS & SHEETS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 4, 8, 0.76);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.18s ease;
}

body[data-device="mobile"] .modal-overlay {
  align-items: flex-end;
  padding: 0;
}

.modal-sheet {
  width: 100%;
  max-width: 600px;
  max-height: 90dvh;
  background: #11111a;
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
}

body[data-device="mobile"] .modal-sheet {
  max-width: 100%;
  max-height: 92dvh;
  border-radius: 24px 24px 0 0;
  border-bottom: none;
}

.auth-sheet {
  max-width: 430px;
}

.comments-sheet {
  max-width: 480px;
  height: 76dvh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-spark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--violet), var(--cyan));
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.modal-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Generator form */
.gen-form {
  padding: 18px 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.req-star {
  color: var(--pink);
}

.char-count {
  font-size: 11.5px;
  color: var(--text-muted);
}

.gen-form input[type="text"],
.gen-form textarea,
.auth-form input,
.auth-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.18s;
}

.gen-form input:focus,
.gen-form textarea:focus,
.auth-form input:focus,
.auth-form textarea:focus {
  border-color: rgba(0, 242, 234, 0.58);
}

.gen-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 480px) {
  .gen-model-grid { grid-template-columns: 1fr; }
}

.gen-model-card {
  text-align: left;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.16s;
}

.gen-model-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.gen-model-card.active {
  border-color: var(--cyan);
  background: rgba(0, 242, 234, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 242, 234, 0.25);
}

.gen-model-card.active[data-mode="i2v"] {
  border-color: var(--pink);
  background: rgba(255, 42, 95, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 42, 95, 0.28);
}

.gmc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gmc-title {
  font-weight: 800;
  font-size: 13.5px;
}

.gmc-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cyan);
}

.gmc-desc {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.38;
}

.future-models-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Dropzone */
.image-dropzone {
  border: 1.5px dashed rgba(255, 42, 95, 0.45);
  border-radius: 14px;
  background: rgba(255, 42, 95, 0.05);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}

.image-dropzone:hover, .image-dropzone.dragover {
  background: rgba(255, 42, 95, 0.12);
  border-color: var(--pink);
}

.drop-ico {
  font-size: 26px;
  margin-bottom: 4px;
}

.drop-placeholder small {
  color: var(--text-muted);
}

.drop-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.drop-preview img {
  max-height: 110px;
  max-width: 180px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
}

.drop-remove-btn {
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 42, 95, 0.22);
  color: #ff8aa8;
  font-size: 12.5px;
  font-weight: 700;
}

.prompt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.preset-chip:hover {
  border-color: rgba(0, 242, 234, 0.5);
  color: #fff;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .field-row-2 { grid-template-columns: 1fr; }
}

.ratio-pills {
  display: flex;
  gap: 7px;
}

.ratio-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.ratio-pill em {
  font-style: normal;
  font-size: 10px;
  color: var(--cyan);
}

.ratio-pill.active {
  border-color: var(--cyan);
  background: rgba(0, 242, 234, 0.14);
  color: #fff;
}

.r-box {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.r-916 { width: 9px; height: 14px; }
.r-169 { width: 14px; height: 9px; }
.r-11 { width: 11px; height: 11px; }

.form-error {
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 42, 95, 0.15);
  border: 1px solid rgba(255, 42, 95, 0.45);
  color: #ff99b3;
  font-size: 13px;
}

.btn-generate-submit {
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(95deg, #ff2a5f 0%, #8b5cf6 50%, #00d9d2 100%);
  box-shadow: 0 10px 30px rgba(255, 42, 95, 0.34);
  transition: transform 0.15s, filter 0.15s;
}

.btn-generate-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-generate-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Progress view */
.gen-progress-view {
  padding: 28px 24px 26px;
  text-align: center;
  overflow-y: auto;
}

.gen-orb-loader {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}

.gen-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--cyan);
  border-right-color: var(--pink);
  animation: spinDisc 1.15s linear infinite;
}

.gen-orb-pct {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.gen-progress-view h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.gen-progress-view p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.gen-progress-track {
  width: 100%;
  max-width: 380px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto 10px;
  overflow: hidden;
}

.gen-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  transition: width 0.4s ease;
}

.gen-progress-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.gen-result-ready video {
  width: 100%;
  max-width: 240px;
  max-height: 360px;
  border-radius: 16px;
  border: 1px solid var(--border-bright);
  margin-bottom: 14px;
  background: #000;
}

.gen-ready-actions, .gen-running-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gen-error-box {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 42, 95, 0.12);
  border: 1px solid rgba(255, 42, 95, 0.35);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Auth modal */
.auth-quick-box {
  margin: 16px 20px 0;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(0, 242, 234, 0.09);
  border: 1px solid rgba(0, 242, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.muted-small {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 14px 20px 0;
}

.auth-tab {
  padding: 9px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-form {
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.emoji-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.emoji-opt {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 18px;
}

.emoji-opt.active {
  border-color: var(--cyan);
  background: rgba(0, 242, 234, 0.18);
}

/* Reusable buttons */
.btn-primary-glow {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: #06060a;
  background: linear-gradient(90deg, var(--cyan), #72fff9);
  transition: transform 0.15s, filter 0.15s;
}

.btn-primary-glow.small {
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn-primary-glow:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-ghost {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger-soft {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #ff8aa8;
  background: rgba(255, 42, 95, 0.14);
  border: 1px solid rgba(255, 42, 95, 0.32);
}

.empty-state {
  margin: auto;
  text-align: center;
  padding: 40px 24px;
  max-width: 360px;
}

.empty-icon {
  font-size: 46px;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13.5px;
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}

body[data-device="mobile"] .toast-container {
  top: 96px;
  max-width: min(390px, calc(100vw - 24px));
}

.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(16, 16, 26, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
  animation: fadeIn 0.2s ease;
}

.toast.success { border-color: rgba(0, 242, 234, 0.55); }
.toast.error { border-color: rgba(255, 42, 95, 0.6); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive safeguard if Desktop mode selected on smaller screens */
@media (max-width: 1120px) {
  body[data-device="desktop"] .desktop-context-panel {
    position: fixed;
    right: 0;
    top: var(--header-h);
    bottom: 0;
    z-index: 60;
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 820px) {
  body[data-device="desktop"] .desktop-sidebar {
    width: 72px;
    padding: 12px 8px;
  }
  body[data-device="desktop"] .desktop-sidebar .nav-item span,
  body[data-device="desktop"] .desktop-sidebar .side-gen-card,
  body[data-device="desktop"] .desktop-sidebar .side-section {
    display: none;
  }
  body[data-device="desktop"] .desktop-sidebar .nav-item {
    justify-content: center;
    padding: 12px;
  }
}


/* ===================== REAL AVATARS, GMAIL AUTH, 100-SUB VERIFICATION & ADMIN ===================== */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-dot,
.sc-avatar,
.action-avatar-btn,
.comment-avatar,
.profile-avatar-lg,
.avatar-edit-preview {
  overflow: hidden;
  font-weight: 800;
  color: #fff;
}

.gmail-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ea4335 0%, #fbbc05 45%, #34a853 75%, #4285f4 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(234, 67, 53, 0.35);
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.field-hint code {
  color: var(--cyan);
}

.avatar-edit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.avatar-edit-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 242, 234, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 30px;
  flex-shrink: 0;
}

.avatar-edit-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.btn-ghost.small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger-soft.small {
  padding: 6px 11px;
  font-size: 12px;
}

/* Verification progress card on Profile (0..100 real subscribers) */
.verify-progress-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 242, 234, 0.07);
  border: 1px solid rgba(0, 242, 234, 0.24);
  max-width: 380px;
}

.verify-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #c8fffc;
  margin-bottom: 6px;
}

.verify-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.verify-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.3s ease;
}

/* Admin badges & controls */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(255, 42, 95, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fde68a;
}

.admin-nav-item {
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
}

.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.26), rgba(255, 42, 95, 0.18));
  border-color: rgba(245, 158, 11, 0.65);
  color: #fff;
}

.rail-btn.danger .rail-ico {
  background: rgba(255, 42, 95, 0.2);
  border-color: rgba(255, 42, 95, 0.45);
  color: #ff8aa8;
}

.comment-actions-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.comment-del-btn {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 5px;
  border-radius: 6px;
}

.comment-del-btn:hover {
  color: #ff6b8f;
  background: rgba(255, 42, 95, 0.16);
}

.vgc-del-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(12, 12, 18, 0.78);
  border: 1px solid rgba(255, 42, 95, 0.55);
  color: #ff8aa8;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.vgc-del-btn:hover {
  background: var(--pink);
  color: #fff;
}

/* Admin Panel Layout */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.admin-stat-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.admin-stat-card small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.admin-stat-card strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-row {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-row.banned {
  border-color: rgba(255, 42, 95, 0.45);
  background: rgba(255, 42, 95, 0.06);
}

.admin-row-main {
  flex: 1;
  min-width: 210px;
}

.admin-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.admin-row-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Empty Feed Hero */
.feed-empty-hero {
  max-width: 440px;
}

.empty-icon-ring {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(0, 242, 234, 0.18), rgba(139, 92, 246, 0.22), rgba(255, 42, 95, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 34px;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 242, 234, 0.15);
}

.empty-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}


/* ===================== GMAIL 6-DIGIT CODE VERIFICATION STEP ===================== */
.auth-step-fields,
.auth-verify-step {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.verify-mail-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 242, 234, 0.08);
  border: 1px solid rgba(0, 242, 234, 0.3);
}

.verify-mail-ico {
  font-size: 24px;
  flex-shrink: 0;
}

.verify-dev-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 12.5px;
}

.verify-dev-notice code {
  font-size: 15px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 2px;
}

.otp-code-input {
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px !important;
  font-weight: 800;
  letter-spacing: 10px;
  padding: 14px 12px !important;
  color: var(--cyan) !important;
  background: rgba(0, 242, 234, 0.06) !important;
  border: 1.5px solid rgba(0, 242, 234, 0.45) !important;
}

.verify-sub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.verify-sub-actions .link-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
