@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&family=Playfair+Display:ital,wght@1,600&display=swap');

:root {
  color-scheme: dark;
  --bg-dark: #090d16;
  --bg-canvas: #0e1422;
  --card-bg: #121929;
  --card-bg-glass: rgba(18, 25, 41, 0.88);
  --card-border: #1f2a40;
  --card-border-hover: #2e3e5c;
  --card-border-glow: rgba(56, 189, 248, 0.2);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --sky: #38bdf8;
  --sky-glow: rgba(56, 189, 248, 0.2);

  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-glow: rgba(245, 158, 11, 0.25);

  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.2);

  --danger: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 16px 36px -6px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--card-border);
  --shadow-hover: 0 20px 42px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--card-border-hover);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 8%, rgba(16, 185, 129, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 90% 12%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 60%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* TOPBAR */
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  margin-bottom: 24px;
  padding: 0 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  padding-left: 2px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.brand-tag {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font: 600 10px 'DM Mono', monospace;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  letter-spacing: 0.05em;
}

.brand-muted {
  color: var(--text-dim);
  font-weight: 400;
}

.youtube-connection {
  display: flex;
  align-items: center;
  gap: 12px;
}

#youtube-connection-status {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 10px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.local-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-dot 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* NAVIGATION TABS BAR */
.studio-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
}

.studio-nav::-webkit-scrollbar {
  display: none;
}

.studio-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.studio-nav-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(16, 185, 129, 0.12));
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px -2px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-counter {
  font: 600 10px 'DM Mono', monospace;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 12px;
  color: var(--sky);
}

/* DASHBOARD ANALYTICS KPI GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--card-bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--card-border-hover);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-card:nth-child(1):hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.65), 0 0 24px rgba(16, 185, 129, 0.18);
}
.kpi-card:nth-child(1)::before {
  background: linear-gradient(90deg, transparent, var(--emerald), transparent);
}

.kpi-card:nth-child(2):hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.65), 0 0 24px rgba(245, 158, 11, 0.18);
}
.kpi-card:nth-child(2)::before {
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.kpi-card:nth-child(3):hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.18);
}
.kpi-card:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, var(--sky), transparent);
}

.kpi-card:nth-child(4):hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.65), 0 0 24px rgba(168, 85, 247, 0.18);
}
.kpi-card:nth-child(4)::before {
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.kpi-icon {
  font-size: 16px;
}

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.kpi-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-badge {
  font: 500 9px 'DM Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.kpi-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-badge.amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-badge.sky {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* HERO SECTION */
.intro {
  padding: 28px 0 24px;
}

.eyebrow {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.16em;
  color: var(--emerald);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
  font-weight: 700;
  color: #fff;
}

h1 em {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-style: italic;
  background: linear-gradient(135deg, var(--emerald), var(--sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 600px;
  margin: 12px 0 0;
}

/* CARDS & PANELS */
.research-card,
.results,
.draft-card,
.saved-section {
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
  padding: 26px 30px;
  transition: border-color 0.25s ease;
}

.research-card:hover,
.results:hover,
.draft-card:hover {
  border-color: var(--card-border-hover);
}

.card-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.step {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.12em;
  color: var(--emerald);
  text-transform: uppercase;
}

.card-heading h2,
.section-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 4px 0 0;
  font-weight: 700;
  color: #fff;
}

.api-status {
  font: 500 11px 'DM Mono', monospace;
  color: var(--sky);
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* FORMS & INPUTS */
form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

input {
  flex: 1;
  min-width: 0;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0 18px;
  height: 50px;
  font: 500 14px 'Inter', sans-serif;
  color: #fff;
  outline: none;
  transition: all 0.2s ease;
}

input:focus {
  border-color: var(--sky);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

input::placeholder {
  color: var(--text-dim);
}

.competitor-input {
  display: block;
  width: 100%;
  margin-top: 12px;
  height: 44px;
  font-size: 13px;
}

/* LANGUAGE SELECTION COMPONENT */
.language-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 12px 0;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.language-selection-row:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(255, 255, 255, 0.045);
}

.lang-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-icon {
  font-size: 18px;
  filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.3));
}

