/* ==========================================================================
   PinXtract - Design System & Modern Aesthetics
   Curated palette, Glassmorphism, Fluid Typography, Micro-animations
   ========================================================================== */

:root {
  /* Brand Core Colors */
  --color-primary: #e60023;
  --color-primary-hover: #b6001a;
  --color-primary-light: rgba(230, 0, 35, 0.12);
  --color-primary-glow: rgba(230, 0, 35, 0.35);
  --color-accent: #ff4757;
  --color-accent-grad: linear-gradient(135deg, #e60023 0%, #ff5252 50%, #ff7675 100%);
  
  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.12);
  --color-info: #3b82f6;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-body: #0a0b10;
  --bg-surface: #12141c;
  --bg-surface-elevated: #1a1e2b;
  --bg-card: rgba(26, 30, 43, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-input: #151824;
  --bg-input-border: rgba(255, 255, 255, 0.12);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);

  --header-bg: rgba(10, 11, 16, 0.85);
  --banner-bg: linear-gradient(90deg, #1e1115 0%, #2b1117 50%, #151824 100%);
  --banner-border: rgba(230, 0, 35, 0.25);
}

/* Light Theme */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-border: rgba(0, 0, 0, 0.08);
  --bg-input: #ffffff;
  --bg-input-border: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.05);

  --header-bg: rgba(255, 255, 255, 0.9);
  --banner-bg: linear-gradient(90deg, #fff1f2 0%, #fee2e2 50%, #f8fafc 100%);
  --banner-border: rgba(230, 0, 35, 0.2);
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
}

input, select {
  font-family: inherit;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top Notification Banner */
.top-banner {
  background: var(--banner-bg);
  border-bottom: 1px solid var(--banner-border);
  padding: 0.6rem 0;
  font-size: 0.875rem;
  position: relative;
  z-index: 100;
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge-accent {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.banner-text {
  color: var(--text-main);
  flex: 1;
}

.banner-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.25rem;
  transition: color var(--transition-fast);
}

.banner-close:hover {
  color: var(--text-main);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
  transition: background-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--color-primary-glow);
  transition: transform var(--transition-fast);
}

.logo-icon-wrap.small {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.brand-logo:hover .logo-icon-wrap {
  transform: scale(1.06) rotate(-3deg);
}

.logo-pin-icon {
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.logo-text-group {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

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

.logo-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Nav Links (Desktop) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  padding: 0.4rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  border: 1px solid var(--bg-card-border);
}

.icon-btn:hover {
  background: var(--bg-card-border);
  transform: translateY(-1px);
}

.history-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-body);
}

/* Theme Toggle */
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

.btn-extension-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(230, 0, 35, 0.2);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-extension-badge:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1rem 1.25rem;
}

.mobile-nav-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-card-border);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

/* Ambient Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230, 0, 35, 0.35) 0%, transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 71, 87, 0.25) 0%, transparent 70%);
  top: 15%;
  left: 5%;
}

.glow-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  top: 25%;
  right: 5%;
}

.hero-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  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); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.gradient-text {
  background: var(--color-accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Mode Pills Selector */
.mode-pills {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.mode-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.mode-pill:hover {
  color: var(--text-main);
}

.mode-pill.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

/* Search Card Container */
.search-box-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box-card:focus-within {
  border-color: rgba(230, 0, 35, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(230, 0, 35, 0.25);
}

/* Input Wrapper */
.download-form {
  width: 100%;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--bg-input-border);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  gap: 0.6rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--color-primary);
}

.input-icon-left {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--text-main);
  padding: 0.6rem 0;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.btn-clear {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  padding: 0.4rem;
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.btn-clear:hover {
  color: var(--text-main);
}

.btn-paste {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-paste:hover {
  background: var(--bg-card-border);
  color: var(--text-main);
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent-grad);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px var(--color-primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(230, 0, 35, 0.5);
}

.btn-download:active {
  transform: translateY(0);
}

/* Progress Tracker Bar */
.progress-wrap {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-card-border);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--color-accent-grad);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Quick Example Chips */
.examples-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.15rem;
  flex-wrap: wrap;
  justify-content: center;
}

