@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --accent: #6c5ce7;
  --accent-hover: #7c6ef7;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --border: #2a2a4a;
  --card-bg: #1e1e3a;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* Header */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.logo span {
  color: var(--accent);
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

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

.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
}

/* Platform Tabs */
.platform-tabs {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.platform-tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.platform-tab {
  padding: 1rem 2rem;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.platform-tab:hover {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.1);
}

.platform-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Content Tabs */
.content-tabs {
  background: var(--bg-tertiary);
  padding: 0.5rem 0;
}

.content-tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.content-tab {
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.content-tab:hover {
  color: var(--text-primary);
}

.content-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Main Section */
.main-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.main-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.main-section .subtitle {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Downloader Box */
.downloader-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.url-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.url-input:focus {
  border-color: var(--accent);
}

.url-input::placeholder {
  color: var(--text-secondary);
}

.btn {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-paste {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-paste:hover {
  background: var(--bg-tertiary);
}

.btn-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.875rem 1rem;
}

.btn-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 100, 100, 0.1);
}

.btn-search {
  background: var(--accent);
  color: white;
  min-width: 140px;
  justify-content: center;
}

.btn-search:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Discover More */
.discover-box {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.discover-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.discover-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.discover-item:last-child {
  border-bottom: none;
}

.discover-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.discover-arrow {
  color: var(--accent);
}

/* Results Section */
.results-section {
  max-width: 700px;
  margin: 0 auto;
  display: none;
}

.results-section.active {
  display: block;
}

.result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.result-preview {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: var(--bg-primary);
}

.result-info {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-download {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
}

.loading.active {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Error */
.error-message {
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 8px;
  padding: 1rem;
  color: #ff6b6b;
  display: none;
  margin-top: 1rem;
}

.error-message.active {
  display: block;
}

/* Content Section */
.content-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: left;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--accent);
}

.content-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section ul,
.content-section ol {
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Steps */
.steps {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  background: var(--accent);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-text {
  color: var(--text-secondary);
  padding-top: 0.2rem;
}

/* FAQ */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-tertiary);
}

.faq-toggle {
  color: var(--accent);
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 0 1.25rem 1rem;
  max-height: 500px;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section {
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--accent);
  color: white;
}

/* Highlight Section */
.highlight-banner {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.highlight-banner a {
  color: white;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 0.75rem;
  }

  .header-nav {
    gap: 1rem;
  }

  .platform-tabs-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .platform-tab {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .main-section h1 {
    font-size: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
  }

  .content-section h2 {
    font-size: 1.25rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Ad Banner Placeholder */
.ad-banner {
  background: var(--bg-tertiary);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 1rem 0;
}
