/*
 * style.css — Playlist Length Calculator
 * androdom.tr · Zero Bloat, Maximum Utility
 *
 * Contains:
 *   1. Baseline resets & body defaults
 *   2. Custom scrollbar (Slate theme)
 *   3. Range slider (Webkit + Firefox)
 *   4. Toggle switch fixes
 *   5. Navbar glass effect
 *   6. Result card component
 *   7. Spinner animation
 *   8. Video list micro-styles
 */

:root {
  --bg-main: #121216;
  --bg-surface: #090d16;
  --bg-card: #0f172a;
  --border-color: #1e293b;
  --text-primary: #FAF8F5;
  --text-secondary: #94a3b8;
  --text-muted: #8a8377;
  --accent-color: #CD5C3E;
  --accent-hover: #CD5C3E;
  --bg-navbar: rgba(3, 7, 18, 0.85);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-glow-gradient: radial-gradient(circle, rgba(205, 92, 62, 0.05) 0%, rgba(3, 7, 18, 0) 70%);
}

html[data-theme="light"] {
  --bg-main: #FAF8F5;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #6b6459;
  --accent-color: #CD5C3E;
  --accent-hover: #B24E33;   /* terracotta-dark (was leftover indigo) */
  --bg-navbar: rgba(255, 255, 255, 0.85);
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-glow-gradient: radial-gradient(circle, rgba(205, 92, 62, 0.03) 0%, rgba(248, 250, 252, 0) 70%);
}

/* ─── Persistent Micro Navbar ─── */
.navbar {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-navbar);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  z-index: 50;
  position: sticky;
  top: 0;
  height: 48px;
  display: flex;
  align-items: center;
}

.navbar-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon-wrapper {
  color: var(--accent-color);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.brand-link:hover .brand-icon-wrapper {
  color: var(--accent-hover);
}

.brand-text {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.brand-text-accent {
  color: var(--accent-color);
}

.brand-link:hover .brand-text {
  color: var(--text-primary);
}

.tool-pill-wrapper {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.tool-pill-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .tool-pill-label {
    display: none;
  }
}

.tool-pill-nav {
  display: flex;
  align-items: center;
}

.tool-pill-active {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: rgba(205, 92, 62, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(205, 92, 62, 0.2);
  text-decoration: none;
}

.right-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switcher { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.lang-btn:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--bg-hover); }
.lang-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 0.35rem; display: flex; flex-direction: column; gap: 0.2rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); z-index: 100; min-width: 130px; }
.lang-option { background: none; border: none; color: var(--text-secondary); font-size: 0.78rem; font-weight: 500; padding: 0.4rem 0.65rem; border-radius: 0.35rem; text-align: left; cursor: pointer; transition: all 0.15s ease; }
.lang-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.lang-option.active { color: var(--accent-color); background: var(--accent-glow, rgba(205, 92, 62, 0.15)); font-weight: 600; }

.portal-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.portal-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.github-link {
  display: flex;
  align-items: center;
  padding: 0.375rem;
  border-radius: 0.375rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-decoration: none;
}

.github-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ─────────────────────────────────────────────
   1. BASELINE
───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Baseline keyboard focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: 2px !important;
}

html {
  /* Prevent FOUC flash to white in dark mode */
  background-color: #121216;
  color-scheme: dark;
  /* Smooth scrolling */
  scroll-behavior: smooth;
  /* Tabular numbers globally for this tool */
  font-variant-numeric: tabular-nums;
}

body {
  /* Prevent horizontal overflow on mobile */
  overflow-x: hidden;
  /* System-level font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent focus ring flash on mouse click (show only for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─────────────────────────────────────────────
   2. CUSTOM SCROLLBAR — Slate theme
───────────────────────────────────────────── */
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: #1e293b #0f172a;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: #0f172a;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: #1e293b;
  border-radius: 99px;
  border: 1px solid #0f172a;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #334155;
}

