/* ===== CSS Custom Properties ===== */
:root {
  --bg-primary: #070714;
  --bg-secondary: #0B0B1E;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-active: rgba(124, 58, 237, 0.5);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.35);
  --gradient-1: #7C3AED;
  --gradient-2: #3B82F6;
  --gradient-3: #06B6D4;
  --gradient-start: #7C3AED;
  --gradient-end: #3B82F6;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}

::selection {
  background: rgba(124, 58, 237, 0.3);
  color: white;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== Ambient Background ===== */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(ellipse 50% 40% at 20% 70%, rgba(6,182,212,0.06) 0%, transparent 50%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent 70%);
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, rgba(59,130,246,0.2), transparent 70%);
  animation: orbFloat 25s ease-in-out infinite reverse;
}

.orb-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6,182,212,0.1), transparent 70%);
  animation: orbFloat 30s ease-in-out infinite 5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -80px) scale(1.1); }
  50% { transform: translate(-30px, 50px) scale(0.95); }
  75% { transform: translate(60px, 30px) scale(1.05); }
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent 70%);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 7, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: transparent;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(124,58,237,0.15);
}

/* ===== Main ===== */
.main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Hero Section ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease both;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-2);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  animation: fadeUp 0.8s ease 0.1s both;
}

.hero-title-line {
  display: block;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.5em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 4px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(14px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeUp 0.8s ease 0.2s both;
}

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

/* ===== Download Card ===== */
.download-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-normal);
  animation: fadeUp 0.8s ease 0.3s both;
  position: relative;
}

.download-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.download-card.has-error {
  border-color: rgba(239,68,68,0.3);
  box-shadow: 0 0 30px rgba(239,68,68,0.06);
}

.download-card.is-valid {
  border-color: rgba(16,185,129,0.2);
}

/* Input Wrapper */
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--border-active);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.input-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.input-wrapper:focus-within .input-icon {
  color: var(--gradient-1);
}

#videoUrl {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  padding: 16px 0;
  min-width: 0;
}

#videoUrl::placeholder {
  color: var(--text-muted);
}

.input-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.input-clear:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
}

.input-clear.visible {
  display: flex;
}

.input-clear svg {
  width: 14px;
  height: 14px;
}

.url-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 20px;
  transition: var(--transition-fast);
}

.url-hint.error {
  color: var(--error);
}

.url-hint.success {
  color: var(--success);
}

/* ===== Button Row (Download + Help) ===== */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-row .download-btn {
  flex: 1;
  margin-top: 0;
}

/* Download Button */
.download-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-fast);
  opacity: 0.5;
  transform: translateY(0);
  letter-spacing: 0.01em;
}

.download-btn:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

.download-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.35);
}

.download-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(124,58,237,0.25);
}

.download-btn:disabled {
  cursor: not-allowed;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(59,130,246,0.3));
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.download-btn:not(:disabled):hover .btn-icon {
  transform: translateY(2px);
}

/* Help Button */
.help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 16px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.help-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.help-btn svg {
  width: 20px;
  height: 20px;
}

/* ===== Help Modal ===== */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 7, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  padding: 24px;
}

.help-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.help-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 36px 32px;
  text-align: left;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.help-overlay.active .help-modal {
  transform: translateY(0);
}

.help-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-fast);
  padding: 0;
}

.help-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.help-close svg {
  width: 18px;
  height: 18px;
}

.help-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 28px;
  text-align: center;
}

.help-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.help-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.help-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-heading);
}

.help-step-body h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.help-step-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.help-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.help-note svg {
  width: 18px;
  height: 18px;
  color: var(--gradient-1);
  flex-shrink: 0;
}

/* ===== Contact Modal ===== */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 7, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  padding: 24px;
}

.contact-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.contact-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 36px 32px;
  text-align: left;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.contact-overlay.active .contact-modal {
  transform: translateY(0);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
}

.contact-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--gradient-2);
  flex-shrink: 0;
}

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 560px;
  margin-top: 40px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.feature-card {
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.1);
  color: var(--gradient-2);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Hero Footer ===== */
.hero-footer {
  margin-top: 60px;
  font-size: 12px;
  color: var(--text-muted);
  animation: fadeUp 0.8s ease 0.5s both;
}

