/**
 * GS MultiTools - Core Stylesheet
 * Premium Red & Black Theme Design System
 */

/* ==========================================================================
   1. CSS Custom Properties / Design Tokens
   ========================================================================== */
:root {
  /* Color Palette - Premium Red & Black (Dark Theme Default) */
  --bg-primary: #000000;
  --bg-secondary: #07080c;
  --bg-tertiary: #0e1017;
  --bg-card: rgba(14, 16, 22, 0.94);
  --bg-card-hover: rgba(20, 23, 32, 0.98);
  --bg-glass: rgba(0, 0, 0, 0.88);
  --bg-input: #0a0b10;
  
  --border-color: rgba(229, 9, 20, 0.28);
  --border-color-hover: #e50914;
  --border-subtle: rgba(255, 255, 255, 0.09);

  --text-primary: #ffffff;
  --text-secondary: #a3a8b8;
  --text-muted: #6b7280;
  --text-red: #e50914;
  --text-gold: #e50914;

  /* Red & Crimson Accents (Cinevault Aesthetic) */
  --red-primary: #e50914;
  --red-light: #ff2a3b;
  --red-dark: #b20710;
  --red-gradient: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  --red-gradient-hover: linear-gradient(135deg, #ff1928 0%, #cc0000 100%);
  --red-glow: 0 4px 24px rgba(229, 9, 20, 0.45);
  --red-glow-strong: 0 6px 32px rgba(229, 9, 20, 0.65);

  /* Full Backward Compatibility Aliases */
  --gold-primary: #e50914;
  --gold-light: #ff2a3b;
  --gold-dark: #b20710;
  --gold-gradient: var(--red-gradient);
  --gold-gradient-hover: var(--red-gradient-hover);
  --gold-glow: var(--red-glow);
  --gold-glow-strong: var(--red-glow-strong);

  /* Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
  /* Sizing & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --header-height: 72px;
  --container-max: 1240px;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8f9fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f5;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #ffffff;

  --border-color: rgba(217, 4, 41, 0.22);
  --border-color-hover: rgba(217, 4, 41, 0.55);
  --border-subtle: rgba(0, 0, 0, 0.08);

  --text-primary: #0f1015;
  --text-secondary: #4a5060;
  --text-muted: #737a8c;
  --text-red: #c8101a;
  --text-gold: #c8101a;

  --red-primary: #d90429;
  --red-light: #ef233c;
  --red-dark: #8d0801;
  --red-gradient: linear-gradient(135deg, #ef233c 0%, #d90429 55%, #8d0801 100%);
  --red-gradient-hover: linear-gradient(135deg, #ff4d6d 0%, #ef233c 55%, #a4161a 100%);
  --red-glow: 0 0 20px rgba(217, 4, 41, 0.22);
  --red-glow-strong: 0 0 30px rgba(217, 4, 41, 0.4);

  --gold-primary: var(--red-primary);
  --gold-light: var(--red-light);
  --gold-dark: var(--red-dark);
  --gold-gradient: var(--red-gradient);
  --gold-gradient-hover: var(--red-gradient-hover);
  --gold-glow: var(--red-glow);
  --gold-glow-strong: var(--red-glow-strong);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--red-primary);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 15px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold-light);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ==========================================================================
   3. Layout & Container
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.main-content {
  flex: 1 0 auto;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-sm {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e50914;
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.45);
}
.section-badge svg {
  color: #ffffff;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   4. Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.975rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  text-decoration: none;
  line-height: 1;
  user-select: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: #e50914;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.45);
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: #ff1928;
  color: #ffffff !important;
  box-shadow: 0 8px 28px rgba(229, 9, 20, 0.65);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: rgba(229, 9, 20, 0.1);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--error);
  color: #ffffff;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-icon:hover {
  color: var(--gold-primary);
  border-color: var(--border-color);
  background: var(--bg-card-hover);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-gold,
.badge-red {
  background: #e50914;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
}

.badge-category {
  background: rgba(255, 255, 255, 0.08);
  color: #b3b8c2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ==========================================================================
   5. Shared Navigation Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e50914;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 2px 14px rgba(229, 9, 20, 0.5);
  letter-spacing: -0.5px;
}

.brand-text-gold,
.brand-text-red {
  color: #e50914 !important;
  background: none !important;
  -webkit-text-fill-color: #e50914 !important;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
  background: rgba(229, 9, 20, 0.08);
}

/* Mega / Category Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(229, 9, 20, 0.12);
  color: var(--gold-primary);
  padding-left: 18px;
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger toggle for mobile */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.mobile-nav-toggle svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   6. Cards & Tool Grid
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e50914;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.tool-card:hover {
  border-color: #e50914;
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(229, 9, 20, 0.4);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tool-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e50914;
  transition: all var(--transition-normal);
}

.tool-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.tool-card:hover .tool-icon-wrapper {
  background: #e50914;
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
}

.tool-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.tool-card-body p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

.tool-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.tool-card-footer .open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--gold-primary);
  transition: gap var(--transition-fast);
}

.tool-card:hover .open-btn {
  color: #ffffff;
  gap: 10px;
}

/* ==========================================================================
   7. Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control, .input, .select, .textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus, .input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.textarea-mono {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

/* ==========================================================================
   8. Breadcrumbs
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
}
.breadcrumbs a:hover {
  color: var(--gold-primary);
}

.breadcrumbs-sep {
  opacity: 0.5;
}

.breadcrumbs-current {
  color: var(--gold-primary);
  font-weight: 600;
}

/* ==========================================================================
   9. AdSense Prepared Containers (Official Standards Ready)
   ========================================================================== */
