/* ==========================================================================
   Three Friends, Three Languages - Pure CSS Design System
   Zero external CSS frameworks or CDN dependencies
   ========================================================================== */

/* ==========================================================================
   Custom Local Fonts for Specific Writing Systems
   ========================================================================== */

/* Pashto: Bahij Titr */
@font-face {
  font-family: 'BahijTitr';
  src: url('fonts/BahijTitr.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Urdu: Jameel Noori Nastaleeq */
@font-face {
  font-family: 'JameelNoori';
  src: url('fonts/Jameel.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand Teal Palette */
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-200: #99f6e4;
  --brand-300: #5eead4;
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-800: #115e59;
  --brand-900: #134e4a;

  /* Neutral Slate Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Card 0 Palette (Indigo / Blue) */
  --card-0-bg: linear-gradient(135deg, #eef2ff 0%, #eff6ff 100%);
  --card-0-border: #e0e7ff;
  --card-0-accent: #4f46e5;
  --card-0-cursor: #6366f1;
  --card-0-icon: #312e81;

  /* Card 1 Palette (Emerald / Teal) */
  --card-1-bg: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  --card-1-border: #d1fae5;
  --card-1-accent: #059669;
  --card-1-cursor: #10b981;
  --card-1-icon: #064e3b;

  /* Card 2 Palette (Rose / Orange) */
  --card-2-bg: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
  --card-2-border: #ffe4e6;
  --card-2-accent: #e11d48;
  --card-2-cursor: #f43f5e;
  --card-2-icon: #881337;

  /* Shadows & Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   CSS Reset & Base Elements
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  background-color: var(--slate-50);
  color: var(--slate-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #fff;
  padding: 0.45rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.25);
}

.logo-badge svg {
  width: 1.2rem;
  height: 1.2rem;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title span {
  font-weight: 300;
  -webkit-text-fill-color: var(--slate-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Gemini CLI Status Badge (Zero API Key) */
.cli-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-700);
  box-shadow: var(--shadow-sm);
}

.admin-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-600);
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.admin-link-btn:hover {
  background: var(--slate-50);
  color: var(--brand-700);
  border-color: var(--brand-300);
}

.cli-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulseGlow 2s infinite;
}

.cli-status-dot.error {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: none;
}

.cli-status-dot.warning {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* ==========================================================================
   Main Layout Container
   ========================================================================== */

.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Control Panel (Left Column)
   ========================================================================== */

.panel-card {
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-btn {
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.clear-btn:hover {
  color: #ef4444;
}

.source-textarea {
  width: 100%;
  height: 8rem;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  resize: none;
  color: var(--slate-900);
  outline: none;
  transition: all 0.2s;
}

.source-textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
  background-color: #ffffff;
}

.source-textarea::placeholder {
  color: var(--slate-400);
}

/* Language Dropdowns */
.lang-selectors-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.lang-selector-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lang-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  padding-left: 0.2rem;
}

.select-wrapper {
  position: relative;
}

.lang-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-800);
  font-size: 0.825rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 0.55rem 1.6rem 0.55rem 0.6rem;
  cursor: pointer;
  outline: none;
  transition: all 0.15s;
}

.lang-select:hover {
  border-color: var(--brand-400);
}

.lang-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.select-arrow {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--slate-400);
  display: flex;
  align-items: center;
}

/* Primary and Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--slate-700);
  border-color: var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--slate-50);
  border-color: var(--slate-300);
}

/* Spinner Icon */
.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Video Settings Controls */
.video-settings-box {
  border-top: 1px solid var(--slate-100);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 0.25rem;
}

.setting-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.setting-val {
  color: var(--brand-700);
  font-family: var(--font-mono);
}

.range-slider {
  width: 100%;
  height: 6px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.15s;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
  background: var(--brand-500);
  transform: scale(1.15);
}

.resolution-pill-group {
  display: flex;
  background-color: var(--slate-100);
  padding: 2px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

.resolution-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--slate-500);
  cursor: pointer;
  transition: all 0.15s;
}

.resolution-btn.active {
  background-color: #ffffff;
  color: var(--brand-700);
  box-shadow: var(--shadow-sm);
}

/* Error Banner */
.error-banner {
  display: none;
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.4;
}

/* Motivational Quote Panel */
.sidebar-quote {
  background-color: rgba(240, 253, 250, 0.6);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-xl);
  padding: 1rem;
  text-align: center;
  color: var(--brand-900);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.9;
}

@media (max-width: 1024px) {
  .sidebar-quote {
    display: none;
  }
}

/* ==========================================================================
   Results & Cards View (Right Column)
   ========================================================================== */

.content-area {
  width: 100%;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  min-height: 320px;
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius-2xl);
  background-color: rgba(248, 250, 252, 0.5);
}

.empty-icon-circle {
  width: 4rem;
  height: 4rem;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--slate-300);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-bottom: 0.25rem;
}

.empty-subtitle {
  font-size: 0.8rem;
  color: var(--slate-400);
  max-width: 260px;
}

/* Skeleton Loading State */
.skeleton-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}

.skeleton-card {
  background-color: #ffffff;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  height: 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--slate-200);
}

.skeleton-line {
  height: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--slate-200);
}