/* ─────────────────────────────────────────────
   3. CUSTOM RANGE SLIDER
───────────────────────────────────────────── */
.speed-slider {
  --fill-pct: 0%;
  --thumb-size: 16px;
  --track-height: 6px;
  --thumb-color: #CD5C3E;
  --track-fill: #CD5C3E;
  --track-bg: #1e293b;

  /* Reset */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  height: var(--thumb-size);
  cursor: pointer;
  outline: none;
}

/* WebKit track */
.speed-slider::-webkit-slider-runnable-track {
  height: var(--track-height);
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--track-fill) 0%,
    var(--track-fill) var(--fill-pct),
    var(--track-bg) var(--fill-pct),
    var(--track-bg) 100%
  );
  transition: background 0.1s ease;
}

/* WebKit thumb */
.speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--thumb-color);
  box-shadow: 0 0 0 3px rgba(205, 92, 62, 0.15), 0 2px 6px rgba(0,0,0,0.4);
  border: 2px solid #D98C3A;
  margin-top: calc((var(--track-height) - var(--thumb-size)) / 2);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  cursor: grab;
}

.speed-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(205, 92, 62, 0.25), 0 2px 8px rgba(0,0,0,0.5);
}

.speed-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px #121216, 0 0 0 5px #CD5C3E;
}

/* Firefox track */
.speed-slider::-moz-range-track {
  height: var(--track-height);
  border-radius: 99px;
  background: var(--track-bg);
  border: none;
}

/* Firefox progress fill */
.speed-slider::-moz-range-progress {
  height: var(--track-height);
  border-radius: 99px;
  background: var(--track-fill);
}

/* Firefox thumb */
.speed-slider::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--thumb-color);
  border: 2px solid #D98C3A;
  box-shadow: 0 0 0 3px rgba(205, 92, 62, 0.15);
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.speed-slider::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}

/* ─────────────────────────────────────────────
   4. TOGGLE SWITCH — Pointer-events fix
───────────────────────────────────────────── */
.toggle-track,
.toggle-thumb {
  pointer-events: none;
  user-select: none;
}

/* ─────────────────────────────────────────────
   5. NAVBAR GLASS EFFECT
───────────────────────────────────────────── */
.navbar-glass {
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

/* ─────────────────────────────────────────────
   6. RESULT CARD COMPONENT
───────────────────────────────────────────── */
.result-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.result-card:hover {
  border-color: var(--border-color);
}

.card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-main-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
  flex-wrap: wrap;
}

.time-segment {
  font-size: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.time-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────
   7. LOADING SPINNER
───────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid #334155;
  border-top-color: #CD5C3E;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ─────────────────────────────────────────────
   8. VIDEO LIST MICRO-STYLES
───────────────────────────────────────────── */
.video-list {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1e293b #090d16;
}

.video-list::-webkit-scrollbar {
  width: 4px;
}

.video-list::-webkit-scrollbar-track {
  background: #090d16;
}

.video-list::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 99px;
}

.video-list-item:last-child {
  border-bottom: none;
}

/* ─────────────────────────────────────────────
   9. RESPONSIVE LAYOUT — Main split pane
───────────────────────────────────────────── */
@media (min-width: 768px) {
  #main-layout {
    height: calc(100vh - 48px - 40px); /* viewport minus navbar and footer */
    overflow: hidden;
  }

  #sidebar {
    height: 100%;
  }

  #results-pane {
    height: 100%;
  }
}

/* Ensure footer is always visible */
footer {
  min-height: 40px;
}

/* ─────────────────────────────────────────────
   10. DETAILS / SUMMARY — Remove default marker
───────────────────────────────────────────── */
details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* ─────────────────────────────────────────────
   11. TRANSITIONS — Layout-safe global defaults
───────────────────────────────────────────── */
input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"] {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ─────────────────────────────────────────────
   12. REDUCED MOTION — Accessibility
───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── SPONSOR / PROMO SLOTS (ADBLOCK SAFE) ─── */
.sidebar-promo {
  margin-top: auto;
  border-top: 1px solid #1e293b;
  padding-top: 1.25rem;
}

.promo-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.promo-text {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.05em;
}

