/* task b. style - Consolidated */

/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset and base styles */
:root {
  /* --primary-50: rgb(240, 240, 255);
  --primary-100: rgb(229, 229, 255);
  --primary-200: rgb(204, 204, 255);
  --primary-300: rgb(178, 178, 255);
  --primary-400: rgb(153, 153, 255);
  --primary-500: rgb(127, 127, 255);
  --primary-600: rgb(75, 75, 140);
  --primary-700: rgb(58, 58, 107);
  --primary-800: rgb(41, 41, 74);
  --primary-900: rgb(24, 24, 41);
  --primary-950: rgb(7, 7, 8);
  --gray-50: rgb(249, 250, 251);
  --gray-100: rgb(243, 244, 246);
  --gray-200: rgb(229, 231, 235);
  --gray-300: rgb(209, 213, 219);
  --gray-400: rgb(156, 163, 175);
  --gray-500: rgb(107, 114, 128);
  --gray-600: rgb(75, 85, 99);
  --gray-700: rgb(55, 65, 81);
  --gray-800: rgb(31, 41, 55);
  --gray-900: rgb(17, 24, 39);
 
  --border-radius: 0.75rem; 
  --background: var(--gray-100); 
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); */


    --primary-50: rgb(240, 240, 255);
  --primary-100: rgb(229, 229, 255);
  --primary-200: rgb(204, 204, 255);
  --primary-300: rgb(178, 178, 255);
  --primary-400: rgb(153, 153, 255);
  --primary-500: rgb(127, 127, 255);
  --primary-600: rgb(75, 75, 140);    /* Muted Purple/Blue */
  --primary-700: rgb(58, 58, 107);    /* Darker Muted Purple/Blue */
  --primary-800: rgb(41, 41, 74);
  --primary-900: rgb(24, 24, 41);
  --primary-950: rgb(7, 7, 8);

  --gray-50: rgb(249, 250, 251);
  --gray-100: rgb(243, 244, 246);
  --gray-200: rgb(229, 231, 235);
  --gray-300: rgb(209, 213, 219);
  --gray-400: rgb(156, 163, 175);
  --gray-500: rgb(107, 114, 128);
  --gray-600: rgb(75, 85, 99);
  --gray-700: rgb(55, 65, 81);
  --gray-800: rgb(31, 41, 55);
  --gray-900: rgb(17, 24, 39);

  /* --- Main Semantic Colors (Values from your ORIGINAL :root block) --- */
  /* These will be the primary drivers for the overall theme. */
  /* Components should ideally use these generic names. */
  --primary: #4285F4;                /* Google Blue */
  --primary-dark: #3367D6;           /* Darker Google Blue */
  --secondary: #F1F3F4;              /* Light Gray */
  --text: #202124;                   /* Dark Text */
  --text-light: #5F6368;             /* Medium Gray Text */
  --background: #FFFFFF;             /* White Background */
  --card-bg: #F8F9FA;                /* Off-White Card Background */
  --accent: #FFB400;                 /* Yellow/Orange Accent */
  --danger: #EA4335;                 /* Red Danger */
  --success: #34A853;                /* Green Success */
  --info: #4285F4;                   /* Blue Info (same as primary) */

  /* --- UI Properties (Values from your ORIGINAL :root block) --- */
  /* These will override any conflicting definitions from "task b" for these specific names. */
  --border-radius: 8px;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --transition: all 0.2s ease;
 
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
  /* font-family: 'Inter', sans-serif; */
  line-height: 1.5;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.min-h-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.navbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s;
} */

.logo:hover {
  color: var(--primary-700);
}

/* Style for SVG icon within logo */
/* .logo svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
} */

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;


 display: inline-flex; /* Use flex to align spans side-by-side */
    align-items: baseline; /* Align text nicely along the baseline */
    text-decoration: none; /* Ensure no default underline if not already set */
}

/* Style the SECOND span (the "Translate" part) */
.logo span:last-child {
    color: var(--gray-600); /* Use a lighter text color like Google's gray */
    font-weight: 400;       /* Use a normal or lighter font weight */
    margin-left: 0.3em;     /* Add a small space between "Abena AI" and "Translate" */
                            /* Adjust this value (e.g., 4px, 6px, 0.25em) as needed */
    font-size: 0.9em;       /* Optional: make it slightly smaller */
                            /* Adjust or remove as needed */
}


.nav-links {
  display: none;
  /* Hide by default, shown in media query or by .active */
  gap: 1.5rem;
}

.nav-link {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-600);
}

/* Hamburger Menu Styles */
.mobile-menu-btn {
  display: block;
  /* Show on mobile by default */
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-600);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 51;
}

.mobile-menu-btn i {
  display: block;
}

@media (min-width: 769px) {

  /* Show links on larger screens */
  .mobile-menu-btn {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    /* Reset mobile positioning */
    background-color: transparent;
    padding: 0;
    border-top: none;
    box-shadow: none;
    flex-direction: row;
    align-items: center;
  }

  .nav-links.active .nav-link {
    padding: 0;
    width: auto;
  }
}

@media (max-width: 768px) {

  /* Mobile dropdown positioning */
  .nav-links.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 49;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-links.active .nav-link {
    padding: 0.5rem 0;
    width: 100%;
  }
}


