/* Google Fonts loaded via <link> in header.php for performance */

/* ========== CSS VARIABLES ========== */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-glass: rgba(30,215,96,0.04);
  --green: #1DB954;
  --green-light: #1ed760;
  --green-glow: rgba(29,185,84,0.15);
  --green-subtle: rgba(29,185,84,0.08);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max-w: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green-light); text-decoration: none; transition: color var(--transition); font-weight: 500; }
a:hover { color: #fff; }

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; line-height: 1.2; }

p { margin-bottom: 1em; color: var(--text-secondary); }
strong { color: var(--text-primary); }

/* ========== LAYOUT ========== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ========== NAVIGATION ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.3px;
}
.logo:hover { color: var(--green-light); }
.logo svg { flex-shrink: 0; }

/* ========== DROPDOWN ========== */
.dropdown { position: relative; }

.dropbtn {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.dropbtn:hover, .dropbtn:focus { background: var(--bg-card-hover); border-color: var(--border-hover); color: #fff; }

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #1a1a1a;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  min-width: 110px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 10;
}
.dropdown-content.show { display: block; }
.dropdown-links { display: flex; flex-direction: column; }
.dropdown-content a {
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition);
  text-decoration: none;
}
.dropdown-content a:hover { background: var(--green-subtle); color: var(--green-light); }

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 160px 24px 100px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(29,185,84,0.12) 0%, rgba(29,185,84,0.03) 40%, transparent 70%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-subtle);
  border: 1px solid rgba(29,185,84,0.2);
  color: var(--green-light);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease-out both;
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  max-width: 800px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #fff 0%, #ccc 50%, var(--green-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.6s ease-out 0.1s both;
}

.hero > .container > p:first-of-type {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 40px;
  animation: fadeUp 0.6s ease-out 0.2s both;
}

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

/* ========== SEARCH FORM ========== */
.form {
  display: flex;
  align-items: center;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 14px;
  height: 64px;
  max-width: 680px;
  margin: 0 auto 16px;
  padding: 4px;
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.6s ease-out 0.3s both;
}
.form:focus-within {
  border-color: rgba(29,185,84,0.4);
  box-shadow: 0 0 0 4px rgba(29,185,84,0.08), 0 8px 40px rgba(0,0,0,0.3);
}

.form input {
  flex: 1;
  height: 100%;
  padding: 0 20px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}
.form input::placeholder { color: var(--text-muted); }

.copypaste { display: flex; align-items: center; gap: 2px; }

.button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}
.button:hover { color: var(--green-light); background: var(--green-subtle); }

#clear { display: none; }

.button-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  transition: all var(--transition);
}
.button-download:hover { background: var(--green-light); transform: scale(1.02); }
.button-download svg { width: 20px; height: 20px; }

/* ========== TRUST BAR ========== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  animation: fadeUp 0.6s ease-out 0.5s both;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.trust-item svg { color: var(--green); flex-shrink: 0; }

/* ========== FEATURES GRID ========== */
.features {
  padding: 100px 24px;
  position: relative;
}

.section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--green-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--green);
  font-size: 22px;
}

.step-number i { font-size: 18px; }

.accordion-trigger span i { margin-right: 10px; font-size: 16px; color: var(--green); }

.faq-q { color: var(--green); font-size: 18px; margin-right: 8px; flex-shrink: 0; }

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
  padding: 80px 24px 100px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 56px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  position: relative;
  counter-increment: step;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-subtle);
  border: 2px solid rgba(29,185,84,0.25);
  color: var(--green);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.step-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.step-connector {
  position: absolute;
  top: 22px;
  left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 1px;
  background: linear-gradient(90deg, rgba(29,185,84,0.3), rgba(29,185,84,0.05));
}

.step-card:last-child .step-connector { display: none; }

/* ========== SEO CONTENT ACCORDION ========== */
.seo-content {
  padding: 80px 24px 100px;
}

.accordion { max-width: 800px; margin: 48px auto 0; }

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}
.accordion-trigger:hover { color: var(--green-light); }

.accordion-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
  background: var(--green-subtle);
  color: var(--green);
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-body { max-height: 2000px; }

.accordion-inner {
  padding: 0 0 24px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.accordion-inner ul, .accordion-inner ol {
  padding-left: 20px;
  margin: 12px 0;
}
.accordion-inner li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ========== FAQ ========== */
.faq {
  padding: 80px 24px 100px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
  max-width: 900px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}
.faq-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.faq-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* faq-q handled via icon styles above */

.faq-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  list-style: none;
  padding: 28px 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--green-light); }