.examples-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
}

.examples-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.example-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.775rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.example-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Notice Card */
.notice-card {
  max-width: 780px;
  margin: 1.5rem auto 0;
  background: var(--color-danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.notice-icon {
  font-size: 1.4rem;
}

.notice-content {
  flex: 1;
}

.notice-content strong {
  display: block;
  color: var(--color-danger);
  font-size: 0.95rem;
}

.notice-content p {
  color: var(--text-main);
  font-size: 0.875rem;
  margin: 0;
}

.notice-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.25rem;
}

/* Results Section */
.results-section {
  max-width: 900px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  animation: slide-up 0.4s ease forwards;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--bg-card-border);
  padding-bottom: 1rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
}

.result-actions-top {
  display: flex;
  gap: 0.5rem;
}

.btn-action-small {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-action-small:hover {
  background: var(--bg-card-border);
  color: var(--text-main);
}

/* Result Grid */
.result-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Media Player Preview */
.result-preview-col {
  width: 100%;
}

.media-player-container {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 480px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-video,
.media-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.tool-btn {
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.tool-btn:hover {
  color: var(--text-main);
}

.speed-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-dim);
}

.speed-selector select {
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  font-size: 0.75rem;
}

/* Metadata & Details Column */
.result-details-col {
  display: flex;
  flex-direction: column;
}

.result-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.creator-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}

.creator-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.creator-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.creator-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.creator-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.creator-name:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.result-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stats-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.stat-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Download Options Box */
.download-options-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.options-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-option-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-option-download:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.btn-option-download.primary {
  background: var(--color-accent-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

.btn-option-download.primary:hover {
  box-shadow: 0 6px 18px rgba(230, 0, 35, 0.45);
}

.btn-option-download.primary .option-size-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.option-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.option-quality {
  font-weight: 700;
  font-size: 0.95rem;
}

.option-format-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.option-size-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
}

.option-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Secondary Actions */
.action-buttons-row {
  display: flex;
  gap: 0.75rem;
}

.btn-utility {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-utility:hover {
  background: var(--bg-card-border);
  color: var(--text-main);
}

/* Multi-Item Gallery */
.gallery-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-card-border);
}

.gallery-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--bg-card-border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-download {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.gallery-item:hover .gallery-item-download {
  opacity: 1;
}

/* Trust Bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Common Section Layout */
.section-container {
  padding: 5rem 0;
  position: relative;
}

.bg-surface {
  background-color: var(--bg-surface);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Platform Tabs (How To) */
.platform-tabs {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.platform-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.platform-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.step-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 0, 35, 0.3);
}

.step-number {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--bg-card-border);
  line-height: 1;
}

.step-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Comparison Cards */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.comparison-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--bg-card-border);
}

.comparison-card.works-card {
  border-top: 4px solid var(--color-success);
}

.comparison-card.not-works-card {
  border-top: 4px solid var(--color-danger);
}

.comparison-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.badge-icon.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-icon.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.comparison-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.comparison-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.icon-check {
  color: var(--color-success);
  font-weight: 800;
  margin-top: 2px;
}

.icon-cross {
  color: var(--color-danger);
  font-weight: 800;
  margin-top: 2px;
}

.comparison-list strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.comparison-list p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.quality-callout {
  background: var(--bg-surface-elevated);
  border-left: 4px solid var(--color-info);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.quality-callout strong {
  color: var(--text-main);
}

/* Supported Formats Card */
.supported-formats-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--bg-card-border);
  gap: 1.5rem;
}

.format-row:last-child {
  border-bottom: none;
}

.format-col-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 200px;
}

.format-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.format-col-label strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.format-code {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--bg-input-border);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-main);
  overflow-x: auto;
  white-space: nowrap;
}

.btn-copy-format {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-copy-format:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Extension Banner Card */
.extension-banner-card {
  background: linear-gradient(135deg, rgba(230, 0, 35, 0.15) 0%, rgba(26, 30, 43, 0.8) 100%);
  border: 1px solid rgba(230, 0, 35, 0.25);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
}

.extension-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.extension-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.extension-buttons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-store {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-fast);
}