.lang-label-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.lang-select-input {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  cursor: pointer;
  outline: none;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-select-input:hover {
  border-color: var(--sky);
  box-shadow: 0 0 12px var(--sky-glow);
}

.lang-select-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 2px var(--sky-glow);
}

.hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  animation: panelFadeIn 0.2s ease-out;
  backdrop-filter: blur(12px);
}

.notice.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.notice-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0.7;
}

.notice-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.notice[hidden],
[hidden] {
  display: none !important;
}

/* BUTTONS */
button {
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

button:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.primary {
  height: 50px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: #fff;
  box-shadow: 0 4px 18px var(--emerald-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.primary:hover {
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 12px 20px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--card-border-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.studio-start {
  margin-top: 14px;
  width: 100%;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e2e8f0;
  height: 46px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.studio-start:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.16));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

/* RESULTS & SIGNALS */
.source-label {
  font: 500 11px 'DM Mono', monospace;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.angle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.angle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.angle:hover {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.angle b {
  font: 600 10px 'DM Mono', monospace;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 7px;
  border-radius: 10px;
}

.video-details {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: 8px;
}

.video-details summary {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  padding: 6px 0;
}

.video-details summary:hover {
  color: var(--text-main);
}

.video-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.video-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 12px 16px;
  background: rgba(10, 15, 26, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.video-row:hover {
  border-color: var(--card-border-hover);
  background: rgba(15, 23, 42, 0.7);
}

.video-row a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
}

.video-row a:hover {
  color: var(--sky);
}

.video-row small {
  color: var(--text-dim);
  font-size: 11px;
}

.video-stats {
  font: 500 11px 'DM Mono', monospace;
  color: var(--emerald);
  white-space: nowrap;
}

.draft-action {
  border-top: 1px solid var(--card-border);
  margin-top: 22px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.draft-action strong {
  display: block;
  font-size: 14px;
  color: #fff;
}

.draft-action small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* SCRIPT & DRAFT CARD */
.draft-tag {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 5px 12px;
  color: var(--emerald);
  font: 600 10px 'DM Mono', monospace;
  letter-spacing: 0.1em;
}

.hook {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 22px;
  color: #fef08a;
  padding: 18px 22px;
  margin: 16px 0 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  line-height: 1.4;
}

.script-label {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 18px 0 8px;
  text-transform: uppercase;
}

.narration {
  white-space: pre-wrap;
  line-height: 1.8;
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
  background: rgba(10, 15, 26, 0.4);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.visual-plan {
  padding-left: 20px;
  line-height: 1.7;
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 8px;
}

.visual-plan li {
  padding-left: 6px;
  margin: 8px 0;
}

.draft-meta {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* SHORTS SCRIPT STUDIO PACKAGE */
.production-package {
  border-top: 1px solid var(--card-border);
  margin-top: 24px;
  padding-top: 20px;
}

.studio-status {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 18px;
}

.studio-block {
  border-top: 1px solid var(--card-border);
  padding: 18px 0;
}

.studio-block h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #fff;
}

.studio-block h4 {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--sky);
}

.studio-block p,
.studio-block li {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

.studio-block ol {
  padding-left: 20px;
}

.studio-scenes {
  padding-left: 0;
  list-style: none;
}

.studio-scene {
  padding: 16px 18px;
  margin: 12px 0;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}

.studio-scene pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px 14px;
  background: #090d16;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font: 12px/1.6 'DM Mono', monospace;
  color: #a5f3fc;
  margin: 10px 0;
}

.copy-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--sky);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.copy-button:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
}

.studio-folder {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font: 11px/1.6 'DM Mono', monospace;
  overflow-wrap: anywhere;
  margin-top: 16px;
}

/* VIDEO ENGINE OPTIONS */
.video-action {
  border-top: 1px solid var(--card-border);
  margin-top: 24px;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.render-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.engine-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  gap: 18px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.engine-card:hover {
  border-color: var(--card-border-hover);
  background: rgba(15, 23, 42, 0.8);
}

.engine-card.featured {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(15, 23, 42, 0.8));
}

.engine-card.featured:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 20px var(--amber-glow);
}

/* VIDEO PREVIEW PLAYER & VIRAL PUBLISHING STUDIO */
.video-output {
  margin-top: 10px;
  padding-top: 0;
  text-align: left;
}

.player-studio-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .player-studio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .player-left-col {
    position: static !important;
    top: auto !important;
    width: 100%;
  }
  .player-right-col {
    width: 100%;
  }
}

/* LEFT COLUMN: PHONE PREVIEW */
.player-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 80px;
}

.thumbnail-studio-card {
  width: 100%;
  box-sizing: border-box;
}

.engine-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 680px) {
  .engine-radio-grid {
    grid-template-columns: 1fr;
  }
}

