:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12131c;
  --bg-card: #181926;
  --bg-card-hover: #1f2030;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --tiktok-cyan: #25F4EE;
  --tiktok-red: #FE2C55;
  --accent-gradient: linear-gradient(135deg, #25F4EE 0%, #FE2C55 100%);
  --accent-purple: #7928ca;
  --border-color: #272838;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border-color);
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--tiktok-cyan);
}

.nav-badges {
  display: flex;
  gap: 10px;
}

.badge {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.badge.highlight {
  color: var(--tiktok-cyan);
  border-color: rgba(37, 244, 238, 0.3);
  background: rgba(37, 244, 238, 0.08);
}

/* Hero Section */
.hero {
  padding: 60px 20px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.15) 0%, rgba(37, 244, 238, 0.1) 50%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-container {
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(254, 44, 85, 0.12);
  border: 1px solid rgba(254, 44, 85, 0.3);
  border-radius: 30px;
  color: #ff5b79;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* Search Card */
.search-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
  position: relative;
}

.search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  font-size: 16px;
}

.input-wrapper input {
  width: 100%;
  padding: 16px 95px 16px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.input-wrapper input:focus {
  border-color: var(--tiktok-cyan);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.2);
}

.paste-btn, .clear-btn {
  position: absolute;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--tiktok-cyan);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.paste-btn:hover {
  background: rgba(37, 244, 238, 0.2);
}

.clear-btn {
  right: 12px;
  color: var(--text-muted);
  padding: 6px 10px;
}

.download-btn {
  padding: 16px 36px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(254, 44, 85, 0.45);
}

.download-btn:active {
  transform: translateY(0);
}

.error-box {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(254, 44, 85, 0.12);
  border: 1px solid rgba(254, 44, 85, 0.4);
  color: #ff5b79;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

/* Result Card */
.result-card {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.4s ease;
}

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

.result-content {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.video-preview {
  position: relative;
  width: 220px;
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.video-details {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--tiktok-cyan);
}

.author-info h4 {
  font-size: 16px;
  font-weight: 700;
}

.author-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.video-title {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-action-btn {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
}

.dl-action-btn.primary {
  background: var(--accent-gradient);
  color: #000;
}

.dl-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37, 244, 238, 0.4);
}

.dl-action-btn.secondary {
  background: var(--bg-card-hover);
  color: #fff;
  border: 1px solid var(--border-color);
}

.dl-action-btn.secondary:hover {
  background: #282a3e;
}

.dl-action-btn.audio {
  background: rgba(254, 44, 85, 0.15);
  color: #ff5b79;
  border: 1px solid rgba(254, 44, 85, 0.3);
}

.dl-action-btn.audio:hover {
  background: rgba(254, 44, 85, 0.25);
}

/* Sections */
.section-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

/* Features Grid */
.features {
  background: var(--bg-secondary);
}

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

.feature-card {
  background: var(--bg-card);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 244, 238, 0.4);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.icon-watermark { background: rgba(254, 44, 85, 0.15); color: var(--tiktok-red); }
.icon-hd { background: rgba(37, 244, 238, 0.15); color: var(--tiktok-cyan); }
.icon-music { background: rgba(121, 40, 202, 0.15); color: #9d4edd; }
.icon-unlimited { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 30px 24px;
  border-radius: var(--radius-md);
  position: relative;
  text-align: center;
}

.step-number {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* FAQ */
.faq {
  background: var(--bg-secondary);
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.faq-question {
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.faq-question i {
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--tiktok-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 22px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  padding-bottom: 18px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: #06070b;
  padding: 40px 20px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--tiktok-cyan);
}

.footer-disclaimer p {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }
  .search-form {
    flex-direction: column;
  }
  .download-btn {
    width: 100%;
  }
  .result-content {
    flex-direction: column;
    align-items: center;
  }
  .video-preview {
    width: 100%;
    max-width: 260px;
    height: 320px;
  }
}
