/* youtube.css - Independent YouTube Downloader Theme */
:root {
  --yt-red: #FF0000;
  --yt-red-hover: #d90000;
  --yt-red-light: rgba(255, 0, 0, 0.08);
  --yt-red-glow: rgba(255, 0, 0, 0.28);
  
  --bg-color: #fcf1f1;
  --bg-gradient: radial-gradient(circle at 85% 10%, #ffe3e3 0%, #fcf2f2 45%, #f9e8e8 100%);
  
  --text-main: #0f172a;
  --text-muted: #5e6b7d;
  
  --card-bg: #ffffff;
  --card-border: #f7d2d2;
  --card-shadow: 0 10px 28px -4px rgba(255, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.02);
  
  --nav-bg: rgba(252, 241, 241, 0.88);
  --ad-bg: #fae4e4;
  --ad-border: #f4b2b2;
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme {
  --yt-red: #ff3333;
  --yt-red-hover: #ff5252;
  --yt-red-light: rgba(255, 51, 51, 0.15);
  --yt-red-glow: rgba(255, 51, 51, 0.38);
  
  --bg-color: #0d0808;
  --bg-gradient: radial-gradient(circle at 80% 10%, #201111 0%, #0d0808 70%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --card-bg: #160f0f;
  --card-border: #2f1919;
  --card-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.7);
  
  --nav-bg: rgba(13, 8, 8, 0.88);
  --ad-bg: #1b1212;
  --ad-border: #381c1c;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(var(--bg-gradient)),
    radial-gradient(#ff0000 0.65px, transparent 0.65px);
  background-size: 100% 100%, 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}

/* Header */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--card-border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  position: relative;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--yt-red);
  color: #fff;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px var(--yt-red-glow);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--yt-red);
}

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

.theme-toggle-btn,
.mobile-menu-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn {
  display: inline-flex;
}

.mobile-menu-btn {
  display: none !important;
}

.theme-toggle-btn i,
.mobile-menu-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  margin: 0;
}

@media (max-width: 992px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* Floating Skyscraper Side Ads */
.side-ad-gutter {
  position: fixed;
  top: 130px;
  width: 160px;
  height: 600px;
  background: var(--ad-bg) !important;
  border: 2px dashed var(--ad-border) !important;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  z-index: 20;
  overflow: visible !important;
}

.side-ad-left {
  left: calc((100vw - 1240px) / 4 - 80px);
}

.side-ad-right {
  right: calc((100vw - 1240px) / 4 - 80px);
}

@media (max-width: 1600px) {
  .side-ad-gutter { display: none !important; }
}

/* Hero Section */
.yt-hero {
  padding: 50px 0 70px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yt-red-light);
  color: var(--yt-red);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.yt-hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.yt-hero h1 span {
  color: var(--yt-red);
}

.yt-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 520px;
}

/* Input Card */
.input-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
}

.input-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.input-box-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 16px;
  transition: var(--transition);
}

.input-box-wrapper:focus-within {
  border-color: var(--yt-red);
  box-shadow: 0 0 0 4px var(--yt-red-glow);
}

.input-box-wrapper i {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-right: 12px;
}

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

