:root {
  --bg-dark: #0b0c10;
  --card-bg: rgba(19, 19, 20, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-green: #22c55e;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
  --radius-lg: 20px;
  --radius-md: 12px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: #22c55e;
  top: -100px;
  left: 20%;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: #06b6d4;
  bottom: -150px;
  right: 15%;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  background: var(--accent-gradient);
  color: #000;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 1.1rem;
}

.brand-text {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn-primary, .btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Main Container */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.hero-section {
  text-align: center;
  margin-bottom: 40px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Search Box */
.search-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  padding: 12px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@media (min-width: 640px) {
  .search-box {
    flex-direction: row;
  }
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0 16px;
}

.input-icon {
  font-size: 1.2rem;
  margin-right: 12px;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1rem;
  padding: 16px 0;
}

.paste-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.action-btn {
  background: var(--accent-gradient);
  color: #000;
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.action-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

/* Spinner Loader */
.spinner-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Alerts */
.error-alert {
  display: none;
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

/* Result Card */
.result-card {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 60px;
}

.result-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .result-container {
    grid-template-columns: 240px 1fr;
  }
}

.video-preview-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 9/16;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.info-column {
  display: flex;
  flex-direction: column;
}

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

.author-badge img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 700;
  font-size: 1rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 16px;
  color: #e5e7eb;
}

.stats-row {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.quality-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dl-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.dl-btn-hd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.dl-btn-music {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.dl-btn:hover {
  transform: translateY(-2px);
}

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

.dl-text {
  display: flex;
  flex-direction: column;
}

.dl-text strong {
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-recommend {
  background: #000;
  color: var(--accent-green);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}

.dl-text small {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Features */
.features-section {
  margin-top: 60px;
  text-align: center;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 36px;
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  text-align: left;
  position: relative;
}

.step-badge {
  background: var(--accent-gradient);
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

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

.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-green);
  text-decoration: none;
}