.footer-link {
  color: var(--gradient-2);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--gradient-1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 7, 20, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-container {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 0 24px;
}

/* Loading Ring */
.loading-ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 32px;
}

.ring-spinner {
  position: absolute;
  inset: 0;
  animation: ringSpin 4s linear 2s infinite;
}

.ring-spinner svg {
  width: 100%;
  height: 100%;
}

.ring-bg {
  opacity: 0.3;
}

.ring-fill {
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  animation: ringDraw 2s ease-in-out forwards;
}

@keyframes ringDraw {
  to { stroke-dashoffset: 0; }
}

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

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-pulse {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(124,58,237,0.1);
  animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.1; }
}

.ring-icon {
  width: 32px;
  height: 32px;
  color: var(--gradient-2);
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Loading Text */
.loading-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  min-height: 30px;
  transition: opacity 0.3s ease;
}

.loading-title.changing {
  opacity: 0;
  transform: translateY(8px);
}

.loading-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  min-height: 20px;
  transition: opacity 0.3s ease;
}

.loading-subtitle.changing {
  opacity: 0;
  transform: translateY(8px);
}

/* Progress Bar */
.loading-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.loading-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  transition: width 0.5s ease;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading Info */
.loading-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Loading Steps */
.loading-steps {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.step.active {
  color: var(--gradient-2);
}

.step.done {
  color: var(--success);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transition: var(--transition-fast);
}

.step.active .step-dot {
  box-shadow: 0 0 8px currentColor;
}

.step.done .step-dot {
  box-shadow: 0 0 8px currentColor;
}

/* ===== Notification ===== */
.notification {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  max-width: 480px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.notification.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.notif-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--success);
}

.notification.error .notif-icon { color: var(--error); }
.notification.warning .notif-icon { color: var(--warning); }

.notif-icon svg {
  width: 100%;
  height: 100%;
}

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

.notif-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notif-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-line;
}

.notif-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.notif-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
}

.notif-close svg {
  width: 14px;
  height: 14px;
}