/*
 * Advertisement Containers:
 * Clean ad display without backside banner boxes, dashed borders, or labels.
 */
.ad-slot-container {
  width: 100%;
  max-width: 1100px;
  margin: 24px auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 8px 0 !important;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.ad-slot-container:hover {
  border: none !important;
}

.ad-slot-label {
  display: none !important;
}

.ad-slot-container iframe {
  max-width: 100%;
  border: none !important;
  display: block;
  margin: 0 auto;
}

.ad-slot-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 4px;
}

.ad-grid-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 260px;
  padding: 8px !important;
}

.ad-slot-in-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ==========================================================================
   Popup Modal Advertisement
   ========================================================================== */
.ad-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ad-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ad-popup-modal {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 24px 20px 20px 20px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-popup-overlay.active .ad-popup-modal {
  transform: scale(1);
}

.ad-popup-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  transition: color var(--transition-fast, 0.2s);
}

.ad-popup-close-btn:hover {
  color: var(--gold-primary);
}

.ad-popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 300px;
  min-height: 250px;
}

/* ==========================================================================
   Peripheral Empty Space Ads (Gutter Skyscrapers & Sticky Bottom Bar)
   ========================================================================== */
body {
  padding-bottom: 96px;
}

.ad-gutter-left,
.ad-gutter-right {
  position: fixed;
  top: 140px;
  width: 160px;
  height: 300px;
  z-index: 999;
  display: none;
  background: transparent !important;
  border: none !important;
  pointer-events: auto;
}

.ad-gutter-left {
  left: 10px;
}

.ad-gutter-right {
  right: 10px;
}

@media (min-width: 1400px) {
  .ad-gutter-left,
  .ad-gutter-right {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(10, 11, 14, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(229, 9, 20, 0.25);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

.ad-sticky-bottom iframe {
  max-width: 100%;
  border: none !important;
}

/* ==========================================================================
   Down-Corner Enforcement for Social Bar & Floating Push Ads
   ========================================================================== */
body > div[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom):not(#site-header):not(#main-content):not(.search-modal-backdrop):not(.mobile-drawer-backdrop):not(.mobile-drawer):not(.toast-container):not(.back-to-top),
html > div[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom):not(#site-header):not(#main-content):not(.search-modal-backdrop):not(.mobile-drawer-backdrop):not(.mobile-drawer):not(.toast-container):not(.back-to-top),
body > iframe[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom),
html > iframe[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom),
[data-repositioned-corner="down"] {
  top: auto !important;
  bottom: 100px !important;
  right: 16px !important;
  left: auto !important;
}

@media (max-width: 600px) {
  body > div[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom):not(#site-header):not(#main-content):not(.search-modal-backdrop):not(.mobile-drawer-backdrop):not(.mobile-drawer):not(.toast-container):not(.back-to-top),
  html > div[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom):not(#site-header):not(#main-content):not(.search-modal-backdrop):not(.mobile-drawer-backdrop):not(.mobile-drawer):not(.toast-container):not(.back-to-top),
  body > iframe[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom),
  html > iframe[style*="fixed"][style*="top"]:not(#ad-popup-overlay):not(#ad-gutter-left):not(#ad-gutter-right):not(#ad-sticky-bottom),
  [data-repositioned-corner="down"] {
    bottom: 96px !important;
    right: 12px !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* ==========================================================================
   10. Shared Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 64px 0 32px 0;
  margin-top: auto;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: var(--radius-full);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-left: 6px;
}

.footer-brand p {
  margin: 16px 0 24px 0;
  max-width: 360px;
  font-size: 0.925rem;
}

/* Social media list (4 mandatory channels) */
.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-link-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link-btn svg {
  width: 18px;
  height: 18px;
}

.social-link-btn:hover {
  color: #ffffff;
  background: var(--red-gradient);
  border-color: var(--red-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  color: var(--text-muted);
}
.footer-bottom-links a:hover {
  color: var(--gold-primary);
}

/* ==========================================================================
   11. Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.925rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
  border-color: var(--success);
}
.toast-success svg {
  color: var(--success);
}

.toast-error {
  border-color: var(--error);
}
.toast-error svg {
  color: var(--error);
}

.toast-info {
  border-color: var(--gold-primary);
}
.toast-info svg {
  color: var(--gold-primary);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   12. Global Search Modal Overlay
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.search-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-lg), var(--gold-glow);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.search-modal-backdrop.open .search-modal-content {
  transform: translateY(0);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-modal-header svg {
  color: var(--gold-primary);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.search-modal-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.15rem;
  outline: none;
}

.search-modal-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.search-result-item:hover, .search-result-item:focus {
  background: rgba(229, 9, 20, 0.12);
  outline: none;
}

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.search-result-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.search-result-info p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-category {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--gold-primary);
  background: rgba(229, 9, 20, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.search-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   13. Back to Top Button
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--red-gradient);
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: var(--red-glow);
}


/* Dedicated Filter Pill Styles (Cinevault Aesthetic) */
.filter-pill {
  border-radius: var(--radius-full) !important;
  font-size: 0.875rem !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  transition: all var(--transition-fast) !important;
}
.filter-pill.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #b3b8c2 !important;
}
.filter-pill.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}
.filter-pill.active,
.filter-pill.btn-primary {
  background: #e50914 !important;
  border-color: #e50914 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.45) !important;
}