.btn-store:hover {
  transform: translateY(-2px);
}

/* FAQ Accordion */
.faq-search-wrapper {
  max-width: 480px;
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-full);
  gap: 0.65rem;
}

.faq-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
}

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

.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: rgba(230, 0, 35, 0.4);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
}

.faq-icon {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Timeline */
.timeline-container {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--bg-card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-body);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.timeline-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin: 0;
}

/* History Drawer & Modals */
.history-drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.history-drawer-backdrop.open {
  display: block;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border-left: 1px solid var(--bg-card-border);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.history-drawer-backdrop.open .history-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.btn-clear-history {
  font-size: 0.8rem;
  color: var(--color-danger);
  font-weight: 600;
}

.drawer-close,
.modal-close {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
}

.history-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

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

.history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-history-load {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}

.history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
}

/* QR Code Modal */
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.qr-code-box {
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin-bottom: 1.25rem;
}

.qr-code-box img {
  display: block;
}

.modal-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-card-border);
  padding: 4.5rem 0 2rem;
}

.footer-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 320px;
}

.footer-links-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  color: var(--text-main);
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links-col a:hover {
  color: var(--color-primary);
}

.footer-disclaimer-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-card-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-legal-links a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .result-grid { grid-template-columns: 1fr; }
  .media-player-container { max-height: 400px; aspect-ratio: 16/9; }
  .footer-top-row { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-container { height: 64px; }
  .btn-extension-badge { display: none; }
  .hero-section { padding: 3rem 0 2.5rem; }
  .input-wrapper { flex-wrap: wrap; padding: 0.5rem; }
  .url-input { order: 1; width: 100%; font-size: 0.95rem; }
  .input-icon-left { order: 2; }
  .btn-paste { order: 3; }
  .btn-download { order: 4; width: 100%; justify-content: center; margin-top: 0.35rem; }
  .format-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .format-code { width: 100%; }
  .footer-top-row { grid-template-columns: 1fr; }
  .trust-bar { gap: 1.25rem; }
}

/* ==========================================================================
   Language Switcher & Internationalization (i18n)
   ========================================================================== */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.65rem;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-dropdown-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary-light);
  transform: translateY(-1px);
}

.lang-dropdown-btn .globe-icon {
  color: var(--color-primary);
}

.lang-code-text {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.lang-dropdown-btn .chevron-icon {
  transition: transform var(--transition-fast);
  color: var(--text-dim);
}

.lang-dropdown-wrapper.open .chevron-icon {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  max-height: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown-wrapper.open .lang-menu {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-menu-header {
  padding: 0.65rem 0.95rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.02);
}

.lang-menu-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 330px;
  padding: 0.35rem;
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.lang-menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  transform: translateX(2px);
}

.lang-menu-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

.lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.lang-name {
  flex: 1;
}

.lang-check {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 0.85rem;
}

/* Mobile Language Switcher */
.mobile-lang-container {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-card-border);
}

.mobile-lang-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
}

.mobile-lang-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-lang-chip.active,
.mobile-lang-chip:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}

/* RTL Layout Support (Arabic) */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .logo-text-group,
[dir="rtl"] .nav-links,
[dir="rtl"] .steps-grid,
[dir="rtl"] .comparison-grid,
[dir="rtl"] .footer-top-row,
[dir="rtl"] .footer-bottom-bar {
  direction: rtl;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .input-icon-left {
  left: auto;
  right: 1.25rem;
}

[dir="rtl"] .url-input {
  padding-left: 140px;
  padding-right: 3.25rem;
  text-align: right;
}

[dir="rtl"] .btn-paste {
  right: auto;
  left: 1.25rem;
}

[dir="rtl"] .btn-clear {
  right: auto;
  left: 6.75rem;
}

[dir="rtl"] .btn-download .btn-arrow {
  transform: rotate(180deg);
}

[dir="rtl"] .option-left,
[dir="rtl"] .history-item,
[dir="rtl"] .format-row {
  direction: rtl;
}

[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .faq-question .faq-icon {
  margin-left: 0;
  margin-right: auto;
}

