:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --bg: #0F0F1A;
  --bg-card: #1A1A2E;
  --bg-input: #16213E;
  --text: #E8E8F0;
  --text-dim: #8888AA;
  --success: #00D68F;
  --error: #FF6B6B;
  --border: #2A2A4A;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.3rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-switch a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.15);
}

.lang-switch span { color: var(--border); }

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(108, 92, 231, 0.12) 0%, transparent 60%);
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input Area */
.input-area {
  max-width: 700px;
  margin: 0 auto;
}

.input-wrapper {
  display: flex;
  gap: 0;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.input-wrapper input {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--text-dim);
}

.btn-primary {
  padding: 16px 28px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  margin-top: 10px;
  color: var(--error);
  font-size: 0.9rem;
  text-align: left;
}

/* Platforms */
.platforms {
  margin-top: 30px;
}

.platforms-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.platform-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.platform-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  cursor: default;
}

.platform-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.platform-icon span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Ad Slots */
.ad-slot {
  text-align: center;
  padding: 10px 0;
  min-height: 90px;
}

.ad-top { margin-bottom: 20px; }
.ad-mid-1 { margin-top: 20px; }
.ad-mid-2 { margin-top: 20px; }
.ad-footer { margin-top: 20px; }

/* Results */
.results {
  padding: 20px 0 40px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.result-header {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.result-thumb {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-input);
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-info h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.result-formats {
  padding: 20px;
}

.format-section {
  margin-bottom: 20px;
}

.format-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.format-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.format-item:hover {
  border-color: var(--primary);
}

.format-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.format-quality {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 50px;
}

.format-ext {
  font-size: 0.8rem;
  color: var(--primary-light);
  background: rgba(108, 92, 231, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.format-size {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.btn-download {
  padding: 8px 18px;
  background: var(--success);
  color: #0F0F1A;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-download:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn-download:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-audio {
  background: var(--primary);
  color: white;
}

/* Features */
.features {
  padding: 50px 0;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

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

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

/* How to Use */
.how-to {
  padding: 50px 0;
  background: rgba(108, 92, 231, 0.05);
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 36px;
}

.steps {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 14px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* FAQ */
.faq {
  padding: 50px 0;
}

.faq-list {
  max-width: 650px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--primary);
  transition: transform 0.2s;
}

.faq-q.open::after {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a p {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Footer */
.footer {
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 640px) {
  .hero-title { font-size: 1.4rem; }
  .input-wrapper { flex-direction: column; }
  .btn-primary { justify-content: center; padding: 14px; }
  .result-header { flex-direction: column; }
  .result-thumb { width: 100%; height: 180px; }
  .platform-icons { gap: 16px; }
  .steps { flex-direction: column; align-items: center; }
  .nav { gap: 12px; }
  .nav a { font-size: 0.8rem; }
  .format-item { flex-direction: column; gap: 10px; align-items: flex-start; }
  .btn-download { width: 100%; text-align: center; }
}

/* Download progress overlay */
.download-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.download-modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 360px;
}

.download-modal .spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin-bottom: 16px;
}

.download-modal p {
  color: var(--text-dim);
  font-size: 0.9rem;
}