.promo-box-container {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  height: 250px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.promo-box-container:hover {
  border-color: rgba(205, 92, 62, 0.2);
}

.promo-placeholder {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

.bottom-sponsor-container {
  width: 100%;
  background: #090d16;
  border-top: 1px solid #1e293b;
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
}

.sponsor-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.sponsor-notice-text {
  font-size: 0.6rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sponsor-banner-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.sponsor-banner-placeholder:hover {
  border-color: rgba(205, 92, 62, 0.2);
}

.sponsor-banner-placeholder span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .sponsor-banner-placeholder {
    height: 60px;
  }
}

/* Common Footer */
.footer {
  text-align: center;
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
  width: 100%;
  margin-top: auto;
  z-index: 10;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.15s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

.footer container {
  display: block;
}

/* ─────────────────────────────────────────────
   THEME TOGGLE BUTTON STYLES
   ───────────────────────────────────────────── */
.theme-toggle-btn {
  background: none;
  border: none;
  color: #94a3b8; /* slate-400 */
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
}

.theme-toggle-btn:hover {
  color: #FAF8F5; /* slate-50 */
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .theme-toggle-btn {
  color: #475569; /* slate-600 */
}

html[data-theme="light"] .theme-toggle-btn:hover {
  color: #0f172a; /* slate-900 */
  background: rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn svg {
  transition: transform 0.2s ease;
}

.theme-toggle-btn:hover svg {
  transform: rotate(15deg);
}

/* ─────────────────────────────────────────────
   LIGHT THEME OVERRIDES
   ───────────────────────────────────────────── */
html[data-theme="light"] body {
  background-color: #FAF8F5 !important;
  color: #0f172a !important;
}

html[data-theme="light"] #navbar {
  background-color: rgba(255, 255, 255, 0.85) !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .navbar-glass {
  background: rgba(255, 255, 255, 0.8) !important;
  border-bottom-color: #e2e8f0 !important;
}

html[data-theme="light"] .tool-pill {
  background-color: rgba(205, 92, 62, 0.08) !important;
  color: #CD5C3E !important;
  border-color: rgba(205, 92, 62, 0.15) !important;
}

html[data-theme="light"] .text-slate-200,
html[data-theme="light"] .text-slate-100 {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-400 {
  color: #475569 !important;
}

html[data-theme="light"] .text-slate-500 {
  color: #94a3b8 !important;
}

html[data-theme="light"] .hover\:text-slate-200:hover {
  color: #0f172a !important;
}

html[data-theme="light"] .hover\:text-white:hover {
  color: #0f172a !important;
}

html[data-theme="light"] .hover\:bg-slate-800:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .border-slate-800 {
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .bg-slate-900 {
  background-color: #ffffff !important;
}

html[data-theme="light"] .bg-slate-950\/50 {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .bg-slate-950 {
  background-color: #FAF8F5 !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select {
  background-color: #FAF8F5 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-theme="light"] input::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] .bg-indigo-500\/10 {
  background-color: rgba(205, 92, 62, 0.08) !important;
}

html[data-theme="light"] .text-indigo-400 {
  color: #CD5C3E !important;
}

html[data-theme="light"] .bg-indigo-950\/30 {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .border-indigo-500\/20 {
  border-color: rgba(205, 92, 62, 0.15) !important;
}

html[data-theme="light"] .border-indigo-500\/30 {
  border-color: rgba(205, 92, 62, 0.25) !important;
}

html[data-theme="light"] .bg-emerald-500\/10 {
  background-color: rgba(16, 185, 129, 0.08) !important;
}

html[data-theme="light"] .text-emerald-400 {
  color: #059669 !important;
}

html[data-theme="light"] .border-emerald-500\/20 {
  border-color: rgba(16, 185, 129, 0.15) !important;
}

html[data-theme="light"] .bg-rose-500\/10 {
  background-color: rgba(239, 68, 68, 0.08) !important;
}

html[data-theme="light"] .text-rose-400 {
  color: #dc2626 !important;
}

html[data-theme="light"] .border-rose-500\/20 {
  border-color: rgba(239, 68, 68, 0.15) !important;
}

html[data-theme="light"] .divide-slate-800 > * + * {
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .hover\:bg-slate-900\/50:hover {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .hover\:bg-slate-800\/50:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] .bg-slate-800 {
  background-color: #e2e8f0 !important;
}

html[data-theme="light"] .bg-slate-800\/50 {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .bg-glow {
  background: radial-gradient(circle, rgba(205, 92, 62, 0.03) 0%, rgba(248, 250, 252, 0) 70%) !important;
}

/* Sidebar specifically */
html[data-theme="light"] #sidebar {
  background-color: #ffffff !important;
  border-right-color: #e2e8f0 !important;
}

/* Background inputs/selects */
html[data-theme="light"] .bg-\\[\\#090d16\\] {
  background-color: #ffffff !important;
}

/* Borders in sidebar */
html[data-theme="light"] .border-slate-800\\/80,
html[data-theme="light"] .border-slate-800 {
  border-color: #e2e8f0 !important;
}

/* Range slider track bg override */
html[data-theme="light"] .speed-slider {
  --track-bg: #e2e8f0 !important;
}

/* Toggle Switches */
html[data-theme="light"] .toggle-track {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] .peer:checked + .toggle-track {
  background-color: #CD5C3E !important;
  border-color: #CD5C3E !important;
}
html[data-theme="light"] .toggle-thumb {
  background-color: #94a3b8 !important;
}
html[data-theme="light"] .peer:checked + .toggle-track + .toggle-thumb {
  background-color: #ffffff !important;
}

/* Text class additions */
html[data-theme="light"] .text-slate-300 {
  color: #1e293b !important;
}

/* Sidebar promos */
html[data-theme="light"] .sidebar-promo {
  border-top-color: #e2e8f0 !important;
}
html[data-theme="light"] .promo-box-container {
  background: rgba(0, 0, 0, 0.01) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .promo-placeholder {
  color: rgba(0, 0, 0, 0.35) !important;
}

/* Button focus ring offset bg reset */
html[data-theme="light"] .focus\:ring-offset-\[\#121216\]:focus {
  --tw-ring-offset-color: #FAF8F5 !important;
}

/* ─── Light Mode Theme Component Overrides ─── */
html[data-theme="light"] body {
  background-color: #FAF8F5 !important;
  color: #0f172a !important;
}

html[data-theme="light"] #sidebar {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] #results-pane {
  background-color: #FAF8F5 !important;
}

html[data-theme="light"] .result-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .card-label {
  color: #64748b !important;
}

html[data-theme="light"] .card-main-value {
  color: #0f172a !important;
}

html[data-theme="light"] .time-sep {
  color: #cbd5e1 !important;
}

html[data-theme="light"] .bg-slate-900,
html[data-theme="light"] .bg-slate-900\/80,
html[data-theme="light"] .bg-slate-900\/60,
html[data-theme="light"] .bg-\[\#090d16\] {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .bg-slate-800 {
  background-color: #e2e8f0 !important;
}

html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-700 {
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-slate-200,
html[data-theme="light"] .text-slate-300 {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-400,
html[data-theme="light"] .text-slate-500,
html[data-theme="light"] .text-slate-600 {
  color: #475569 !important;
}

html[data-theme="light"] .video-list {
  scrollbar-color: #cbd5e1 #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .video-list::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}

html[data-theme="light"] .video-list::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}

html[data-theme="light"] .video-list-item {
  border-bottom-color: #e2e8f0 !important;
}

html[data-theme="light"] .recent-search-item {
  background-color: #FAF8F5 !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .recent-search-item:hover {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #recent-searches-empty {
  color: #64748b !important;
}

/* Global Hidden Utility Class */
.hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────
   SEO INFO SECTION STYLES
   ───────────────────────────────────────────── */
.seo-info-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
}
.seo-info-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  text-align: left;
}
.seo-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.seo-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin: 0;
}
.seo-card p, .seo-card li {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.seo-card ol {
  padding-left: 1.1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.seo-card details {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.seo-card details:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.seo-card summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  user-select: none;
}
.seo-card details[open] summary {
  margin-bottom: 0.375rem;
}


/* ═══════════════════════════════════════════
   SEO COMPONENTS (_template standard)
   ═══════════════════════════════════════════ */
.seo-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}
.embed-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; margin-top: 2.5rem; }
.embed-header { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .embed-header { flex-direction: row; align-items: center; justify-content: space-between; } }
.embed-info h3 { font-size: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.embed-info p { color: var(--text-secondary); font-size: 0.85rem; }
.embed-preview-wrapper { width: 100%; }
.embed-code-textarea { width: 100%; height: 80px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 0.75rem; font-family: monospace; font-size: 0.8rem; color: var(--text-secondary); resize: none; outline: none; }
.copy-btn { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 500; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s ease; white-space: nowrap; }
.copy-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }
.seo-article { color: var(--text-secondary); line-height: 1.7; margin-top: 2.5rem; }
.seo-article h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); margin: 2rem 0 1rem; display: flex; align-items: center; gap: 0.75rem; }
.icon-wrap { width: 34px; height: 34px; border-radius: 0.5rem; background: var(--bg-surface); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--accent-color); flex-shrink: 0; }
.seo-article p { margin-bottom: 1.25rem; }
.seo-article ul, .seo-article ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.seo-article li { margin-bottom: 0.5rem; }
.privacy-note { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 1.25rem; font-size: 0.9rem; font-style: italic; margin-top: 2rem; }
.faq-section { margin-top: 2.5rem; }
.section-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary); margin-bottom: 1.25rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.85rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.75rem; overflow: hidden; }
.faq-item summary { padding: 1.1rem 1.25rem; font-weight: 600; color: var(--text-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-surface); }
.faq-content { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); border-top: 1px solid var(--border-color); margin-top: 0.25rem; padding-top: 1rem; font-size: 0.9rem; line-height: 1.6; }
details[open] .chevron { transform: rotate(180deg); }
.more-tools { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.more-tools-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.25rem; }
.view-all { color: var(--accent-color); font-weight: 500; text-decoration: none; font-size: 0.9rem; }
.more-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tool-card-mini { display: flex; align-items: center; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.75rem; text-decoration: none; transition: all 0.2s ease; }
.tool-card-mini:hover { background: var(--bg-surface); border-color: var(--accent-color); transform: translateY(-2px); }
.tool-card-mini .tool-icon { width: 42px; height: 42px; border-radius: 0.5rem; background: var(--bg-surface); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); margin-right: 1rem; flex-shrink: 0; }
.tool-card-mini:hover .tool-icon { color: var(--accent-color); border-color: var(--accent-color); }
.tool-card-mini h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.2rem; }
.tool-card-mini p { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }


/* Breadcrumb Navigation */
.breadcrumb-nav {
  padding: 0.75rem 1.5rem 0.25rem;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  flex-wrap: wrap;
}
.breadcrumb-item a {
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb-item a:hover {
  color: var(--accent-color, #CD5C3E);
}
.breadcrumb-item.active {
  color: var(--text-primary, #FAF8F5);
  font-weight: 500;
}
.breadcrumb-separator {
  color: var(--text-muted, #6b7280);
  opacity: 0.5;
  font-size: 0.75rem;
}

html.embed-mode .breadcrumb-nav {
  display: none !important;
}



/* Form Controls & Select Dropdowns */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
}

.form-select, select.form-select, select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-primary, #FAF8F5);
  background-color: var(--bg-card, #0f172a);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus-visible, select.form-select:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(205, 92, 62, 0.2));
}

.form-select option, select option {
  background-color: var(--bg-surface, #0f172a);
  color: var(--text-primary, #FAF8F5);
  padding: 0.5rem;
}

html[data-theme="light"] .form-select option,
html[data-theme="light"] select option {
  background-color: #ffffff;
  color: #0f172a;
}



/* Recommended Tool Card Styles */
.tool-card,
.tool-card-mini {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  text-decoration: none !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease;
}

.tool-card:hover,
.tool-card-mini:hover {
  background: var(--bg-panel);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.tool-card-icon,
.tool-card-mini .tool-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