.copyright {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}
.copyright-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== RESULT CARDS ========== */
#chweb_result { margin-top: 24px; }

.container_result {
  display: grid;
  grid-template-columns: 30% 70%;
  max-width: 700px;
  margin: auto;
  background: #161616;
  border: 1px solid var(--border);
  padding: 1em;
  border-radius: var(--radius);
  align-items: center;
}

.playlist_result {
  display: grid;
  grid-template-columns: 20% 80%;
  max-width: 700px;
  margin: 10px auto;
  background: #161616;
  border: 1px solid var(--border);
  padding: 1em;
  border-radius: var(--radius);
}

.album_track {
  max-width: 700px;
  margin: 10px auto;
  background: #161616;
  border: 1px solid var(--border);
  padding: 1em;
  border-radius: var(--radius);
}

.h1heading {
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
}

.oneline {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item1 img, .playlistitem1 img { border-radius: var(--radius-sm); }

.pdl { max-width: 400px; margin: auto; }

/* Spotify-style buttons */
.btn-spotify, .search-btn, .download-btn, .dlbtnhigh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition);
}
.btn-spotify:hover, .search-btn:hover, .download-btn:hover, .dlbtnhigh:hover {
  background: var(--green-light);
  transform: scale(1.02);
}

.dlbtnlow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition);
}
.dlbtnlow:hover { background: #3a3a3a; }

.dlbutton {
  background: var(--green) !important;
  border-radius: var(--radius-sm);
  border: none;
  color: #000;
  padding: 14px 20px;
  margin: 1em;
  width: calc(100% - 2em);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: block;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
}
.dlbutton:hover { background: var(--green-light) !important; }

.isflex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.small { font-size: 13px; font-weight: 500; }

.download-btn.downloading, .search-btn.downloading {
  background: #2a2a2a;
  pointer-events: none;
}
.download-btn.success, .search-btn.success { background: var(--green); }

.error::before {
  content: "Error: Something Went Wrong! Please Try Again";
  color: #ef4444;
  font-weight: 700;
}

/* ========== LOADING & ANIMATIONS ========== */
@keyframes blinkAnimation {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.blink { animation: 0.8s ease-in-out infinite blinkAnimation; }

@keyframes rotateAnimation {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.loading_icon { animation: 0.6s linear infinite rotateAnimation; }

/* ========== GO TO TOP ========== */
#goToTopBtn {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 99;
  background: none;
  border: none;
  cursor: pointer;
}
#goToTopBtn svg {
  padding: 2px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--green);
  border-radius: 50%;
  transition: all var(--transition);
}
#goToTopBtn svg:hover { background: #222; border-color: var(--green); }

/* ========== COOKIE NOTIFICATION ========== */
.cookie-notification {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  text-align: center;
  z-index: 100;
  font-size: 14px;
}
.cookie { padding: 14px; }
.cookie-close {
  cursor: pointer;
  display: inline-block;
  color: var(--green);
  font-weight: 600;
  margin-left: 8px;
}

/* ========== STATIC PAGES ========== */
.ch_page { margin: 100px auto 40px; max-width: 800px; }
.ch_page h1 { font-size: 32px; margin-bottom: 24px; }
.ch_page h2 { font-size: 22px; margin-top: 32px; margin-bottom: 12px; }
.ch_page p { line-height: 1.8; }
.ch_page ul, .ch_page ol { padding-left: 20px; margin: 12px 0; }
.ch_page li { margin-bottom: 8px; line-height: 1.7; }

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-container { grid-template-columns: repeat(3, 1fr); }
  .step-connector { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 130px 16px 70px; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }

  .form { height: 56px; border-radius: 12px; }
  .button-download { padding: 0 18px; height: 44px; }
  .hide { display: none; }

  .features-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .steps-container { grid-template-columns: 1fr; gap: 24px; }
  .step-connector { display: none; }

  .trust-bar { gap: 16px; }
  .trust-item { font-size: 12px; }

  .footer-links { gap: 16px; padding: 20px 0; }

  .container_result { grid-template-columns: 100%; }
  .playlist_result { grid-template-columns: 30% 70%; }
  .playlist_result h3 { font-size: 16px; }
  .item1 img { width: 220px; }
}

@media (max-width: 480px) {
  .steps-container { grid-template-columns: 1fr; }
}

/* ========== PRINT ========== */
@media print {
  nav, #goToTopBtn, .cookie-notification, .hero::before { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