/* Hero Section */
.hero {
  max-width: 64rem;
  margin: 4rem auto 3rem;
  padding: 0 1rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border: 1px solid var(--primary-200);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-700);
  margin-bottom: 1.5rem;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary-600);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--primary-600), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subtitle {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-600);
  margin-top: 0.5rem;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

.feature-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary-600);
  flex-shrink: 0;
}

/* Category label styling */
.category-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tool selector styling */
.tool-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.tool-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--primary-600);
}

.tool-btn.active {
  background-color: var(--primary-600);
  color: white;
}

.tool-btn:not(.active) {
  background-color: transparent;
  color: var(--primary-600);
}

.tool-btn:hover:not(.active) {
  background-color: var(--primary-50);
}


/* Container and Card */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem 6rem;
}

.card {
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  /* Use variable if defined */
  overflow: hidden;
}

/* Upload Section */
.upload-section {
  padding: 2rem;
}

.upload-container {
  max-width: 600px;
  margin: 0 auto;
}

.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--gray-50), white);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(75, 75, 140, 0.05), rgba(99, 102, 241, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropzone:hover {
  border-color: var(--primary-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(75, 75, 140, 0.15);
}

.dropzone:hover::before {
  opacity: 1;
}

.dropzone-content {
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.upload-icon-wrapper {
  margin-bottom: 1.5rem;
  position: relative;
}

.upload-icon {
  stroke: var(--primary-500);
  fill: none;
  display: block;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.dropzone:hover .upload-icon {
  stroke: var(--primary-600);
  transform: scale(1.1);
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.dropzone-text {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.dropzone-specs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

.spec-item svg {
  stroke: var(--primary-500);
  flex-shrink: 0;
}

.dropzone-limit {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
  text-align: center;
}


.hidden {
  display: none;
}

/* Sample Video Button */
.sample-video {
  margin-top: 1.5rem;
  text-align: center;
}

.sample-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 0.75rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sample-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sample-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Video Preview */
.video-preview {
  /* This is the .video-container in HTML */
  padding: 0 1.5rem;
  /* Padding around the container */
  margin: 1rem 0;
  display: none;
  /* Hide by default, JS shows it */
  max-width: 600px;
  margin-left: auto;
  /* Center if needed */
  margin-right: auto;
}

.video-preview.video-loaded {
  /* Class added by JS */
  display: block;
}

.video-player {
  /* The <video> element */
  width: 100%;
  border-radius: 0.5rem;
  background: var(--gray-100);
  aspect-ratio: 16/9;
  display: block;
  box-shadow: var(--shadow);
  /* Optional shadow */
}

/* Voice Selection */
.voice-selection {
  padding: 2rem;
  border-top: 1px solid var(--gray-200);
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.5), white);
}

.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.voice-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.voice-title svg {
  stroke: var(--primary-600);
  flex-shrink: 0;
}

.voice-container {
  max-width: 500px;
}

.voice-select-group {
  width: 100%;
}

.voice-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
}

.select-wrapper {
  position: relative;
}

.voice-select {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.75rem;
  background: white;
  color: var(--gray-900);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.voice-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(75, 75, 140, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.voice-select:hover {
  border-color: var(--primary-400);
}

.select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  stroke: var(--gray-500);
  pointer-events: none;
  transition: stroke 0.2s;
}

.voice-select:focus + .select-icon {
  stroke: var(--primary-600);
}

.credits {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  background: var(--primary-50);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--primary-200);
}

.credits-label {
  color: var(--gray-600);
  font-weight: 500;
}

.credits-value {
  font-weight: 700;
  color: var(--primary-700);
}

/* =========================================== */
/* === Consolidated Dubbing Options Styles === */
/* =========================================== */

.dubbing-options {
  border-top: 1px solid var(--gray-200);
  /* background: white; Removed, toggle button covers area */
}

/* --- Enhanced Toggle Button --- */
.options-toggle {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, white, var(--gray-50));
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.options-toggle:hover {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-color: var(--primary-300);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.options-toggle-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--gray-700);
}

.options-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: var(--gray-600);
}

.chevron {
  transition: transform 0.2s ease;
}

.options-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* --- Collapsible Content --- */
.options-content {
  display: none;
  /* Managed by JS */
  padding: 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.options-content.show {
  /* If using JS class toggle */
  display: block;
}

/* --- Pill Buttons --- */
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.options-row.align-right {
  justify-content: flex-end;
}

/* Adjust alignment for second row if needed on mobile */
/* .options-row:nth-child(2) { } */

.pill-btn {
  position: relative;
  /* For badge positioning */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  /* Adjusted padding */
  background: white;
  border: 1px solid var(--gray-300);
  /* Use gray-300 for default border */
  border-radius: 999px;
  /* Fully rounded */
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
  overflow: visible;
  /* Ensure badge is not clipped */
}


.pill-btn:hover:not(.disabled) {
  background: var(--gray-50);

  border-color: var(--gray-400);
  /* Darken border on hover */
}

.pill-btn.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.pill-btn.disabled {
  opacity: 0.6;
  /* Use opacity for disabled look */
  cursor: not-allowed;
  background-color: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-200);
  pointer-events: none;
  /* Prevent interactions */
}

.pill-btn i {
  /* Font Awesome icons */
  font-size: 0.875rem;
  /* Match text size */
  line-height: 1;
}


.pill-btn.active:hover {
  /* Re-apply ALL active styles explicitly */
  background: var(--primary-600);
  /* KEEP the main active background */
  color: white;
  /* KEEP the active text color */
  border-color: var(--primary-600);
  /* KEEP the active border color */
  opacity: 1;
  /* Ensure full opacity */

  /* Optional: Add subtle brightness/darkness change for feedback if desired */
  /* filter: brightness(95%); */
  /* Example: Slightly darken */
  /* Or use the darker background color like before: */
  /* background: var(--primary-700); */
  /* border-color: var(--primary-700); */
}

.pill-btn.active:hover i {
  color: white !important;
  /* Force icon color */
}



/* "NEW" Badge */
.pill-btn[data-type="timing-match"]::after {
  content: 'NEW';
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #F59E0B;
  /* Orange/Yellow */
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  z-index: 1;
}

/* --- Option Groups (Toggle/Sliders) --- */
.slider-options {
  /* Optional: Add padding if needed */
  /* padding-top: 1rem; */
}

.option-group {
  margin-bottom: 1.75rem;
  /* Consistent spacing */
}

.option-group:last-of-type {
  /* Use last-of-type for robustness */
  margin-bottom: 0.5rem;
  /* Reduce space before actions */
}

.option-header,
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  /* Consistent spacing */
}

