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

:root {
  --purple: #8b5cf6;
  --pink: #ec4899;
  --blue: #3b82f6;
  --dark: #0a0a14;
  --card: #12121f;
  --card-hover: #1a1a2e;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: linear-gradient(145deg, #1a0533 0%, #0d0d2b 30%, #0c1a3a 60%, #0a0a14 100%);
  padding: 60px 24px 80px;
  text-align: center;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(236,73,153,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

/* Logo */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  animation: fadeDown 0.6s ease-out;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 18px;
  border: none;
  padding: 8px;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accent {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Text */
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
  animation: fadeDown 0.6s ease-out 0.1s both;
}

.gradient-text {
  display: block;
  background: linear-gradient(135deg, #c084fc, #f472b6, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.6;
  animation: fadeDown 0.6s ease-out 0.2s both;
}

/* Search Box */
.search-container {
  animation: fadeUp 0.7s ease-out 0.3s both;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 60px;
  padding: 8px 8px 8px 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-box:focus-within {
  border-color: rgba(139,92,246,0.5);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 3px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #fff;
  background: transparent;
  min-width: 0;
  font-family: inherit;
  padding: 8px 4px;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.3);
}

.btn-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-clear:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.btn-paste {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  font-family: inherit;
}

.btn-paste:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}

.btn-paste:active {
  transform: scale(0.96);
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn-download::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-download:hover::before {
  opacity: 1;
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.4);
}

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

.search-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
}

/* Wave */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* ===== Loader ===== */
.loader {
  text-align: center;
  padding: 60px 24px;
  z-index: 1;
  position: relative;
  animation: fadeIn 0.4s ease;
}

.loader-inner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--purple);
  border-radius: 50%;
  animation: pulse 1.5s ease-out infinite;
}

.pulse-ring.delay {
  animation-delay: 0.5s;
}

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.loader-icon {
  animation: bounce 1s ease infinite;
}

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

.loader-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(4) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ===== Error ===== */
.error-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 24px;
  color: #f87171;
  font-weight: 600;
  font-size: 1rem;
  z-index: 1;
  position: relative;
  animation: shake 0.4s ease;
}

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

