/* YT Playlist Recover - Web Application CSS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-deep: #070a13;
  --bg-surface: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(51, 65, 85, 0.85);
  --border-glow: rgba(56, 189, 248, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cyan: #38bdf8;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --purple: #a855f7;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(56, 189, 248, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Top Navigation */
.top-nav {
  height: 68px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  transition: transform 0.2s ease;
}

.nav-logo:hover {
  transform: rotate(5deg) scale(1.05);
}

.nav-brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-right: 8px;
}

.nav-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
  letter-spacing: 0.5px;
}

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

.nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.primary-nav-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  color: #ffffff;
}

.primary-nav-btn:hover:not(:disabled) {
  opacity: 0.92;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.primary-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Mobile Navigation Controls & Slide-out Drawer */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mobile-controls {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.mobile-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.status-indicator-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  border: 1.5px solid #0f172a;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.status-indicator-dot.active {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.mobile-hamburger-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.mobile-hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glow);
}

.hamburger-bar {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger active transformation */
.mobile-hamburger-btn.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger-btn.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-hamburger-btn.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Slide-out Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #090e1a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  gap: 16px;
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.7);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.mobile-drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.mobile-drawer-sub {
  font-size: 10.5px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mobile-drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Quick Status Card */
.mobile-status-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.mobile-status-label {
  color: var(--text-muted);
}

.mobile-status-val {
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.mobile-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.pill-active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-inactive {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Mobile Menu Navigation Items */
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mobile-menu-item:hover, .mobile-menu-item:active {
  background: rgba(51, 65, 85, 0.7);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(2px);
}

.mobile-menu-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.mobile-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.mobile-menu-desc {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-chevron {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mobile-menu-item:hover .mobile-menu-chevron {
  color: var(--cyan);
  transform: translateX(2px);
}

.mobile-item-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  flex-shrink: 0;
}

.mobile-drawer-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.mobile-drawer-footer-links {
  font-size: 12px;
  color: var(--text-dim);
}

.mobile-drawer-footer-links a {
  color: var(--cyan);
  text-decoration: none;
}

.mobile-drawer-copy {
  font-size: 10.5px;
  color: var(--text-dim);
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 24px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
  max-width: 860px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Search Box */
.search-box-wrapper {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-input-container {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.search-input-container:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--cyan);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-container input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
}

.search-input-container input::placeholder {
  color: var(--text-dim);
}

.inline-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inline-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.action-buttons-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
  font-family: inherit;
}

.cta-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
}

.cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cta-secondary-button {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cta-secondary-button:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Example playlists */
.quick-examples-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 6px;
}

.example-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--cyan);
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.example-tag:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}

.stat-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.stat-icon-rose { background: rgba(244, 63, 94, 0.15); color: var(--rose); }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.stat-icon-cyan { background: rgba(56, 189, 248, 0.15); color: var(--cyan); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

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

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Filter & Controls Bar */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.filter-pill.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.35);
}

.filter-count {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 4px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-filter-input {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 180px;
}

.search-filter-input:focus {
  border-color: var(--cyan);
}

.view-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle-btn.active, .view-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* Video Grid Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.video-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.18);
}

.video-card.card-recovered {
  border-left: 4px solid var(--emerald);
}

.video-card.card-archived {
  border-left: 4px solid var(--cyan);
}

.video-card.card-unarchived {
  border-left: 4px solid var(--rose);
}

