/* ===============================
   CORE RESET
=============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f9fafb;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  min-height: 100vh;
}

/* ===============================
   BACKGROUND WRAPPER
=============================== */
.bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: relative;
}

/* Subtle background noise */
.bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  z-index: 0;
}

.bg > * {
  position: relative;
  z-index: 1;
}

/* ===============================
   NAVBAR
=============================== */
.navbar {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  justify-content: center;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-inner {
  width: 100%;
  max-width: 1024px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-left span {
  color: #22c55e;
}

.nav-right {
  display: flex;
  gap: 24px;
}

.nav-right a {
  color: #e5e7eb;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-right a:hover,
.nav-right a.active {
  color: #22c55e;
}

/* ===============================
   HEADER
=============================== */
.header {
  max-width: 960px;
  margin: 0 auto 24px;
  text-align: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo span {
  color: #22c55e;
}

.tagline {
  font-size: 0.95rem;
  color: #9ca3af;
}

/* ===============================
   MAIN LAYOUT
=============================== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

/* ===============================
   MAIN CARD
=============================== */
.card {
  width: 100%;
  max-width: 720px;
  background: radial-gradient(circle at top left, rgba(34,197,94,0.15), transparent 55%) #020617;
  border-radius: 24px;
  padding: 28px 24px;
  border: 1px solid rgba(148,163,184,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.card h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 20px;
}

/* ===============================
   VIDEO PREVIEW
=============================== */
.preview {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  animation: fadeIn 0.35s ease;
}

.preview.hidden {
  display: none;
}

.preview img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#preview-title {
  font-size: 0.9rem;
  font-weight: 600;
}

#preview-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ===============================
   FORM
=============================== */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #d1d5db;
}

.field input,
.field select {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.95);
  padding: 10px 14px;
  color: #f9fafb;
}

.field input:focus,
.field select:focus {
  border-color: #22c55e;
  outline: none;
}

.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

/* ===============================
   FORMAT TOGGLE
=============================== */
.format-toggle {
  display: flex;
  gap: 6px;
}

.format-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
}

.format-btn.active {
  background: #22c55e;
  color: #022c22;
}

/* ===============================
   DOWNLOAD BUTTON
=============================== */
.download-btn {
  border-radius: 999px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #a3e635);
  border: none;
}

.download-btn.loading {
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  50% { transform: scale(0.98); }
}

/* ===============================
   STATUS
=============================== */
.status {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 6px;
}

.status.progress {
  color: #a3e635;
  animation: fadePulse 1.2s infinite;
}

@keyframes fadePulse {
  50% { opacity: 1; }
}

/* ===============================
   NOTE
=============================== */
.note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #9ca3af;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(148,163,184,0.5);
}

/* ===============================
   ADS
=============================== */
.ad-banner {
  margin: 30px auto;
  text-align: center;
}

.native-ad {
  max-width: 720px;
  margin: 25px auto;
}

/* ===============================
   SEO SECTION
=============================== */
.seo-section {
  max-width: 760px;
  margin: 50px auto 30px;
  padding: 20px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.seo-section h2 {
  margin-bottom: 10px;
}

.seo-intro {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 12px;
}

.seo-links {
  list-style: none;
}

.seo-links li {
  margin: 6px 0;
}

.seo-links a {
  color: #60a5fa;
  text-decoration: none;
}

.seo-links a:hover {
  text-decoration: underline;
}

/* ===============================
   FAQ
=============================== */
.faq-section {
  max-width: 760px;
  margin: 20px auto 60px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faq-section h3 {
  margin-top: 14px;
}

/* ===============================
   FOOTER
=============================== */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ===============================
   ANIMATIONS
=============================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===============================
   MOBILE
=============================== */
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .nav-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}