.option-label,
/* Label for Toggle */
.slider-label {
  /* Label for Slider */
  font-size: 0.875rem;
  /* Consistent label size */
  font-weight: 500;
  color: var(--gray-700);
}

.slider-value {
  /* Value display for Slider */
  font-size: 0.875rem;
  /* Match label size */
  color: var(--gray-600);
  min-width: 50px;
  /* Ensure space */
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reset-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--primary-600);
  cursor: pointer;
  opacity: 0.9;
  /* Slightly faded */
  transition: opacity 0.15s;
  line-height: 1;
  /* Prevent extra space */
}

.reset-btn:hover {
  opacity: 1;
}

.reset-btn svg,
.reset-btn i {
  /* Style both SVG & Font Awesome */
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
  /* Inherit color from button */
  font-size: 16px;
  /* Explicit FA size */
}

/* --- Toggle Switch --- */
.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 3rem;
  /* Slightly wider */
  height: 1.5rem;
  background: var(--gray-300);
  /* Default off color */
  border-radius: 999px;
  margin-right: 0.75rem;
  transition: background-color 0.2s ease;
}

.toggle-slider:before {
  /* The knob */
  content: "";
  position: absolute;
  top: 0.1875rem;
  /* Center vertically */
  left: 0.1875rem;
  /* Padding */
  width: 1.125rem;
  /* Knob size */
  height: 1.125rem;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle input:checked+.toggle-slider {
  background: var(--primary-600);
  /* On color */
}

.toggle input:checked+.toggle-slider:before {
  transform: translateX(1.5rem);
  /* Move knob */
}

.toggle-label {
  /* Text next to toggle */
  font-size: 0.875rem;
  /* Match other labels */
  color: var(--gray-700);
}

/* --- Sliders --- */
.slider-container {
  position: relative;
  padding: 0.5rem 0;
  /* Space for thumb */
}

.slider {
  -webkit-appearance: none;
  /* Override default look */
  appearance: none;
  width: 100%;
  height: 6px;
  /* Slightly thicker track */
  background: var(--gray-200);
  /* Track color */
  border-radius: 999px;
  outline: none;
  margin: 0.5rem 0;
  /* Vertical spacing */
  cursor: pointer;
}

/* Webkit (Chrome, Safari) Thumb */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.125rem;
  /* Thumb size */
  height: 1.125rem;
  background: var(--primary-600);
  /* Thumb color */
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  /* Optional white border */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  /* Subtle shadow */
  margin-top: -5px;
  /* Center thumb vertically on track */
}

/* Firefox Thumb */
.slider::-moz-range-thumb {
  width: 1.125rem;
  height: 1.125rem;
  background: var(--primary-600);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Optional: Track fill (Not fully cross-browser consistent) */
/* .slider { ... background: linear-gradient(to right, var(--primary-600) 50%, var(--gray-200) 50%); ... } */
/* Requires JS to update the gradient percentage based on value */


.slider-labels {
  /* Min/Max labels */
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  /* Space below slider */
  font-size: 0.75rem;
  /* Smaller text */
  color: var(--gray-500);
  padding: 0 0.1rem;
  /* Align roughly with track ends */
}

/* --- Action Buttons (Reset All / Apply) --- */
.options-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  /* Space above actions */
  padding-top: 1.5rem;
  /* Space below options */
  border-top: 1px solid var(--gray-200);
}

.reset-all-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  /* Consistent padding */
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  /* Standard radius */
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.reset-all-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.reset-all-btn svg {
  width: 16px;
  height: 16px;
}

.apply-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  /* Consistent padding */
  background: var(--primary-600);
  border: none;
  border-radius: 0.5rem;
  /* Standard radius */
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
  font-family: inherit;
}

.apply-btn:hover {
  background: var(--primary-700);
}

