:root {
  /* Ultra Premium Palette */
  --primary: #ff0050;
  --primary-glow: rgba(255, 0, 80, 0.4);
  --secondary: #00f2fe;
  --secondary-glow: rgba(0, 242, 254, 0.4);
  --bg-dark: #050508;
  --bg-panel: rgba(20, 20, 28, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #8b9bb4;
  --success: #10b981;
  --error: #ef4444;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ===== ANIMATED ORBS BACKGROUND ===== */
.bg-orbs {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-dark);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  top: -10%; left: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  bottom: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  animation-delay: -5s;
}

.orb-3 {
  top: 40%; left: 40%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, transparent 70%);
  animation-duration: 25s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ===== STICKY HEADER ===== */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--primary); }

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

.nav-icon {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav-icon:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--glass-border);
  color: var(--secondary);
}

/* ===== SPLIT LAYOUT (HERO) ===== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 4rem 0;
}

.hero-content {
  animation: fadeInLeft 1s ease;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,0,80,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255,0,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,80,0); }
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(to right, #fff, var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.stat-item i {
  color: var(--primary);
}

/* ===== DOWNLOADER ACTION CARD ===== */
.hero-action {
  animation: fadeInRight 1s ease;
}

.glass-card {
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8), inset 0 1px 2px rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.glass-card:hover {
  transform: translateY(-5px);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.url-input {
  width: 100%;
  padding: 20px 60px 20px 55px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.url-input:focus {
  outline: none;
  border-color: var(--secondary);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 0 15px var(--secondary-glow);
}

.paste-btn {
  position: absolute;
  right: 15px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.download-btn {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), #b30038);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(255,0,80,0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(255,0,80,0.5);
  background: linear-gradient(135deg, #ff1a66, var(--primary));
}
    
.download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.progress-wrapper {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  margin-top: 20px;
  overflow: hidden;
  display: none;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  box-shadow: 0 0 15px var(--secondary);
  transition: width 0.3s ease;
}

.result-area {
  display: none;
  margin-top: 2rem;
  animation: fadeIn 0.5s ease;
}

.video-card {
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  padding: 1.2rem;
}

.video-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.btn-action {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-download {
  background: var(--secondary);
  color: #000;
}

.btn-download:hover {
  background: #fff;
  box-shadow: 0 0 15px var(--secondary-glow);
}

.btn-copy {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.btn-copy:hover {
  background: rgba(255,255,255,0.2);
}

/* ===== BENTO GRID SECTION ===== */
.bento-section {
  padding: 6rem 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--text-muted);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-rows: 220px;
  gap: 1.5rem;
}

.bento-item {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
  background: rgba(30,30,45,0.7);
}

/* Tablet and Desktop specific span */
@media (min-width: 900px) {
  .span-2 { grid-column: span 2; }
}

.bento-icon {
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.bento-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

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

.step-card {
  border-style: dashed;
  border-color: rgba(255,255,255,0.15);
}

.step-num {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  line-height: 1;
}

.premium-card {
  background: linear-gradient(135deg, rgba(255,0,80,0.1), transparent);
  border-color: rgba(255,0,80,0.3);
}

.premium-card .bento-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ===== FAQ SECTION ===== */
.faq-section {
  padding: 2rem 0 6rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}

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

.faq-item.active .faq-question i {
  transform: rotate(45deg); /* Plus to Cross */
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

/* ===== HISTORY PANEL ===== */
.history-panel {
  max-width: 800px;
  margin: 0 auto 4rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.clear-history-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
}
.clear-history-btn:hover { color: var(--error); }

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
  transform: translateX(5px);
}

.history-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 85%;
}

.history-delete {
  color: var(--error);
  opacity: 0.5;
  padding: 5px;
}
.history-item:hover .history-delete { opacity: 1; }
.empty-history { text-align: center; opacity: 0.5; padding: 2rem; }

/* ===== FOOTER & TOAST ===== */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem;
}
.footer-logo span { color: var(--primary); }
.footer-content p { color: var(--text-muted); font-size: 0.9rem; }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #fff; color: #000;
  padding: 14px 28px;
  border-radius: 50px;
  display: flex; align-items: center; gap: 12px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.toast.active { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--error); color: #fff; }
.toast.success { background: var(--success); color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: auto;
  }
  .hero-content h1 { font-size: 3rem; }
  .bento-grid { grid-auto-rows: minmax(180px, auto); }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2.2rem; }
  .glass-card { padding: 1.5rem; }
  .action-row { flex-direction: column; }
  .hidden-mobile { display: none !important; }
}

/* Animations */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; display: none; margin-left: 10px; vertical-align: middle; }

/* ===== LEGAL PAGES & SEO ARTICLE ===== */
.legal-page { padding: 4rem 0; max-width: 900px; margin: 0 auto; }
.legal-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--secondary); }
.legal-content h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--primary); }
.legal-content p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }
.legal-content ul { color: var(--text-muted); margin-left: 2rem; margin-bottom: 1rem; line-height: 1.8; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }

.seo-article { padding: 4rem 0; border-top: 1px solid var(--glass-border); margin-top: 4rem; }
.seo-article h2 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--secondary); text-align: center; }
.seo-article h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--primary); }
.seo-article p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }

/* ===== COOKIE BANNER ===== */
.cookie-banner { position: fixed; bottom: 0; transform: translateY(100%); left: 0; width: 100%; background: var(--bg-panel); backdrop-filter: blur(16px); border-top: 1px solid var(--glass-border); padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: transform 0.5s ease; flex-wrap: wrap; gap: 1rem; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); }
.cookie-banner.show { transform: translateY(0); }
.cookie-text { color: var(--text-main); font-size: 0.95rem; max-width: 800px; margin: 0 auto; text-align: center;}
.cookie-text a { color: var(--secondary); text-decoration: underline; }
.cookie-btn { background: var(--primary); color: #fff; border: none; padding: 10px 24px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all 0.3s; margin: 0 auto; display: block;}
.cookie-btn:hover { background: #ff1a66; box-shadow: 0 0 15px var(--primary-glow); }