.video-card.card-available {
  border-left: 4px solid var(--text-dim);
  opacity: 0.85;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-recovered { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-archived { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-unarchived { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-available { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.2); }

.card-video-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.card-main {
  display: flex;
  gap: 14px;
}

.card-thumbnail-box {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #000000;
  flex-shrink: 0;
}

.card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.card-channel {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: auto;
  gap: 8px;
}

.source-tag {
  font-size: 11px;
  color: var(--text-dim);
}

.card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.action-link-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.action-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.action-link-play {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--cyan);
}

.action-link-play:hover {
  background: rgba(56, 189, 248, 0.35);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #ffffff;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* How It Works Section */
.features-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 36px;
  margin-top: 20px;
}

.features-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

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

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-box p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 32px;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--cyan);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ========================================================
   RESPONSIVE DESIGN SYSTEM (MOBILE, TABLET & SMALL DEVICES)
   ======================================================== */

@media (max-width: 1024px) {
  .main-content {
    max-width: 100%;
    padding: 28px 20px;
    gap: 24px;
  }
  .hero-title {
    font-size: 38px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
    height: 60px;
  }
  .nav-desktop {
    display: none !important;
  }
  .nav-mobile-controls {
    display: flex !important;
  }
  .main-content {
    padding: 20px 14px;
    gap: 20px;
  }
  .hero-title {
    font-size: 30px;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
    width: 100%;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 12px;
  }
  .controls-right {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .search-filter-input {
    width: 100% !important;
    flex: 1 1 100%;
    font-size: 16px; /* Prevents iOS auto-zoom */
  }
  #export-csv-btn, #export-json-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    height: 38px;
  }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 0 12px;
    height: 56px;
  }
  .nav-logo {
    width: 34px;
    height: 34px;
  }
  .nav-brand-title {
    font-size: 15px;
    margin-right: 4px;
  }
  .nav-badge {
    display: none; /* Hide decorative badge to make room for buttons */
  }
  .nav-right {
    gap: 6px;
  }
  .nav-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }

  /* Hero Section */
  .hero-section {
    padding: 14px 0 8px;
  }
  .hero-pill-badge {
    font-size: 11px;
    padding: 4px 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
  .hero-title {
    font-size: clamp(24px, 5.5vw, 30px);
    line-height: 1.25;
    margin-bottom: 10px;
  }
  .hero-desc {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  /* Search Input & Action Buttons */
  .search-input-container {
    padding: 5px 6px 5px 12px;
  }
  .search-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }
  .search-input-container input {
    font-size: 16px; /* Prevents iOS auto-zoom */
  }
  #paste-btn {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .action-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  #scan-playlist-btn {
    grid-column: span 2;
    width: 100%;
    justify-content: center;
    height: 48px;
    font-size: 15px;
  }
  #batch-lookup-btn, #hero-api-key-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 10px 8px;
  }
  #hero-guide-btn {
    grid-column: span 2;
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 10px 8px;
  }

  /* Example Tags horizontal swipe */
  .quick-examples-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 6px 2px 10px;
    width: 100%;
    justify-content: flex-start;
  }
  .quick-examples-row::-webkit-scrollbar {
    display: none;
  }
  .quick-examples-row span:first-child {
    flex-shrink: 0;
    font-size: 11.5px;
  }
  .example-tag {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 5px 10px;
  }

  /* 2-column mobile stats grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stats-grid .stat-card:nth-child(5) {
    grid-column: span 2;
  }
  .stat-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .stat-icon-box {
    width: 38px;
    height: 38px;
  }
  .stat-icon-box svg {
    width: 18px;
    height: 18px;
  }
  .stat-value {
    font-size: 20px;
  }
  .stat-label {
    font-size: 11.5px;
  }

  /* Info Banner */
  #playlist-info-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  #recover-all-pending-btn {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 13.5px;
  }

  /* Features section */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .feature-box {
    padding: 16px;
  }

  /* Footer */
  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 18px 14px;
  }

  /* Modals */
  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .modal-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .modal-header h3 {
    font-size: 17px;
  }
  .modal-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .modal-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  #api-key-input, #batch-ids-textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 0 8px;
  }
  .nav-brand-title {
    font-size: 14px;
  }
  .nav-btn {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  /* Video Cards on Compact Mobile */
  .video-card {
    padding: 12px;
    gap: 10px;
  }
  .card-thumbnail-box {
    width: 90px;
    height: 52px;
  }
  .card-title {
    font-size: 13px;
    line-height: 1.35;
  }
  .card-channel {
    font-size: 11.5px;
  }
  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .card-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 6px;
  }
  .action-link-btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
    padding: 6px 8px;
    min-height: 30px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  /* On ultra-compact screens, hide non-critical button text but keep icons and badges */
  .guide-nav-btn .btn-text,
  #nav-export-btn .btn-text {
    display: none;
  }
  .nav-btn {
    padding: 6px 6px;
  }
  .hero-title {
    font-size: 22px;
  }
}