.apply-btn i {
  /* Font Awesome check icon */
  line-height: 1;
  /* margin-right: 0.5rem; Already handled by gap */
}



.option-disabled {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ================================== */
/* === End Dubbing Options Styles === */
/* ================================== */


/* Dub Section */
.dub-section {
  padding: 2rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.5), white);
}

.dub-btn {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(75, 75, 140, 0.3);
  position: relative;
  overflow: hidden;
}

.dub-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.dub-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 75, 140, 0.4);
}

.dub-btn:hover:not(:disabled)::before {
  left: 100%;
}

.dub-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--gray-400);
  box-shadow: none;
  transform: none;
}

.dub-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Spinner styles */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.dub-btn svg.animate-spin {
  margin-right: 0.5rem;
  /* Or use gap */
}

.status-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* Results Section */
.results-section {
  padding: 2rem;
  border-top: 1px solid var(--gray-200);
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.3), white);
}

.results-placeholder {
  text-align: center;
  color: var(--gray-500);
  padding: 3rem 2rem;
  background: white;
  border-radius: 1rem;
  border: 2px dashed var(--gray-300);
  transition: all 0.3s ease;
}

.results-placeholder:hover {
  border-color: var(--primary-300);
  background: var(--gray-50);
}

.results-placeholder svg {
  margin: 0 auto 1rem;
  display: block;
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  stroke: var(--primary-400);
}

.results-placeholder p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
}

.results-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-style: italic;
}

/* Dynamically added results */
.results-section video.preview-video {
  /* Target added video */
  width: 100%;
  max-width: 480px;
  /* Control max size */
  margin: 1rem auto;
  display: block;
  border-radius: 0.5rem;
  background: var(--gray-100);
  box-shadow: var(--shadow);
}

.results-section .download-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  /* Space above downloads */
  justify-content: center;
}

.results-section .download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-600);
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.results-section .download-button:hover {
  background: var(--primary-700);
}

.results-section .download-button i {
  line-height: 1;
}


/* Activity Log */
.log-section {
  border-top: 1px solid var(--gray-200);
}

.log-container {
  padding: 1rem;
  background: var(--gray-50);
}

/* Make the log header a flex container to position button */
.log-header {
  display: flex;
  justify-content: space-between;
  /* Pushes title left, button right */
  align-items: center;
  margin-bottom: 0.75rem;
  /* Space below header */
  padding-right: 0.5rem;
  /* Add padding so button isn't flush right */
}

/* Styles for the Clear button itself */
.log-header .clear-log-btn {
  /* Core button layout */
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;

  /* Specific Appearance (borrowed from .sample-btn / secondary style) */
  padding: 0.25rem 0.6rem;
  /* Smaller padding */
  background: var(--gray-50);
  /* Light background */
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  /* Slightly smaller radius */
  color: var(--gray-700);
  font-size: 0.75rem;
  /* Smaller text */

  /* No margin needed if using space-between on header */
  /* margin-left: auto; */
  /* Remove if using space-between */
}

.log-header .clear-log-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-800);
}

/* Icon inside clear button */
.log-header .clear-log-btn i {
  line-height: 1;
  font-size: 0.9em;
  /* Slightly smaller than text */
}

.log-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.log-title svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.log-content {
  height: 10rem;
  /* Slightly taller */
  overflow-y: auto;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  padding: 0;
}