.phone-frame-container {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.phone-bezel {
  background: #000;
  border-radius: 36px;
  border: 4px solid #1e293b;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.2);
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-bezel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.video-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.pill-badge {
  font: 500 11px 'DM Mono', monospace;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 12px;
}

.video-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--sky), #0284c7);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px var(--sky-glow);
  transition: all 0.2s ease;
}

.video-download:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  transform: translateY(-1px);
}

.video-credits {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 10px;
  text-align: center;
}

.video-credits a {
  color: var(--sky);
  font-weight: 500;
  text-decoration: none;
}

.video-credits a:hover {
  text-decoration: underline;
}

/* RIGHT COLUMN: VIRAL PUBLISHING STUDIO */
.player-right-col {
  min-width: 0;
}

.youtube-upload-panel {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(10, 15, 26, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Scorecard & Viral Gauge */
.scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}

.viral-score-gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
}

.viral-score-gauge .score-number {
  font: 700 16px 'DM Mono', monospace;
  color: #34d399;
}

.viral-score-gauge .score-label {
  font: 600 11px 'Outfit', sans-serif;
  letter-spacing: 0.04em;
  color: #6ee7b7;
}

/* Checklist Bar */
.viral-checklist-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-pill {
  font: 500 11px 'Outfit', sans-serif;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
}

.check-pill.active {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Studio Field Groups */
.studio-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.field-label-row label {
  font-size: 13px;
  color: #fff;
}

.char-counter {
  font: 500 11px 'DM Mono', monospace;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}

.char-counter.warning {
  color: #fbbf24;
}

.char-counter.error {
  color: #f87171;
}

.input-with-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-prefix {
  font: 600 14px 'DM Mono', monospace;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
}

.input-with-action input {
  flex: 1;
  background: var(--bg-canvas);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.input-with-action input:focus {
  border-color: var(--sky);
}

.micro-btn {
  padding: 6px 12px;
  font-size: 11px;
  white-space: nowrap;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--sky);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: #bae6fd;
}

/* High-CTR Title Box */
.seo-title-box {
  background: var(--bg-canvas);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  outline: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.seo-title-box:focus {
  border-color: var(--sky);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* Emoji Toolbar */
.emoji-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.emoji-toolbar-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.emoji-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.emoji-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 16px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.emoji-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.2);
}

.title-tag-shortcuts {
  display: flex;
  gap: 4px;
}

.tag-shortcut-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--sky);
  font: 600 10px 'DM Mono', monospace;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.tag-shortcut-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

/* Title Hook Angle Chips */
.title-hooks-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.title-hook-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hook-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: #e2e8f0;
  font: 500 11px 'Outfit', sans-serif;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hook-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--sky);
  color: #fff;
}

/* Description Textarea */
.seo-desc-box {
  background: var(--bg-canvas);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  resize: vertical;
  outline: none;
}

.seo-desc-box:focus {
  border-color: var(--sky);
}

/* Pinned Comment Box */
.pinned-comment-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
}

.pinned-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #fef3c7;
  outline: none;
  width: 100%;
}

/* Tags Box & Popular Pills */
.popular-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.popular-tag-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tag-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font: 500 10px 'DM Mono', monospace;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.tag-pill-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #6ee7b7;
}