.btn-download {
  background: var(--yt-red);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-download:hover {
  background: var(--yt-red-hover);
  transform: translateY(-1px);
}

/* ========================================================
   AD VISIBILITY & CONTAINERS
   ======================================================== */

.inline-ad-wrapper {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 32px auto 20px auto;
  position: relative;
  overflow: visible !important;
}

.inline-ad-box {
  min-height: 250px;
 
  margin-top: 26px;
}

@media (min-width: 1600px) {
  .side-ad-gutter {
    display: flex !important;
  }
  .inline-ad-wrapper {
    display: none !important;
  }
}

.ad-section-container {
  margin: 50px auto 30px auto;
  max-width: 970px;
  width: 100%;
  position: relative;
  overflow: visible !important;
}

.ad-box {
  position: relative;
  min-height: 250px;
  background: var(--ad-bg) !important;
  border: 2px dashed var(--ad-border) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  
  margin-top: 32px;
  overflow: visible !important;
}

.ad-tab-raised {
  position: absolute;
  top: -29px;
  left: -2px;
  background: var(--card-bg) !important;
  border: 2px dashed var(--ad-border) !important;
  border-bottom: 2px solid var(--ad-bg) !important;
  color: var(--yt-red) !important;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 18px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.side-ad-gutter .ad-tab-raised {
  top: -27px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}

.adblock-fallback {
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
}

.adblock-fallback-mini {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.adblock-fallback-mini i {
  color: var(--yt-red);
  font-size: 1.3rem;
  margin-bottom: 8px;
  display: block;
}

/* Preview Canvas Mockup */
.preview-canvas-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-yt-badge {
  position: absolute;
  top: -16px;
  left: 10px;
  width: 50px;
  height: 50px;
  background: var(--yt-red);
  color: #fff;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px var(--yt-red-glow);
  z-index: 5;
}

.video-screen-mockup {
  width: 100%;
  background: linear-gradient(135deg, #e60000 0%, #a60000 100%);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(255, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #fff;
}

.screen-badge-quality {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.screen-play-center {
  align-self: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--yt-red);
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.screen-footer-mockup {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 60%;
}

.skeleton-line {
  height: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
}

.skeleton-line.short { width: 70%; }

.duration-pill {
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.preview-quick-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  margin-top: 18px;
}

.audio-chip {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-alt-quality {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.floating-down-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--yt-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px var(--yt-red-glow);
}

/* Features */
.features-section {
  padding: 70px 0;
  text-align: center;
}

.section-label {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--yt-red);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 45px;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 30px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-align: left;
}

.feature-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--yt-red-light);
  color: var(--yt-red);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.feature-box h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Steps */
.steps-section {
  padding: 60px 0 80px;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-circle {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: var(--yt-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px var(--yt-red-glow);
}

.step-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--yt-red);
  margin-bottom: 4px;
}

/* Supported Formats Pills */
.formats-section {
  padding: 30px 0 60px;
  text-align: center;
}

.format-pills-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.format-pill {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: var(--card-shadow);
}

/* FAQ Accordion */
.faq-section {
  padding: 60px 0;
  max-width: 860px;
  margin: 0 auto;
}

.faq-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: var(--transition);
}

.faq-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
}

.faq-body {
  display: none;
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-card.active .faq-body { display: block; }
.faq-card.active .fa-chevron-down { transform: rotate(180deg); }
.fa-chevron-down { transition: transform 0.25s ease; }

/* Trust Bar */
.trust-bar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px 28px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 40px auto;
  box-shadow: var(--card-shadow);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.trust-item i {
  color: var(--yt-red);
  font-size: 1.2rem;
}

/* Footer */
footer {
  background: #090e1a;
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid #1e293b;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-nav a:hover { color: #fff; }

/* Responsive Media Queries */
@media (max-width: 992px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; text-align: center; padding: 8px 0; }
  .yt-hero { grid-template-columns: 1fr; text-align: center; }
  .yt-hero p { margin: 0 auto 30px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; gap: 36px; }
  .trust-bar { flex-direction: column; gap: 16px; align-items: flex-start; }
}

@media (max-width: 640px) {
  .input-box-wrapper { flex-direction: column; gap: 12px; padding: 12px; }
  .btn-download { width: 100%; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .inline-ad-wrapper { max-width: 100%; }
}

/* Dynamic YouTube Results */
.result-section {
  width: 100%;
  max-width: 520px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s ease-in-out;
}

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

.result-card-main {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.result-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--yt-red);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
}

.result-meta h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.result-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.yt-result-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.yt-thumb-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.btn-option {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-color);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  text-align: center;
}

.btn-option:hover {
  background: var(--yt-red);
  color: #fff;
  border-color: var(--yt-red);
  transform: translateY(-1px);
}

.status-loading {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.status-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 480px) {
  .result-options {
    grid-template-columns: 1fr;
  }
}