/* ===== Toast Container ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 299;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

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

/* Tablet & below */
@media (max-width: 900px) {
  .help-modal,
  .contact-modal {
    margin: 0 16px;
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

/* Tablet */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    height: 56px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 72px 16px 36px;
  }

  .hero-glow {
    width: 400px;
    height: 200px;
  }

  .hero-badge {
    font-size: 10px;
    padding: 5px 12px;
  }

  .hero-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .hero-title-line {
    font-size: 0.45em;
  }

  .hero-subtitle {
    font-size: 14px;
    padding: 0 8px;
  }

  .download-card {
    padding: 20px;
    border-radius: var(--radius-md);
  }

  .input-wrapper {
    padding: 0 12px;
  }

  #videoUrl {
    font-size: 14px;
    padding: 14px 0;
  }

  .download-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 50px;
  }

  .help-btn {
    min-width: 50px;
    width: 50px;
  }

  .btn-row {
    gap: 8px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 4px;
  }

  .feature-card {
    padding: 18px 16px;
  }

  .loading-ring {
    width: 140px;
    height: 140px;
  }

  .loading-title {
    font-size: 18px;
  }

  .loading-subtitle {
    font-size: 13px;
  }

  .loading-steps {
    gap: 12px;
    flex-wrap: wrap;
  }

  .loading-container {
    padding: 0 20px;
  }

  .notification {
    right: 12px;
    left: 12px;
    top: 68px;
    max-width: none;
  }

  .help-modal,
  .contact-modal {
    padding: 28px 20px 24px;
  }

  .help-title {
    font-size: 20px;
  }

  .contact-item {
    padding: 12px 16px;
    font-size: 13px;
  }

  .hero-footer {
    margin-top: 40px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .navbar {
    padding: 0 12px;
    height: 50px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 16px;
  }

  .hero {
    padding: 64px 12px 28px;
  }

  .hero-glow {
    width: 280px;
    height: 140px;
    top: 15%;
  }

  .hero-badge {
    font-size: 9px;
    padding: 4px 10px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-title-line {
    font-size: 0.4em;
    margin-top: 2px;
  }

  .hero-subtitle {
    font-size: 13px;
    margin-bottom: 28px;
  }

  .download-card {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  .input-wrapper {
    padding: 0 10px;
    gap: 8px;
  }

  .input-icon {
    width: 16px;
    height: 16px;
  }

  #videoUrl {
    font-size: 13px;
    padding: 12px 0;
  }

  .url-hint {
    font-size: 11px;
    margin-top: 6px;
  }

  .download-btn {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 46px;
    gap: 8px;
  }

  .help-btn {
    min-width: 46px;
    width: 46px;
  }

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

  .features {
    gap: 10px;
    margin-top: 28px;
  }

  .feature-card {
    padding: 14px 12px;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
  }

  .feature-card h3 {
    font-size: 13px;
  }

  .feature-card p {
    font-size: 11px;
  }

  .hero-footer {
    margin-top: 32px;
    font-size: 11px;
  }

  .loading-container {
    padding: 0 16px;
  }

  .loading-ring {
    width: 110px;
    height: 110px;
  }

  .ring-pulse {
    width: 44px;
    height: 44px;
  }

  .ring-icon {
    width: 24px;
    height: 24px;
  }

  .loading-title {
    font-size: 16px;
  }

  .loading-subtitle {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .loading-steps {
    gap: 10px;
  }

  .step {
    font-size: 10px;
  }

  .notification {
    top: 60px;
    right: 8px;
    left: 8px;
    padding: 12px 14px;
    gap: 10px;
  }

  .notif-title {
    font-size: 13px;
  }

  .notif-message {
    font-size: 11px;
  }

  .help-modal,
  .contact-modal {
    padding: 24px 16px 20px;
    border-radius: var(--radius-md);
  }

  .help-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .help-step {
    gap: 12px;
  }

  .help-step-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .help-step-body h4 {
    font-size: 14px;
  }

  .help-step-body p {
    font-size: 12px;
  }

  .help-note {
    padding: 10px 14px;
    font-size: 11px;
  }

  .help-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero {
    padding: 56px 8px 24px;
  }

  .hero-title {
    font-size: 20px;
  }

  .download-card {
    padding: 12px;
  }

  #videoUrl {
    font-size: 12px;
    padding: 10px 0;
  }

  .download-btn {
    font-size: 13px;
    padding: 10px 12px;
    min-height: 40px;
  }

  .help-btn {
    min-width: 40px;
    width: 40px;
  }

  .btn-row {
    gap: 6px;
  }

  .features {
    gap: 8px;
    margin-top: 24px;
  }

  .feature-card {
    padding: 10px 8px;
  }
}

/* Small desktop */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    padding: 90px 32px 48px;
  }

  .download-card {
    max-width: 500px;
  }

  .features {
    gap: 12px;
  }

  .feature-card {
    padding: 16px 12px;
  }
}

/* ===== App Wrapper (hidden during preloader) ===== */
.app-wrapper {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.app-wrapper.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== Pre-Loader ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.preloader-lottie {
  width: 160px;
  height: 160px;
}

.preloader-text {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.preloader-dots span {
  animation: dotPulse 1.4s ease-in-out infinite;
  opacity: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--gradient-2);
}

.preloader-dots span:nth-child(1) { animation-delay: 0s; }
.preloader-dots span:nth-child(2) { animation-delay: 0.2s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.preloader-track {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  min-height: 16px;
  transition: opacity 0.4s ease;
}

/* ===== Custom Cursor ===== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: width 0.15s ease, height 0.15s ease, opacity 0.3s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gradient-2);
  box-shadow:
    0 0 6px rgba(59,130,246,0.6),
    0 0 12px rgba(59,130,246,0.3);
  opacity: 0;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.04);
  box-shadow:
    0 0 12px rgba(124,58,237,0.08),
    inset 0 0 12px rgba(124,58,237,0.04);
  opacity: 0;
  transition:
    width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease,
    opacity 0.3s ease;
}

.cursor-ring.hover {
  width: 48px;
  height: 48px;
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.08);
}

.cursor-dot.visible,
.cursor-ring.visible {
  opacity: 1;
}

/* Hide cursor and restore default on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  html, body, *, *::before, *::after {
    cursor: auto;
  }
}

/* Responsive pre-loader */
@media (max-width: 768px) {
  .preloader-lottie {
    width: 120px;
    height: 120px;
  }

  .preloader-text {
    font-size: 16px;
  }

  .preloader-track {
    width: 160px;
  }
}
