/* ========================================
   GIF2Boot — Premium Design System
   ======================================== */

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

:root {
  --clr-bg: #0a0a1a;
  --clr-bg-2: #111128;
  --clr-surface: rgba(255,255,255,0.04);
  --clr-surface-hover: rgba(255,255,255,0.08);
  --clr-border: rgba(255,255,255,0.08);
  --clr-text: #e8e8f0;
  --clr-text-muted: #8888a8;
  --clr-accent-1: #8b5cf6;
  --clr-accent-2: #ec4899;
  --clr-accent-3: #06b6d4;
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
  --gradient-surface: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(236,72,153,0.05) 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(139,92,246,0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
code { font-family: var(--font-mono); background: rgba(139,92,246,0.15); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* — Utility — */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.accent { color: var(--clr-accent-1); }

.glass-card {
  background: var(--gradient-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: rgba(139,92,246,0.2);
  box-shadow: var(--shadow-glow);
}

/* — Buttons — */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem;
  transition: var(--transition); cursor: pointer;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn--primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(139,92,246,0.4); }
.btn--ghost {
  background: transparent; color: var(--clr-text);
  border: 1px solid var(--clr-border);
}
.btn--ghost:hover { background: var(--clr-surface-hover); border-color: var(--clr-accent-1); }
.btn--outline {
  background: transparent; color: var(--clr-accent-2);
  border: 1px solid var(--clr-accent-2);
  padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm);
}
.btn--outline:hover { background: rgba(236,72,153,0.1); }
.btn--lg { padding: 16px 36px; font-size: 1.05rem; }
.btn--xl { padding: 20px 48px; font-size: 1.15rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 8px 20px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* — Header — */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  transition: var(--transition);
}
.header.scrolled { background: rgba(10,10,26,0.95); box-shadow: var(--shadow-md); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav__logo { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 800; }
.logo-icon { font-size: 1.5rem; }
.logo-text .accent { font-weight: 800; }
.nav__links {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav__link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9rem; color: var(--clr-text-muted);
  transition: var(--transition);
}
.nav__link:hover { color: var(--clr-text); background: var(--clr-surface-hover); }
.nav__link--cta {
  background: var(--gradient-primary); color: #fff !important;
  padding: 8px 20px; border-radius: var(--radius-md);
}
.nav__link--cta:hover { transform: translateY(-1px); }
.nav__toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--clr-text); border-radius: 2px; transition: var(--transition); }

/* — Hero — */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero__bg-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.orb--1 { width: 500px; height: 500px; background: var(--clr-accent-1); top: -10%; left: -10%; }
.orb--2 { width: 400px; height: 400px; background: var(--clr-accent-2); bottom: -15%; right: -5%; animation-delay: 2s; }
.orb--3 { width: 300px; height: 300px; background: var(--clr-accent-3); top: 40%; right: 20%; animation-delay: 4s; }
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, -30px) scale(1.1); }
}

.hero__content { text-align: center; position: relative; z-index: 1; }
.hero__badge {
  display: inline-block; padding: 8px 20px;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 32px; color: var(--clr-accent-3);
  animation: fadeInDown 0.8s ease;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900;
  line-height: 1.1; margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.2s both;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--clr-text-muted);
  max-width: 600px; margin: 0 auto 40px;
  animation: fadeInUp 0.8s ease 0.4s both;
}
.hero__actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease 0.6s both;
}
.hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  animation: fadeInUp 0.8s ease 0.8s both;
}
.stat { text-align: center; }
.stat__number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--clr-accent-1); }
.stat__label { font-size: 0.8rem; color: var(--clr-text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat__divider { width: 1px; height: 40px; background: var(--clr-border); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* — Sections — */
section { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block; padding: 6px 16px; background: var(--clr-surface);
  border: 1px solid var(--clr-border); border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 16px; color: var(--clr-accent-3);
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 16px; }
.section-desc { color: var(--clr-text-muted); max-width: 550px; margin: 0 auto; font-size: 1.05rem; }

/* — Converter — */
.converter { background: var(--clr-bg-2); }
.converter__card {
  max-width: 800px; margin: 0 auto;
  padding: 48px; border-radius: var(--radius-xl);
}

.step-indicator { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 40px; }
.step-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  background: var(--clr-surface); border: 2px solid var(--clr-border);
  color: var(--clr-text-muted); transition: var(--transition);
}
.step-dot.active { background: var(--gradient-primary); border-color: transparent; color: #fff; }
.step-dot.done { background: #10b981; border-color: transparent; color: #fff; }
.step-line { width: 60px; height: 2px; background: var(--clr-border); }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--clr-border); border-radius: var(--radius-lg);
  padding: 60px 40px; text-align: center; cursor: pointer;
  transition: var(--transition); position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--clr-accent-1);
  background: rgba(139,92,246,0.05);
}
.upload-zone.dragover { transform: scale(1.01); }
.upload-icon { color: var(--clr-accent-1); margin-bottom: 20px; }
.upload-zone h3 { font-size: 1.2rem; margin-bottom: 8px; }
.upload-zone p { color: var(--clr-text-muted); margin-bottom: 12px; }
.upload-formats { font-size: 0.75rem; color: var(--clr-text-muted); opacity: 0.7; }

/* Preview */
.preview-zone {
  display: flex; align-items: center; gap: 24px;
  padding: 20px; border-radius: var(--radius-md);
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  margin-bottom: 8px;
}
.preview-zone__img-wrap {
  width: 120px; height: 120px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.preview-zone__img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.preview-zone__info { flex: 1; }
.preview-zone__info p { font-size: 0.9rem; margin-bottom: 12px; color: var(--clr-text-muted); }

/* Settings */
.converter__settings { margin-top: 32px; }
.settings-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--clr-text-muted); margin-bottom: 8px; }
.input-wrap {
  display: flex; align-items: center;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: var(--transition);
}
.input-wrap:focus-within { border-color: var(--clr-accent-1); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.input-icon { padding: 0 12px; font-size: 1.1rem; color: var(--clr-text-muted); }
.input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 12px 12px 12px 0; color: var(--clr-text); font-size: 1rem;
  font-family: var(--font-mono); font-weight: 500;
}
.input-wrap input::placeholder { color: var(--clr-text-muted); }

.presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.presets-label { font-size: 0.8rem; color: var(--clr-text-muted); margin-right: 4px; }
.preset-btn {
  padding: 6px 14px; border-radius: 50px;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  color: var(--clr-text-muted); font-size: 0.75rem; font-weight: 600;
  font-family: var(--font-mono); transition: var(--transition);
}
.preset-btn:hover { border-color: var(--clr-accent-1); color: var(--clr-accent-1); background: rgba(139,92,246,0.1); }

/* Action */
.converter__action { margin-top: 32px; text-align: center; }
.progress-wrap { margin-top: 24px; }
.progress-bar {
  width: 100%; height: 8px; border-radius: 4px;
  background: var(--clr-surface); overflow: hidden;
}
.progress-bar__fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}
.progress-text { font-size: 0.85rem; color: var(--clr-text-muted); margin-top: 8px; }

.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result */
.converter__result { margin-top: 32px; }
.result-card {
  text-align: center; padding: 40px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-lg);
}
.result-icon { font-size: 3rem; margin-bottom: 16px; }
.result-card h3 { font-size: 1.3rem; margin-bottom: 8px; color: #10b981; }
.result-card p { color: var(--clr-text-muted); margin-bottom: 24px; }
.result-card .btn + .btn { margin-top: 12px; display: block; margin-left: auto; margin-right: auto; }

/* — How It Works — */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-card { padding: 40px 32px; text-align: center; position: relative; overflow: hidden; }
.step-card__number {
  position: absolute; top: -10px; right: -10px;
  font-size: 6rem; font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.08; line-height: 1;
}
.step-card__icon { font-size: 2.5rem; margin-bottom: 20px; }
.step-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.step-card p { color: var(--clr-text-muted); font-size: 0.9rem; line-height: 1.7; }

/* — Features — */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 36px 28px; }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--clr-text-muted); font-size: 0.9rem; line-height: 1.7; }

/* — FAQ — */
.faq-list { max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; background: transparent; border: none;
  color: var(--clr-text); font-size: 1rem; font-weight: 600;
  text-align: left; cursor: pointer; transition: var(--transition);
}
.faq-question:hover { color: var(--clr-accent-1); }
.faq-chevron { transition: transform 0.3s ease; font-size: 1.2rem; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p { padding: 0 24px 20px; color: var(--clr-text-muted); line-height: 1.7; font-size: 0.95rem; }

/* — Ads — */
.ad-container {
  padding: 16px 24px; margin: 0 auto;
  text-align: center; min-height: 100px;
}

/* — Footer — */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--clr-border);
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer__brand p { margin-top: 12px; color: var(--clr-text-muted); font-size: 0.9rem; line-height: 1.7; }
.footer__links h4 { font-weight: 700; margin-bottom: 16px; font-size: 0.9rem; }
.footer__links ul { list-style: none; }
.footer__links li { margin-bottom: 10px; }
.footer__links a { color: var(--clr-text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer__links a:hover { color: var(--clr-accent-1); }
.footer__bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--clr-border); }
.footer__bottom p { font-size: 0.8rem; color: var(--clr-text-muted); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .steps-grid, .features-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav__links { 
    display: none;
    position: fixed; top: 72px; left: 0; width: 100%;
    flex-direction: column; gap: 0; padding: 16px;
    background: rgba(10,10,26,0.97); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-border);
  }
  .nav__links.open { display: flex; }
  .nav__link { padding: 14px 16px; width: 100%; }
  .nav__toggle { display: flex; }

  .hero { padding: 100px 0 60px; min-height: auto; }
  .hero__title { font-size: 2.2rem; }
  .hero__stats { flex-direction: column; gap: 16px; }
  .stat__divider { width: 40px; height: 1px; }

  .converter__card { padding: 24px 16px; }
  .upload-zone { padding: 40px 20px; }
  .settings-grid { grid-template-columns: 1fr; }
  .presets { justify-content: center; }

  .steps-grid, .features-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  section { padding: 60px 0; }
}