.skeleton-line.w-half { width: 45%; }
.skeleton-line.w-full { width: 100%; }
.skeleton-line.w-3q { width: 75%; }

/* Dynamic Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Translation Card */
.portrait-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 160px;
  border-radius: var(--radius-2xl);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(20px) scale(0.97);
}

.portrait-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.portrait-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-md);
}

/* Card Theme Variations */
.portrait-card.theme-0 {
  background: var(--card-0-bg);
  border-color: var(--card-0-border);
}
.portrait-card.theme-0 .card-accent { color: var(--card-0-accent); }
.portrait-card.theme-0 .cursor-bar { background-color: var(--card-0-cursor); }
.portrait-card.theme-0 .illustration-svg { color: var(--card-0-icon); }

.portrait-card.theme-1 {
  background: var(--card-1-bg);
  border-color: var(--card-1-border);
}
.portrait-card.theme-1 .card-accent { color: var(--card-1-accent); }
.portrait-card.theme-1 .cursor-bar { background-color: var(--card-1-cursor); }
.portrait-card.theme-1 .illustration-svg { color: var(--card-1-icon); }

.portrait-card.theme-2 {
  background: var(--card-2-bg);
  border-color: var(--card-2-border);
}
.portrait-card.theme-2 .card-accent { color: var(--card-2-accent); }
.portrait-card.theme-2 .cursor-bar { background-color: var(--card-2-cursor); }
.portrait-card.theme-2 .illustration-svg { color: var(--card-2-icon); }

/* SVG Silhouette Background Illustration */
.illustration-container {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 14rem;
  height: 14rem;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-10deg);
  transition: all 0.8s ease-out;
}

.illustration-svg {
  width: 100%;
  height: 100%;
}

/* Card Header */
.card-header {
  position: relative;
  z-index: 10;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.card-lang-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.flag-badge {
  font-size: 1.25rem;
  width: 2rem;
  height: 2rem;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card-lang-name {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.card-lang-code {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

/* Card Content Area */
.card-body {
  position: relative;
  z-index: 10;
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.card-translated-text {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--slate-800);
  word-break: break-word;
  white-space: pre-wrap;
  min-height: 1.75rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Language-Specific Typography for Regular Translated Text Only
   (Pronunciation guide strictly preserves Latin monospace italic styling)
   ========================================================================== */

/* Pashto: Bahij Titr */
.card-translated-text.lang-ps {
  font-family: 'BahijTitr', 'Noto Sans Arabic', Tahoma, sans-serif !important;
  font-size: 1.35rem;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  padding-right: 0.25rem;
  padding-left: 1.5rem;
}

/* Urdu: Jameel Noori Nastaleeq */
.card-translated-text.lang-ur {
  font-family: 'JameelNoori', 'Noto Nastaliq Urdu', 'BahijTitr', serif !important;
  font-size: 1.6rem;
  line-height: 2.15;
  direction: rtl;
  text-align: right;
  padding-right: 0.25rem;
  padding-left: 1.5rem;
  letter-spacing: 0;
}

/* Arabic: Noto Sans Arabic */
.card-translated-text.lang-ar {
  font-family: 'Noto Sans Arabic', Tahoma, sans-serif !important;
  font-size: 1.35rem;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  padding-right: 0.25rem;
  padding-left: 1.5rem;
}

/* Hindi: Noto Sans Devanagari */
.card-translated-text.lang-hi {
  font-family: 'Noto Sans Devanagari', sans-serif !important;
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Japanese: Noto Sans JP */
.card-translated-text.lang-ja {
  font-family: 'Noto Sans JP', sans-serif !important;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Korean: Noto Sans KR */
.card-translated-text.lang-ko {
  font-family: 'Noto Sans KR', sans-serif !important;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Chinese Simplified: Noto Sans SC */
.card-translated-text.lang-zh {
  font-family: 'Noto Sans SC', sans-serif !important;
  font-size: 1.2rem;
  line-height: 1.6;
}

.cursor-bar {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.9s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   Pronunciation Guard: STRICTLY Latin Monospace Italic
   (Never styled with native script fonts like BahijTitr or Jameel)
   ========================================================================== */

.card-pronunciation {
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.5s ease-out;
  margin-top: 0.5rem;
  direction: ltr !important;
  text-align: left !important;
}

.card-pronunciation.visible {
  opacity: 0.75;
  transform: translateY(0);
}

.card-pronunciation-text {
  font-size: 0.825rem !important;
  font-family: var(--font-mono) !important;
  font-style: italic !important;
  color: var(--slate-600) !important;
  direction: ltr !important;
  text-align: left !important;
  display: inline-block;
}

/* ==========================================================================
   Video Modal & Overlays
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal-card {
  background-color: #000000;
  border: 1px solid var(--slate-700);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  max-width: 380px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  color: #ffffff;
}

.modal-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  padding: 0.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

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

.modal-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background-color: #000;
}

.modal-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-footer {
  padding: 1.25rem;
  background-color: var(--slate-900);
  border-top: 1px solid var(--slate-800);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-download {
  background-color: #ffffff;
  color: #000000;
  font-weight: 700;
}

.btn-download:hover {
  background-color: var(--slate-200);
}

.modal-tagline {
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate-500);
}