.log-content .log-entry {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.log-content .log-entry:last-child {
  border-bottom: none;
}

.log-content .log-entry i {
  width: 1.1em;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  font-size: 0.9em;
  /* Adjust icon size if needed */
}

.log-content .log-entry.log-info i {
  color: var(--primary-600);
}

.log-content .log-entry.log-success i {
  color: #10B981;
}

.log-content .log-entry.log-warning i {
  color: #F59E0B;
}

.log-content .log-entry.log-error i {
  color: #EF4444;
}

.log-content .log-time {
  color: var(--gray-500);
  font-family: monospace;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.log-content .log-message {
  flex-grow: 1;
  color: var(--gray-800);
  word-break: break-word;
}


/* Footer */
.footer {
  /* margin-top: auto; */
  margin-top: 30px;
  /* Push to bottom */
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 3rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 80rem;
  margin: 0 auto;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.footer-description {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.store-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge img {
  height: 4rem;
  display: inline-block;
}

/* ======================== */
/* === Responsive Rules === */
/* ======================== */

@media (max-width: 768px) {

  /* Tablet and smaller */
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .hero-features {
    gap: 1.5rem;
  }

  .feature-item {
    font-size: 0.85rem;
  }

  .voice-container {
    flex-direction: column;
    align-items: stretch;
  }

  .credits {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .dropzone-specs {
    gap: 1rem;
  }

  .notice-content {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {

  /* Mobile */
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-features {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .dropzone-content {
    padding: 2rem 1rem;
  }

  .dropzone-specs {
    flex-direction: column;
    gap: 0.75rem;
  }

  .upload-section {
    padding: 1.5rem;
  }

  .options-actions {
    /* Stack Reset/Apply buttons */
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .reset-all-btn,
  .apply-btn {
    width: 100%;
    justify-content: center;
  }

  /* Adjust pills for smaller screens - 2 per row */
  .pill-btn {
    /* flex-basis: calc(50% - (0.75rem / 2)); */
    /* Try this for 2-column */
    /* text-align: center; */
    /* Center text if pills get small */
    /* justify-content: center; */
    padding: 0.6rem 0.8rem;
    /* Reduce padding */
  }

  .options-row {
    justify-content: center;
    /* Center pills */
  }

  .options-row.align-right {
    justify-content: center;
    /* Center align-right row too */
  }

  .options-content {
    padding: 1rem;
    /* Reduce padding in options panel */
  }
}

@media (max-width: 480px) {

  /* Very small screens */
  .hero-title {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .pill-btn {
    font-size: 0.8rem;
  }

  .options-row {
    gap: 0.5rem;
  }

  .dropzone-title {
    font-size: 1.1rem;
  }

  .dropzone-text {
    font-size: 0.9rem;
  }
}


/* Styles specific to Fallback Mode within Results */

.results-section .synthesis-result.fallback-mode {
  /* Styles for the main container in fallback */
  border: 1px dashed var(--gray-400);
  /* Example: Indicate fallback visually */
  padding: 1.5rem;
  background-color: var(--gray-50);
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.results-section .fallback-instruction {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  text-align: center;
  background-color: var(--primary-50);
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.results-section .preview-video {
  /* Already defined, ensure it applies */
  width: 100%;
  max-width: 480px;
  margin: 1rem auto;
  display: block;
  border-radius: 0.5rem;
  background: var(--gray-900);
  /* Darker background for video */
  box-shadow: var(--shadow);
}

.results-section .audio-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
  /* Or left */
}

.results-section .audio-player {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 1rem auto;
}

.results-section .sync-info.warning {
  background-color: #FFFBEB;
  /* yellow-50 */
  color: #B45309;
  /* yellow-700 */
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin: 1rem 0;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-section .sync-info.warning i {
  color: #D97706;
  /* yellow-600 */
}


/* Styles for the Sync & Play button in fallback mode */
.results-section .sync-button {
  /* Core button layout */
  display: inline-flex;
  /* Allows centering with margin: auto */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  /* If it were an <a> */
  white-space: nowrap;

  /* Specific Appearance (borrowed from .apply-btn / primary style) */
  padding: 0.625rem 1.25rem;
  /* Adjust padding as needed */
  background: var(--primary-600);
  border: 1px solid var(--primary-600);
  /* Match background */
  border-radius: 0.5rem;
  color: white;
  font-size: 0.9rem;
  /* Slightly larger perhaps */

  /* Positioning */
  margin: 1.5rem auto 1rem auto;
  /* Center horizontally */
  display: block;
  /* Needed for margin:auto horizontal centering */
  width: fit-content;
  /* Size button to its content */
}

.results-section .sync-button:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
}

/* Icon inside sync button */
.results-section .sync-button i {
  line-height: 1;
  font-size: 1em;
  /* Match button font size */
}

.results-section .download-container {
  /* Already defined */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  border-top: 1px solid var(--gray-200);
  /* Add separator */
  padding-top: 1.5rem;
}

.results-section .download-container .secondary-button {
  /* Target secondary buttons inside */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.results-section .download-container .secondary-button:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.results-section .download-container .secondary-button i {
  line-height: 1;
}


/* styles.css */

/* --- Video Trimmer Styles --- */
.video-trimmer {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  /* Light background */
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  /* Soft border */
  display: none !important;
}

.trimmer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trimmer-header label {
  font-weight: 500;
  color: #374151;
  /* Gray-700 */
}

.trimmer-times {
  font-size: 0.875rem;
  /* 14px */
  color: #4b5563;
  /* Gray-600 */
  font-variant-numeric: tabular-nums;
  /* Keep numbers aligned */
}

.trimmer-slider-container {
  padding: 0 0.5rem;
  /* Add some padding around the slider */
  margin-bottom: 0.5rem;
  /* Space below slider */
}

/* --- noUiSlider Customization --- */
#trimmerSlider {
  height: 8px;
  /* Make slider track thinner */
}

/* Base styling - target */
.noUi-target {
  background: #e5e7eb;
  /* gray-200 */
  border-radius: 4px;
  border: none;
  /* Remove default border */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
}

/* Connect bar (between handles) */
.noUi-connect {
  background: #6366f1;
  /* indigo-500 */
  border-radius: 4px;
  box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Handles */
.noUi-handle {
  height: 18px;
  /* Slightly larger handle */
  width: 18px;
  top: -5px;
  /* Position vertically centered */
  right: -9px;
  /* Center handle over the end */
  border-radius: 50%;
  /* Circular handles */
  background: #ffffff;
  /* White */
  border: 2px solid #4f46e5;
  /* indigo-600 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: grab;
}

.noUi-handle:focus {
  outline: none;
  /* Remove focus outline */
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
  /* Add focus ring */
}

.noUi-handle:active {
  cursor: grabbing;
  transform: scale(1.1);
  /* Slightly enlarge on grab */
}

/* Remove default box shadow before/after pseudo elements */
.noUi-handle::before,
.noUi-handle::after {
  display: none;
}

/* Tooltips (Optional - if you want tooltips above handles) */
.noUi-tooltip {
  display: none;
  /* Hide default tooltips if not needed */
  /* Or style them if you want them: */
  /* border: 1px solid #d1d5db; */
  /* border-radius: 3px; */
  /* background: #fff; */
  /* color: #374151; */
  /* padding: 2px 5px; */
  /* font-size: 12px; */
  /* white-space: nowrap; */
  /* position: absolute; */
  /* bottom: 120%; */
  /* left: 50%; */
  /* transform: translate(-50%, 0); */
}

.noUi-active .noUi-tooltip {
  /* display: block; */
  /* Show tooltip when handle is active */
}

/* --- Add this rule --- */

/* "Coming Soon" Badge for Disabled Pills */
.pill-btn[data-type="lip-sync"].disabled::after,
.pill-btn[data-type="smart-dub"].disabled::after {
  content: 'Coming Soon';
  /* The text to display */
  position: absolute;
  top: -8px;
  /* Position similar to the 'NEW' badge */
  right: -8px;
  /* Position similar to the 'NEW' badge */
  background-color: var(--gray-200);
  /* Use a subtle background */
  color: var(--gray-500);
  /* Use a muted text color */
  font-size: 0.65rem;
  /* Small text size */
  font-weight: 600;
  /* Medium weight */
  padding: 1px 4px;
  /* Small padding */
  border-radius: 4px;
  /* Rounded corners */
  line-height: 1;
  /* Tight line height */
  z-index: 1;
  /* Ensure it's above the button */
  white-space: nowrap;
  /* Prevent text wrapping */
  pointer-events: none;
  /* Don't interfere with clicks (though button is disabled) */
}

/* --- End of added rule --- */


/* Existing "NEW" Badge (ensure .pill-btn has overflow: visible) */
.pill-btn {
  /* ... other styles ... */
  position: relative;
  /* Make sure this is still here */
  overflow: visible;
  /* IMPORTANT: Allows the badge to show outside the button bounds */
}

.pill-btn[data-type="timing-match"]::after {
  content: 'NEW';
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #F59E0B;
  /* Orange/Yellow */
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  z-index: 1;
}

/* Ensure the disabled styles don't hide the pseudo-element */
.pill-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-200);
  pointer-events: none;
  /* No need to change overflow here */
}



/* ////////// */

/* Inline styles for the new component - ideally move to styles.css */
/* ===== START: Text to Video Section Styles ===== */
.text-to-video-card {
  background: white;
  /* Match existing card */
  border-radius: 1rem;
  /* Match existing card */
  border: 1px solid var(--gray-200);
  /* Match existing card */
  box-shadow: var(--shadow);
  /* Match existing card */
  padding: 1.5rem;
  /* Consistent padding */
  margin-top: 2rem;
  /* Space between cards */
  overflow: hidden;
  /* Match existing card */
  background: var(--gray-50);
  /* Light background like the image */
}

.ttv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ttv-title {
  font-size: 1.25rem;
  /* Adjust as needed */
  font-weight: 600;
  color: var(--gray-800);
}

.ttv-try-button {
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  /* Slightly darker button */
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ttv-try-button:hover {
  background: var(--gray-300);
}

.ttv-input-wrapper {
  /* Container for input area simulation */
  background: white;
  /* White inner box */
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  /* The outer dashed border effect: */
  border: 1px dashed transparent;
  /* Start transparent */
  background-clip: padding-box;
  /* Important for border effect */
  outline: 2px dashed var(--gray-300);
  /* Simulate the dashed outline */
  outline-offset: 6px;
  /* Space between outline and white box */
}


.ttv-input-label {
  display: block;
  font-size: 0.75rem;
  /* Small label */
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}


/* ===== Enhanced Tab Styles ===== */
.tabs-container {
  margin-bottom: 2rem;
}

.tabs-nav {
  display: flex;
  background: var(--gray-100);
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 0;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-button {
  flex: 1;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.tab-button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--gray-800);
}

.tab-button.active {
  background: white;
  color: var(--primary-700);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Tab panel content styling */
.tab-panel > .card,
.tab-panel > .text-to-video-card {
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== END: Tab Styles ===== */

/* ===== START: Text to Video Section Styles (Keep as is) ===== */
.text-to-video-card {
  background: white;
  /* Match existing card */
  border-radius: 1rem;
  /* Match existing card */
  border: 1px solid var(--gray-200);
  /* Match existing card */
  box-shadow: var(--shadow);
  /* Match existing card */
  padding: 1.5rem;
  /* Consistent padding */
  /* margin-top: 2rem; NO LONGER NEEDED */
  overflow: hidden;
  /* Match existing card */
  /* Changed background back to white to match dubbing card */
}

/* ... (rest of the .text-to-video-card styles remain the same) ... */
.ttv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ttv-title {
  font-size: 1.25rem;
  /* Adjust as needed */
  font-weight: 600;
  color: var(--gray-800);
}

.ttv-try-button {
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  /* Slightly darker button */
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ttv-try-button:hover {
  background: var(--gray-300);
}

.ttv-input-wrapper {
  /* Container for input area simulation */
  background: white;
  /* White inner box */
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  /* The outer dashed border effect: */
  border: 1px dashed transparent;
  /* Start transparent */
  background-clip: padding-box;
  /* Important for border effect */
  outline: 2px dashed var(--gray-300);
  /* Simulate the dashed outline */
  outline-offset: 6px;
  /* Space between outline and white box */
}


.ttv-input-label {
  display: block;
  font-size: 0.75rem;
  /* Small label */
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.ttv-input-field {
  /* This div simulates the text area content */
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.4;
  min-height: 3em;
  /* Give it some height */
  /* No border/background needed here, parent provides it */
}

.ttv-preview {
  margin-top: 1.5rem;
  /* More space above preview after input box */
  margin-bottom: 1.5rem;
  /* Space below preview */
  text-align: center;
  /* Center the image */
}

.ttv-preview img {
  display: block;
  /* Remove extra space below image */
  max-width: 100%;
  /* Responsive */
  /* Limit width if needed, e.g., max-width: 400px; */
  height: auto;
  /* Maintain aspect ratio */
  border-radius: 0.5rem;
  /* Rounded corners for image */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* Slightly stronger shadow for preview */
  margin: 0 auto;
  /* Ensure centering if max-width is applied */
  border: 1px solid var(--gray-200);
  /* Optional subtle border */
}

.ttv-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-top: 1rem;
  /* Space above description */
  max-width: 550px;
  /* Optional: Limit width */
  margin-left: auto;
  /* Center if max-width applied */
  margin-right: auto;
  /* Center if max-width applied */
  text-align: center;
  /* Center text */
}

/* Adjust outline offset on smaller screens if needed */
@media (max-width: 640px) {
  .ttv-input-wrapper {
    outline-offset: 4px;
  }

  .ttv-description {
    font-size: 0.85rem;
  }

  .ttv-title {
    font-size: 1.1rem;
  }

  .ttv-try-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .tabs-nav {
    /* Optional: Allow tabs to wrap on very small screens */
    /* flex-wrap: wrap; */
  }

  .tab-button {
    padding: 0.6rem 1rem;
    /* Adjust padding */
    font-size: 0.85rem;
  }
}

/* ===== END: Text to Video Section Styles ===== */


/* --- Text to Video Input Field --- */
.ttv-input-field {
  /* Now targeting the textarea */
  display: block;
  /* Make it block level */
  width: 100%;
  /* Take full width of wrapper */
  font-size: 0.9rem;
  color: var(--gray-800);
  /* Slightly darker text for input */
  line-height: 1.5;
  /* Adjust line height for textarea */
  background-color: transparent;
  /* Inherit white from wrapper */
  border: none;
  /* Remove default textarea border */
  resize: vertical;
  /* Allow vertical resizing, disable horizontal */
  min-height: 4.5em;
  /* ~3 rows * 1.5 line-height */
  padding: 0;
  /* Remove padding if wrapper handles it */
  margin: 0;
  /* Remove default margin */
  outline: none;
  /* Remove default focus outline */
  font-family: inherit;
  /* Use the body font */
}

.ttv-input-field::placeholder {
  color: var(--gray-400);
  /* Style placeholder text */
  opacity: 1;
  /* Ensure visibility */
}

.ttv-input-field:focus {
  /* Optional: Add a subtle focus indicator if needed,
     though the wrapper's outline might be sufficient */
  /* box-shadow: 0 0 0 2px rgba(75, 75, 140, 0.2); */
}

/* Adjust the wrapper if needed */
.ttv-input-wrapper {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  /* Padding is on the wrapper */
  margin-bottom: 1rem;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px dashed transparent;
  background-clip: padding-box;
  outline: 2px dashed var(--gray-300);
  outline-offset: 6px;
  /* Ensure the textarea doesn't overflow the padding */
  overflow: hidden;
  /* Might clip resize handle slightly, test */
}


.ttv-preview {
  margin-top: 1.5rem;
  /* More space above preview after input box */
  margin-bottom: 1.5rem;
  /* Space below preview */
  text-align: center;
  /* Center the image */
}

.ttv-preview img {
  display: block;
  /* Remove extra space below image */
  max-width: 100%;
  /* Responsive */
  /* Limit width if needed, e.g., max-width: 400px; */
  height: auto;
  /* Maintain aspect ratio */
  border-radius: 0.5rem;
  /* Rounded corners for image */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* Slightly stronger shadow for preview */
  margin: 0 auto;
  /* Ensure centering if max-width is applied */
  border: 1px solid var(--gray-200);
  /* Optional subtle border */
}

.ttv-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-top: 1rem;
  /* Space above description */
  max-width: 550px;
  /* Optional: Limit width */
  margin-left: auto;
  /* Center if max-width applied */
  margin-right: auto;
  /* Center if max-width applied */
  text-align: center;
  /* Center text */
}

/* Adjust outline offset on smaller screens if needed */
@media (max-width: 640px) {
  .ttv-input-wrapper {
    outline-offset: 4px;
  }

  .ttv-description {
    font-size: 0.85rem;
  }

  .ttv-title {
    font-size: 1.1rem;
  }

  .ttv-try-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* ===== END: Text to Video Section Styles ===== */


/* ===== START: Text to Video Section Styles ===== */
.text-to-video-card {
  background: white;
  /* Match existing card */
  border-radius: 1rem;
  /* Match existing card */
  border: 1px solid var(--gray-200);
  /* Match existing card */
  box-shadow: var(--shadow);
  /* Match existing card */
  padding: 1.5rem;
  /* Consistent padding */
  margin-top: 2rem;
  /* Space between cards */
  overflow: hidden;
  /* Match existing card */
  background: var(--gray-50);
  /* Light background like the image */
}

.ttv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ttv-title {
  font-size: 1.25rem;
  /* Adjust as needed */
  font-weight: 600;
  color: var(--gray-800);
}

.ttv-try-button {
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  /* Slightly darker button */
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ttv-try-button:hover {
  background: var(--gray-300);
}

.ttv-input-wrapper {
  /* Container for input area simulation */
  background: white;
  /* White inner box */
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  /* The outer dashed border effect: */
  border: 1px dashed transparent;
  /* Start transparent */
  background-clip: padding-box;
  /* Important for border effect */
  outline: 2px dashed var(--gray-300);
  /* Simulate the dashed outline */
  outline-offset: 6px;
  /* Space between outline and white box */
}


.ttv-input-label {
  display: block;
  font-size: 0.75rem;
  /* Small label */
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.ttv-input-field {
  /* This div simulates the text area content */
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.4;
  min-height: 3em;
  /* Give it some height */
  /* No border/background needed here, parent provides it */
}

.ttv-preview {
  margin-top: 1.5rem;
  /* More space above preview after input box */
  margin-bottom: 1.5rem;
  /* Space below preview */
  text-align: center;
  /* Center the image */
}

.ttv-preview img {
  display: block;
  /* Remove extra space below image */
  max-width: 100%;
  /* Responsive */
  /* Limit width if needed, e.g., max-width: 400px; */
  height: auto;
  /* Maintain aspect ratio */
  border-radius: 0.5rem;
  /* Rounded corners for image */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* Slightly stronger shadow for preview */
  margin: 0 auto;
  /* Ensure centering if max-width is applied */
  border: 1px solid var(--gray-200);
  /* Optional subtle border */
}

.ttv-description {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-top: 1rem;
  /* Space above description */
  max-width: 550px;
  /* Optional: Limit width */
  margin-left: auto;
  /* Center if max-width applied */
  margin-right: auto;
  /* Center if max-width applied */
  text-align: center;
  /* Center text */
}

/* Adjust outline offset on smaller screens if needed */
@media (max-width: 640px) {
  .ttv-input-wrapper {
    outline-offset: 4px;
  }

  .ttv-description {
    font-size: 0.85rem;
  }

  .ttv-title {
    font-size: 1.1rem;
  }

  .ttv-try-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--gray-200);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gray-500);
}

.placeholder-content svg {
  opacity: 0.7;
}

.placeholder-content span {
  font-size: 14px;
  font-weight: 500;
}

.ttv-actions {
  margin: 1.5rem 0;
  text-align: center;
}

.generate-btn {
  position: relative; /* Needed for absolute positioning of ::after */
  overflow: visible;  /* Allow badge to show outside button bounds */

  /* display: flex; */
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-600);
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin: 0 auto;
}

.generate-btn:hover:not(:disabled) {
  background: var(--primary-700);
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--gray-400);   /* Optional: Change bg color when disabled */

}

/* **** ADD THIS RULE FOR THE BADGE **** */
.generate-btn:disabled::after {
  content: 'Coming Soon';
  position: absolute;
  top: -8px;          /* Position above the button */
  right: -8px;         /* Position to the right */
  background-color: var(--primary-600); /* var(--gray-200); Subtle background */
  color: black;            /* Muted text color */
  font-size: 0.65rem;                /* Small text size */
  font-weight: 600;                  /* Medium weight */
  padding: 1px 4px;                  /* Small padding */
  border-radius: 4px;                /* Rounded corners */
  line-height: 1;                    /* Tight line height */
  z-index: 1;                        /* Ensure it's above the button */
  white-space: nowrap;               /* Prevent text wrapping */
  pointer-events: none;              /* Don't interfere with clicks */
}



/* ===== END: Text to Video Section Styles ===== */


/* Hide main content container and footer by default */
.main-app-content {
  display: none;
  /* Use display:none to completely remove from layout */
}

/* Style for the message shown to Brave users */
#brave-restriction-message {
  display: none;
  /* Hidden by default */
  padding: 40px 20px;
  text-align: center;
  font-family: sans-serif;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  /* Take full viewport height */
  display: flex;
  /* Use flexbox for centering */
  flex-direction: column;
  justify-content: center;
  /* Center vertically */
  align-items: center;
  /* Center horizontally */
  box-sizing: border-box;
}

#brave-restriction-message h1 {
  color: #dc3545;
  /* Reddish color for emphasis */
  margin-bottom: 15px;
}

#brave-restriction-message p {
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 600px;
  /* Limit width for readability */
}


/* Language Notice */
.language-notice {
  background: linear-gradient(135deg, var(--primary-50), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--primary-200);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.notice-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.notice-icon {
  width: 20px;
  height: 20px;
  stroke: var(--primary-600);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.notice-text {
  flex: 1;
}

.notice-text p {
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.mobile-app-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.mobile-app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.mobile-app-link:hover {
  color: var(--primary-700);
}

.mobile-app-link svg {
  stroke: currentColor;
}

@media (max-width: 640px) {
  .language-notice {
    flex-direction: column;
    text-align: center;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .language-notice svg {
    width: 20px;
    height: 20px;
  }
}