/* ===== Result Card ===== */
.result {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
  width: 100%;
  z-index: 1;
  position: relative;
  animation: fadeUp 0.5s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.video-preview {
  width: 260px;
  min-height: 320px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: #000;
}

.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover .video-preview img {
  transform: scale(1.05);
}

.duration-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.video-info {
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-avatar svg {
  color: #fff;
}

.author-name {
  font-size: 1.15rem;
  font-weight: 700;
}

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

.stats {
  display: flex;
  gap: 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.stat svg {
  opacity: 0.6;
}

/* Download Buttons */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dl-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.dl-btn:hover::after {
  opacity: 1;
}

.dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.dl-btn:active {
  transform: translateY(0) scale(0.98);
}

.dl-video {
  background: linear-gradient(135deg, #06b6d4, var(--blue));
}

.dl-audio {
  background: linear-gradient(135deg, var(--pink), #f43f5e);
}

.dl-copy {
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c4b5fd;
}

.dl-copy:hover {
  background: rgba(139,92,246,0.25);
}

/* ===== QR Display ===== */
.qr-display {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.qr-display img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

.qr-url-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-all;
  line-height: 1.5;
}

/* ===== Features ===== */
.features {
  padding: 60px 24px 80px;
  z-index: 1;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.icon-purple {
  background: rgba(139,92,246,0.15);
  color: var(--purple);
}

.icon-pink {
  background: rgba(236,73,153,0.15);
  color: var(--pink);
}

.icon-blue {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ===== Download Counter ===== */
.download-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 50px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-bottom: 24px;
  animation: fadeDown 0.6s ease-out 0.25s both;
}

.download-counter strong {
  color: #c084fc;
  font-weight: 700;
}


/* ===== Platforms Section ===== */
.platforms {
  padding: 20px 24px 60px;
  text-align: center;
  z-index: 1;
  position: relative;
}

.platforms h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.platforms-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.platform-item:hover {
  transform: translateY(-4px);
}

/* ===== FAQ ===== */
.faq {
  padding: 40px 24px 60px;
  max-width: 700px;
  margin: 0 auto;
  z-index: 1;
  position: relative;
}

.faq h2 {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 28px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.1);
}

.faq-item[open] {
  background: var(--card-hover);
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--purple);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Share Section ===== */
.share-section {
  padding: 20px 24px 60px;
  text-align: center;
  z-index: 1;
  position: relative;
}

.share-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.share-whatsapp { background: #25D366; }
.share-twitter { background: #1DA1F2; }
.share-facebook { background: #1877F2; }
.share-copy {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
}

/* ===== Download Feedback ===== */
.dl-btn.downloading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.dl-btn.downloading::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.1) 10px,
    rgba(255,255,255,0.1) 20px
  );
  animation: downloadStripe 0.6s linear infinite;
}

@keyframes downloadStripe {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}

/* ===== PWA Install Banner ===== */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-top: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.pwa-banner-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-content img {
  border-radius: 10px;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.pwa-banner-text strong {
  display: block;
  font-size: 0.9rem;
}

.pwa-banner-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pwa-banner-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: transform 0.2s;
}

.pwa-banner-btn:hover {
  transform: scale(1.05);
}

.pwa-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.pwa-banner-close:hover {
  color: #fff;
}

@media (max-width: 420px) {
  .pwa-banner-text span {
    display: none;
  }

  .pwa-banner-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ===== Footer ===== */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

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

footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 24px;
  z-index: 1;
  position: relative;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== Animations ===== */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* ===== Utility ===== */
.hidden {
  display: none !important;
}

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

/* Tablets */
@media (max-width: 768px) {
  .hero {
    padding: 48px 20px 70px;
  }

  .search-box {
    flex-wrap: wrap;
    border-radius: var(--radius);
    padding: 12px;
    gap: 8px;
  }

  .search-icon {
    display: none;
  }

  .search-box input {
    width: 100%;
    order: -1;
    padding: 12px 8px;
    font-size: 1rem;
  }

  .btn-paste {
    flex: 0 0 auto;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .btn-download {
    flex: 1;
    justify-content: center;
    padding: 12px;
    font-size: 0.9rem;
  }

  .video-card {
    flex-direction: column;
  }

  .qr-display {
    margin-top: 20px;
  }

  .video-preview {
    width: 100%;
    min-height: 0;
    max-height: 400px;
    aspect-ratio: 9/10;
  }

  .video-info {
    padding: 24px 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    gap: 16px;
  }

  .feature-icon {
    margin: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
  }

  .feature-card h3 {
    margin-bottom: 2px;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .faq {
    padding: 30px 20px 50px;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .hero {
    padding: 36px 16px 60px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-sub {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .logo {
    margin-bottom: 20px;
  }

  .logo-text {
    font-size: 1.2rem;
  }

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

  .search-box {
    padding: 10px;
  }

  .btn-paste {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .btn-paste span {
    display: none;
  }

  .btn-download {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .result {
    padding: 0 16px;
    margin: 24px auto;
  }

  .video-info {
    padding: 20px 16px;
  }

  .download-buttons {
    gap: 8px;
  }

  .dl-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .stats {
    gap: 14px;
  }

  .features {
    padding: 40px 16px 60px;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 30px 24px 50px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-sub {
    margin-bottom: 20px;
  }

  .video-card {
    flex-direction: row;
  }

  .video-preview {
    width: 200px;
    min-height: 250px;
  }
}

/* Desktop large */
@media (min-width: 1200px) {
  .hero {
    padding: 80px 24px 100px;
  }
}


/* Branded card layout — column, centred image */
.video-card.branded-layout {
  flex-direction: column;
  align-items: center;
}
.qr-display.branded {
  width: 100%;
  max-width: 300px;
  min-height: 0;
  height: auto;
  aspect-ratio: 5 / 6;
  padding: 0;
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  margin: 20px auto 0;
}
.qr-display.branded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto !important;
  border-radius: 16px;
}
.video-card.branded-layout .video-info {
  width: 100%;
  padding: 18px 28px 24px;
}

/* Label editor */
.label-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label-editor-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.label-input {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(139,92,246,0.35);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.18s ease, background 0.18s ease;
  outline: none;
}
.label-input:focus {
  border-color: #8b5cf6;
  background: rgba(139,92,246,0.1);
}
.label-input::placeholder {
  color: var(--text-muted);
}
.label-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  display: block;
}
.label-counter.near-limit {
  color: #f59e0b;
}
.label-counter.at-limit {
  color: #ef4444;
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}
.vt-btn {
  padding: 9px 22px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.vt-btn:hover {
  color: #c4b5fd;
}
.vt-btn.vt-active {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.45);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(139, 92, 246, 0.95);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  pointer-events: none;
  white-space: nowrap;
}
.toast.hidden {
  display: none;
}

/* ===== Auth Widget (hero nav) ===== */
.hero-nav {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 10;
}
.auth-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}
.auth-widget a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.auth-widget a:hover { opacity: 0.8; }
.auth-user-name {
  color: #94a3b8;
}
.auth-tier-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-tier-badge.tier-pro {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
}
.auth-tier-badge.tier-business {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

/* ===== Pro Panel ===== */
.pro-panel {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pro-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c084fc;
}
.pro-badge-inline {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  letter-spacing: 0.06em;
}
.pro-field { display: flex; flex-direction: column; gap: 8px; }
.pro-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Module style picker */
.module-style-picker {
  display: flex;
  gap: 8px;
}
.ms-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #64748b;
  cursor: pointer;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.18s;
}
.ms-btn svg { fill: currentColor; }
.ms-btn:hover { border-color: #8b5cf6; color: #c084fc; }
.ms-btn.ms-active {
  border-color: #8b5cf6;
  background: rgba(139,92,246,0.15);
  color: #c084fc;
}

/* Logo upload zone */
.logo-upload-zone {
  position: relative;
  border: 1.5px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.logo-upload-zone:hover {
  border-color: #8b5cf6;
  background: rgba(139,92,246,0.05);
}
.logo-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.logo-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 0.85rem;
  text-align: center;
  pointer-events: none;
}
.logo-upload-content svg { color: #475569; }
.logo-upload-content u { color: #8b5cf6; }
.logo-upload-content small { font-size: 0.75rem; color: #334155; }

.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.logo-preview img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.logo-remove-btn {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  transition: background 0.2s;
}
.logo-remove-btn:hover { background: rgba(239,68,68,0.25); }

/* Upgrade CTA for free users */
.upgrade-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(139,92,246,0.08);
  border: 1px dashed rgba(139,92,246,0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
  flex-wrap: wrap;
}
.upgrade-btn {
  color: #c084fc;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.upgrade-btn:hover { text-decoration: underline; }