/* 1-CLICK AI AUTO-PUBLISHER STYLES */
.auto-channel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.channel-pill-input {
  display: inline-flex;
  align-items: center;
  background: var(--bg-canvas);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 4px 10px;
  gap: 4px;
}

.channel-pill-input input {
  background: transparent;
  border: none;
  color: #fff;
  font: 600 13px 'Outfit', sans-serif;
  outline: none;
  width: 170px;
}

.auto-upload-hero-container {
  margin: 6px 0;
}

.auto-upload-big-btn {
  width: 100%;
  padding: 16px 22px;
  height: auto;
  min-height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #e11d48, #be123c, #881337);
  box-shadow: 0 6px 26px rgba(225, 29, 72, 0.45);
  border: 1px solid rgba(251, 113, 133, 0.4);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auto-upload-big-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f43f5e, #e11d48, #9f1239);
  box-shadow: 0 8px 32px rgba(225, 29, 72, 0.65);
  transform: translateY(-2px);
}

.auto-upload-big-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auto-upload-icon {
  font-size: 28px;
  line-height: 1;
}

.auto-upload-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.auto-upload-sub {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

/* AI Metadata Showcase */
.ai-package-showcase {
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.showcase-label {
  font: 600 11px 'DM Mono', monospace;
  color: var(--sky);
}

.showcase-value {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.pinned-comment-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
}

.pinned-comment-card .pinned-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #fef3c7;
  outline: none;
  width: 100%;
}

.advanced-seo-drawer {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
}

.studio-link-btn {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.studio-link-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
}

/* SAVED DRAFTS */
.saved-section {
  margin-top: 24px;
}

.count {
  font: 600 11px 'DM Mono', monospace;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.saved-drafts {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.empty-state {
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 28px;
}

.saved-item {
  background: rgba(10, 15, 26, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  transition: all 0.2s ease;
}

.saved-item:hover {
  border-color: var(--card-border-hover);
  background: rgba(15, 23, 42, 0.8);
  transform: translateX(3px);
}

.saved-item strong {
  font-size: 14px;
  color: #fff;
}

.saved-item small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.saved-item span {
  font: 600 10px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}

/* FOOTER */
footer {
  margin: 50px 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-dim);
  font-size: 11px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* SPA MULTI-VIEW PANELS (ZERO SCROLL) */
.view-panel {
  display: none;
  animation: panelFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

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

.panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.panel-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* QUICK TILES WORKFLOW GRID */
.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.quick-tile {
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-tile:hover {
  border-color: var(--card-border-hover);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.quick-tile-icon {
  font-size: 24px;
  line-height: 1;
}

.quick-tile strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #fff;
  margin-bottom: 3px;
}

.quick-tile small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

[data-jump] {
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 16px 40px;
  }
  .topbar {
    height: 64px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .quick-tiles-grid {
    grid-template-columns: 1fr;
  }
  .panel-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .panel-nav-actions {
    width: 100%;
    justify-content: space-between;
  }
  .intro {
    padding: 20px 0;
  }
  h1 {
    font-size: 32px;
  }
  .research-card,
  .results,
  .draft-card {
    padding: 20px 18px;
  }
  form {
    flex-direction: column;
  }
  form button {
    justify-content: center;
  }
  .draft-action {
    align-items: flex-start;
    flex-direction: column;
  }
  .secondary {
    width: 100%;
  }
  .video-row {
    grid-template-columns: 1fr;
  }
  .video-stats {
    grid-row: 2;
  }
  footer {
    flex-direction: column;
  }
}

/* FLUX SUPERPOWERS & INFORMATIVE TAGS */
.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-tag.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-tag.sky {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-tag.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-tag.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.info-tooltip {
  cursor: help;
  font-size: 12px;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.info-tooltip:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Gemini Studio & Script Styling */
.gemini-start {
  background: linear-gradient(135deg, #1a73e8 0%, #8e24aa 100%) !important;
  border-color: #4285f4 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.3);
  font-weight: 600;
  transition: all 0.2s ease;
}
.gemini-start:hover {
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
  transform: translateY(-1px);
}
.gemini-draft-btn {
  background: linear-gradient(135deg, #1a73e8 0%, #8e24aa 100%) !important;
  border-color: #4285f4 !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.2s ease;
}
.gemini-draft-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.4);
}
.engine-radio-card {
  transition: border-color 0.2s ease, background 0.2s ease;
}
.engine-radio-card:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* ======================================================== */
/* MASTER PIN AUTH MODAL FOR DESKTOP BROWSER ACCESS         */
/* ======================================================== */
.pin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pinFadeIn 0.25s ease-out;
}

@keyframes pinFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.pin-modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(66, 133, 244, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(66, 133, 244, 0.15);
  padding: 30px 24px;
  text-align: center;
}

.pin-lock-icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: inline-block;
}

.pin-modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  color: #fff;
  margin: 0 0 6px;
}

.pin-modal-header p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 20px;
}

.pin-input-container {
  margin-bottom: 16px;
}

#pin-input {
  width: 100%;
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  letter-spacing: 12px;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--card-border);
  border-radius: 10px;
  color: #60a5fa;
  transition: all 0.2s ease;
}

#pin-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}

.pin-error {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 16px;
  animation: pinShake 0.4s ease-in-out;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  padding: 14px 0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.keypad-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.keypad-btn:active {
  transform: translateY(1px);
}

.keypad-btn.secondary {
  color: var(--text-dim);
  font-size: 16px;
}

.pin-unlock-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #1a73e8 0%, #8e24aa 100%);
  border: 1px solid #4285f4;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.35);
  transition: all 0.2s ease;
}

.pin-unlock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
}

.pin-modal-footer {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 11px;
}

/* ======================================================== */
/* FILE MANAGER & MEDIA LIBRARY STYLES                      */
/* ======================================================== */

.files-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.files-stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.files-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.files-stat-card .stat-icon {
  font-size: 26px;
  background: rgba(255, 255, 255, 0.04);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.files-stat-card .stat-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.files-stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.files-stat-card .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  color: #fff;
  margin-top: 2px;
  white-space: nowrap;
}

.files-toolbar {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.files-search-wrap input[type="search"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.files-search-wrap input[type="search"]:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.files-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.files-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.files-tab-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  min-height: 200px;
}

.file-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
}

.file-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.file-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.file-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-type-pill.video {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.file-type-pill.draft {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.file-card-date {
  font-size: 11px;
  color: #64748b;
}

.file-card-body {
  flex-grow: 1;
  margin-bottom: 14px;
}

.file-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-card-snippet {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
}

.file-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.file-status-badge.uploaded {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.file-status-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.file-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-file-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-file-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-file-primary {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.btn-file-primary:hover {
  background: #2563eb;
  color: #fff;
}

.btn-file-upload {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-file-upload:hover {
  background: #059669;
  color: #fff;
}

.btn-file-tg {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}

.btn-file-tg:hover {
  background: #0284c7;
  color: #fff;
}

.btn-file-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
  margin-left: auto;
}

.btn-file-danger:hover {
  background: #dc2626;
  color: #fff;
}

/* FILE MODALS */
.file-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pinFadeIn 0.2s ease-out;
}

.file-modal-backdrop[hidden] {
  display: none !important;
}

.file-modal-card {
  width: 100%;
  max-width: 600px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.file-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.file-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.file-modal-close:hover {
  color: #fff;
}

.file-modal-form {
  padding: 20px;
  overflow-y: auto;
}

.file-modal-form input,
.file-modal-form textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
}

.file-modal-form input:focus,
.file-modal-form textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.files-loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.files-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

/* Modern Viral Subscribe Pill Button */
.shorts-sub-pill-btn {
  user-select: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.3s ease;
}

.shorts-sub-pill-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.shorts-sub-pill-btn:active {
  transform: translateY(1px) scale(0.97);
}

.shorts-sub-pill-btn.unsubbed:hover {
  box-shadow: 0 8px 26px rgba(255, 0, 51, 0.55);
}

.shorts-sub-pill-btn.subbed:hover {
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.45);
}



