/*
Theme Name: Clip2MP3 Converter
Theme URI: https://clip2mp3.com
Description: YouTube to MP3 Converter — Clean light theme with purple accents.
Version: 2.0.0
Author: Clip2MP3
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:       #6d4aff;
  --purple-dark:  #5535e8;
  --purple-light: #8b6fff;
  --purple-bg:    #f0eefd;

  --bg:           #ffffff;
  --bg-soft:      #f7f7fb;
  --text:         #14142b;
  --muted:        #6b7280;
  --border:       #e8e8f0;

  --orange:       #f59e0b;
  --orange-bg:    #fef3e2;
  --green:        #22c55e;
  --green-bg:     #e8faf0;
  --blue:         #3b82f6;
  --blue-bg:      #e8f0fe;

  --footer-dark:  #14142b;
  --radius:       16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px;
  text-decoration: none; color: var(--text);
}
.site-logo .logo-badge {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.site-logo .logo-accent { color: var(--purple); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500;
  display: flex; align-items: center; gap: 4px; transition: color .2s;
}
.nav-links a:hover { color: var(--purple); }
.nav-links .caret { font-size: .65rem; color: var(--muted); }

@media(max-width:780px){ .nav-links { display: none; } }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 70px 20px 60px;
  background: linear-gradient(180deg, var(--purple-bg) 0%, #ffffff 100%);
  position: relative; overflow: hidden;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 18px; border-radius: 999px;
  background: rgba(109,74,255,.1); border: 1px solid rgba(109,74,255,.25);
  font-size: .8rem; color: var(--purple-dark); font-weight: 600;
  margin-bottom: 28px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--purple); display: block; }

.hero p {
  color: var(--muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto 40px;
}

/* ── CONVERTER BOX ── */
.converter-wrap { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }

.input-row {
  display: flex; gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 16px; padding: 8px 8px 8px 20px;
  box-shadow: 0 8px 30px rgba(109,74,255,.1);
  transition: border-color .2s;
}
.input-row:focus-within { border-color: var(--purple); }
.input-row .input-icon { color: var(--muted); display: flex; align-items: center; }
.url-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 1rem; padding: 12px 8px;
}
.url-input::placeholder { color: #9ca3af; }

.btn-convert {
  background: var(--purple);
  color: #fff; border: none; border-radius: 12px;
  padding: 14px 28px; font-size: .95rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background .2s, transform .15s;
}
.btn-convert:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-convert:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.trust-row {
  display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
  margin-top: 24px; font-size: .85rem; color: var(--muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ── STATUS ── */
.status-msg {
  margin-top: 18px; padding: 12px 18px;
  border-radius: 10px; font-size: .9rem; display: none; text-align: left;
}
.status-msg.info    { background: var(--purple-bg);  color: var(--purple-dark); display:block; }
.status-msg.error   { background: #fee2e2;           color: #dc2626;            display:block; }
.status-msg.success { background: var(--green-bg);   color: #16a34a;            display:block; }

/* ── RESULT CARD ── */
.result-card {
  display: none; margin-top: 24px; text-align: left;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
  box-shadow: 0 8px 30px rgba(109,74,255,.08);
  animation: fadeUp .3s ease;
}
.result-card.show { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.result-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.result-info { flex: 1; min-width: 0; }
.result-title {
  font-weight: 700; font-size: 1rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.result-author { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }

.download-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; border: none; border-radius: 10px;
  padding: 11px 22px; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: opacity .2s, transform .15s;
}
.btn-download:hover { opacity: .88; transform: translateY(-1px); }
.btn-download:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-mp3 { background: var(--purple); }

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

/* ── SECTION SHARED ── */
.section-title {
  text-align: center; font-size: clamp(1.6rem,4vw,2.3rem);
  font-weight: 800; margin-bottom: 14px; letter-spacing: -.5px;
}
.section-sub {
  text-align: center; color: var(--muted); font-size: 1rem;
  max-width: 560px; margin: 0 auto 50px;
}

/* ── WHY CHOOSE / FEATURES ── */
.features-section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 22px; }
.feature-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(20,20,43,.06); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.feature-icon.icon-orange { background: var(--orange-bg); color: var(--orange); }
.feature-icon.icon-purple { background: var(--purple-bg); color: var(--purple); }
.feature-icon.icon-green  { background: var(--green-bg);  color: var(--green); }
.feature-icon.icon-blue   { background: var(--blue-bg);   color: var(--blue); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { color: var(--muted); font-size: .9rem; }

/* ── HOW IT WORKS ── */
.steps-section { padding: 80px 20px; background: var(--bg-soft); }
.steps-inner { max-width: 980px; margin: 0 auto; }
.steps-circles {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.step-circle-wrap { position: relative; flex-shrink: 0; }
.step-circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(20,20,43,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple); position: relative; z-index: 1;
}
.step-num-badge {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.step-line { flex: 1; height: 2px; background: var(--purple-light); min-width: 40px; max-width: 120px; opacity: .4; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 30px; text-align: center; }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.step-card p  { color: var(--muted); font-size: .9rem; }

@media(max-width:650px){ .step-line { display: none; } .steps-circles { gap: 24px; flex-wrap: wrap; } }

/* ── FAQ ── */
.faq-section { padding: 80px 20px; max-width: 740px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden;
  transition: border-color .2s, background .2s;
}
.faq-item.open { border-color: var(--purple); background: var(--purple-bg); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: .98rem;
}
.faq-question .chev { color: var(--muted); transition: transform .25s; flex-shrink: 0; margin-left: 12px; }
.faq-item.open .faq-question .chev { transform: rotate(180deg); color: var(--purple); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
}
.faq-answer-inner { padding: 0 22px 20px; color: var(--muted); font-size: .92rem; line-height: 1.7; }

/* ── STATS ── */
.stats-section { padding: 80px 20px; background: var(--purple-bg); }
.stats-inner { max-width: 1000px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 20px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 32px 20px; text-align: center;
  box-shadow: 0 6px 20px rgba(109,74,255,.07);
}
.stat-num { font-size: 2.1rem; font-weight: 800; color: var(--purple); margin-bottom: 6px; }
.stat-label { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.stat-desc { color: var(--muted); font-size: .8rem; }

/* ── FOOTER ── */
.site-footer {
  background: var(--footer-dark); color: rgba(255,255,255,.7);
  text-align: center; padding: 50px 20px 28px;
}
.footer-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 14px;
}
.footer-logo .logo-badge {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.footer-logo .logo-accent { color: var(--purple-light); }
.footer-tagline { font-size: .9rem; max-width: 420px; margin: 0 auto 18px; }
.footer-links { display: flex; justify-content: center; gap: 18px; font-size: .85rem; margin-bottom: 28px; }
.footer-links a { text-decoration: none; color: rgba(255,255,255,.7); }
.footer-links a:hover { color: #fff; }
.footer-divider { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: .8rem; color: rgba(255,255,255,.45); }

/* ── RESPONSIVE ── */
@media(max-width:600px){
  .site-nav { padding: 14px 18px; }
  .input-row { flex-direction: column; padding: 14px; }
  .input-row .input-icon { display: none; }
  .btn-convert { width: 100%; text-align: center; }
  .result-card.show { flex-direction: column; }
  .result-thumb { width: 100%; height: 160px; }
  .trust-row { gap: 14px; font-size: .8rem; }
}
