/* ===================================================================
   Guardian Top 100 21st Century Films: 2-Player Interactive Checklist
   Cinematic Modern Glassmorphic Design System
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,800;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Dynamic Player Colors (Default: Cyan / Coral) */
  --p1-color: #00d2ff;
  --p1-color-rgb: 0, 210, 255;
  --p1-bg: rgba(0, 210, 255, 0.12);
  --p1-glow: rgba(0, 210, 255, 0.4);

  --p2-color: #ff3366;
  --p2-color-rgb: 255, 51, 102;
  --p2-bg: rgba(255, 51, 102, 0.12);
  --p2-glow: rgba(255, 51, 102, 0.4);

  /* Blended Complementary Harmony */
  --both-grad: linear-gradient(135deg, var(--p1-color) 0%, #a855f7 50%, var(--p2-color) 100%);
  --both-glow: rgba(168, 85, 247, 0.5);
  --both-bg: linear-gradient(135deg, rgba(var(--p1-color-rgb), 0.15), rgba(168, 85, 247, 0.2), rgba(var(--p2-color-rgb), 0.15));

  /* Base Cinematic Dark Palette */
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow-p1: 0 0 25px var(--p1-glow);
  --shadow-glow-p2: 0 0 25px var(--p2-glow);
  --shadow-glow-both: 0 0 30px var(--both-glow);

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides if toggled */
body.light-theme {
  --bg-primary: #f4f6fb;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 0, 0, 0.2);
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(var(--p1-color-rgb), 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(var(--p2-color-rgb), 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem 1.25rem;
}

/* ===================================================================
   Header & Title
   =================================================================== */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}

/* ===================================================================
   List Switcher Tabs (Guardian 100 vs Letterboxd 250)
   =================================================================== */
.list-tabs-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  position: relative;
  z-index: 10;
}

.list-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 0.925rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
  position: relative;
  z-index: 11;
}

.list-tab-btn * {
  pointer-events: none;
}

.list-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.list-tab-btn.active {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.list-tab-btn .tab-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: var(--transition-fast);
}

.list-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.75rem;
  font-weight: 300;
}

.highlight-together {
  background: var(--both-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* Top Action Bar (Share, Preset Colors, Randomizer) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--both-grad);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--both-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px var(--both-glow);
  transform: translateY(-2px) scale(1.02);
}

/* ===================================================================
   Players Control & Stats Dashboard
   =================================================================== */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.shared-section {
  margin-bottom: 2.25rem;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Player Cards */
.player-card {
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, #6366f1);
}

.player-card.p1 {
  --card-accent: var(--p1-color);
}

.player-card.p2 {
  --card-accent: var(--p2-color);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
}

.p1 .avatar-badge {
  background: var(--p1-color);
  box-shadow: var(--shadow-glow-p1);
}

.p2 .avatar-badge {
  background: var(--p2-color);
  box-shadow: var(--shadow-glow-p2);
}

.player-name-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-focus);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.1rem 0.25rem;
  outline: none;
  max-width: 140px;
  transition: var(--transition-smooth);
}

.player-name-input:focus {
  border-bottom: 1px solid var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Palette quick selector */
.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover, .color-dot.active {
  transform: scale(1.2);
  border-color: #ffffff;
}

.player-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-total {
  font-size: 1.1rem;
  color: var(--text-dim);
}

.stat-pct {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.p1 .progress-bar {
  background: var(--p1-color);
  box-shadow: 0 0 12px var(--p1-glow);
}

.p2 .progress-bar {
  background: var(--p2-color);
  box-shadow: 0 0 12px var(--p2-glow);
}

/* Dedicated Shared Match Card */
.shared-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15), rgba(17, 24, 39, 0.8) 70%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.shared-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--both-grad);
  box-shadow: 0 0 12px var(--both-glow);
}

.shared-card-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .shared-card-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #d8b4fe;
  margin-bottom: 0.5rem;
}

.shared-title {
  margin-bottom: 0.4rem;
}

.shared-title h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.shared-counter-highlight {
  background: var(--both-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.compatibility-banner {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid #a855f7;
}

.shared-meter-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.meter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.overlap-meter {
  display: flex;
  height: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.segment-p1 {
  background: var(--p1-color);
  transition: width 0.4s ease;
}

.segment-both {
  background: var(--both-grad);
  box-shadow: 0 0 14px var(--both-glow);
  transition: width 0.4s ease;
}

.segment-p2 {
  background: var(--p2-color);
  transition: width 0.4s ease;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.p1 { background: var(--p1-color); }
.legend-dot.p2 { background: var(--p2-color); }
.legend-dot.both { background: var(--both-grad); }
.legend-dot.unwatched { background: rgba(255, 255, 255, 0.2); }

/* ===================================================================
   Filter, Search, & View Controls
   =================================================================== */
.controls-bar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  flex: 1 1 240px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.6rem 1rem 0.6rem 2.6rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.filter-pill.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: var(--border-focus);
}

.filter-pill.both.active {
  background: var(--both-grad);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px var(--both-glow);
}

.filter-pill.p1.active {
  background: var(--p1-color);
  color: #000;
  border: none;
  box-shadow: 0 2px 12px var(--p1-glow);
}

.filter-pill.p2.active {
  background: var(--p2-color);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px var(--p2-glow);
}

.sort-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.sort-select option {
  background: var(--bg-secondary);
  color: var(--text-main);
}

/* ===================================================================
   My Streaming Services Toggle Section
   =================================================================== */
.my-services-section {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.my-services-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none; /* Hide default triangle in many browsers */
}

/* Hide default triangle in WebKit */
.my-services-label::-webkit-details-marker {
  display: none;
}

.my-services-label .chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.my-services-section[open] .my-services-label .chevron {
  transform: rotate(180deg);
}

.my-services-section[open] .my-services-label {
  margin-bottom: 1rem;
}

.my-services-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Service toggle buttons — inherit stream-pill brand colors */
.svc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.svc-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.18);
}

.svc-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.svc-check svg {
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active state — uses brand colors from stream-pill classes */
.svc-toggle.svc-active.stream-netflix { background: rgba(229, 9, 20, 0.18); color: #ff5a60; border-color: rgba(229, 9, 20, 0.45); }
.svc-toggle.svc-active.stream-iplayer { background: rgba(245, 66, 126, 0.2); color: #ff6699; border-color: rgba(245, 66, 126, 0.45); }
.svc-toggle.svc-active.stream-prime { background: rgba(14, 165, 233, 0.18); color: #38bdf8; border-color: rgba(14, 165, 233, 0.45); }
.svc-toggle.svc-active.stream-disney { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border-color: rgba(59, 130, 246, 0.45); }
.svc-toggle.svc-active.stream-mubi { background: rgba(16, 185, 129, 0.2); color: #34d399; border-color: rgba(16, 185, 129, 0.45); }
.svc-toggle.svc-active.stream-bfi { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.45); }
.svc-toggle.svc-active.stream-paramount { background: rgba(37, 99, 235, 0.2); color: #93c5fd; border-color: rgba(37, 99, 235, 0.45); }
.svc-toggle.svc-active.stream-now { background: rgba(249, 115, 22, 0.2); color: #fb923c; border-color: rgba(249, 115, 22, 0.45); }
.svc-toggle.svc-active.stream-channel4 { background: rgba(234, 179, 8, 0.2); color: #fde047; border-color: rgba(234, 179, 8, 0.45); }
.svc-toggle.svc-active.stream-itvx { background: rgba(168, 85, 247, 0.2); color: #c084fc; border-color: rgba(168, 85, 247, 0.45); }
.svc-toggle.svc-active.stream-hbo { background: rgba(147, 51, 234, 0.2); color: #d8b4fe; border-color: rgba(147, 51, 234, 0.45); }
.svc-toggle.svc-active.stream-default { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; border-color: rgba(255, 255, 255, 0.3); }

.svc-toggle.svc-active .svc-check {
  background: currentColor;
  border-color: currentColor;
}

.svc-toggle.svc-active .svc-check svg {
  opacity: 1;
  transform: scale(1);
  stroke: #000;
}

/* ===================================================================
   Film Grid (2-Column Desktop, 1-Column Mobile)
   =================================================================== */
.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .films-grid {
    grid-template-columns: 1fr;
  }
}

.film-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.film-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* P1 Ticked State */
.film-card.checked-p1 {
  border-color: rgba(var(--p1-color-rgb), 0.4);
  background: linear-gradient(135deg, rgba(var(--p1-color-rgb), 0.08) 0%, rgba(17, 24, 39, 0.85) 100%);
}

.film-card.checked-p1::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--p1-color);
  box-shadow: 0 0 10px var(--p1-glow);
}

/* P2 Ticked State */
.film-card.checked-p2 {
  border-color: rgba(var(--p2-color-rgb), 0.4);
  background: linear-gradient(135deg, rgba(var(--p2-color-rgb), 0.08) 0%, rgba(17, 24, 39, 0.85) 100%);
}

.film-card.checked-p2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--p2-color);
  box-shadow: 0 0 10px var(--p2-glow);
}

/* BOTH TICKED: Complementary Grand Blend */
.film-card.checked-both {
  border-color: rgba(168, 85, 247, 0.6);
  background: linear-gradient(135deg, rgba(var(--p1-color-rgb), 0.12) 0%, rgba(168, 85, 247, 0.18) 50%, rgba(var(--p2-color-rgb), 0.12) 100%);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
  animation: glowPulse 4s infinite alternate;
}

.film-card.checked-both::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--both-grad);
  box-shadow: 0 0 14px var(--both-glow);
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
  }
  100% {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.45);
  }
}

.film-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.film-info-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}

.film-rank {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.film-card.checked-both .film-rank {
  background: var(--both-grad);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 10px var(--both-glow);
}

.film-card.checked-p1:not(.checked-both) .film-rank {
  background: var(--p1-color);
  color: #000;
}

.film-card.checked-p2:not(.checked-both) .film-rank {
  background: var(--p2-color);
  color: #fff;
}

.film-details {
  min-width: 0;
  flex: 1;
}

.film-title {
  font-size: 1.075rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.film-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
}

.film-year {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.film-director {
  color: #cbd5e1;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.film-country {
  font-size: 0.825rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  cursor: default;
}

.flag-icon {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.film-stream-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.785rem;
}

.stream-label {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
}

.stream-tags-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

/* Individual Colored Streamer Pills */
.stream-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.735rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  line-height: 1.25;
}

.stream-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.25);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* Netflix: Crimson Red */
.stream-pill.stream-netflix {
  background: rgba(229, 9, 20, 0.14);
  color: #ff5a60;
  border-color: rgba(229, 9, 20, 0.35);
}

/* BBC iPlayer: Vibrant Pink/Magenta */
.stream-pill.stream-iplayer {
  background: rgba(245, 66, 126, 0.16);
  color: #ff6699;
  border-color: rgba(245, 66, 126, 0.35);
}

/* Amazon Prime Video: Electric Sky Blue */
.stream-pill.stream-prime {
  background: rgba(14, 165, 233, 0.14);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.35);
}

/* Disney+: Royal Blue */
.stream-pill.stream-disney {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

/* MUBI: Jade Emerald */
.stream-pill.stream-mubi {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* BFI Player: Vintage Amber Gold */
.stream-pill.stream-bfi {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Paramount+: Azure Blue */
.stream-pill.stream-paramount {
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.35);
}

/* NOW / Sky: Sunset Orange/Coral */
.stream-pill.stream-now {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.35);
}

/* Channel 4: Canary Yellow */
.stream-pill.stream-channel4 {
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.35);
}

/* ITVX: Lilac Violet */
.stream-pill.stream-itvx {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

/* Curzon: Rose Pink */
.stream-pill.stream-curzon {
  background: rgba(244, 114, 182, 0.16);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.35);
}

/* Apple TV: Silver Pearl */
.stream-pill.stream-apple {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Crunchyroll: Anime Orange */
.stream-pill.stream-crunchyroll {
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
}

/* Shudder: Blood Crimson */
.stream-pill.stream-shudder {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ARROW: Teal Cyan */
.stream-pill.stream-arrow {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  border-color: rgba(20, 184, 166, 0.4);
}

/* Apple TV: Pure Silver */
.stream-pill.stream-apple {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.25);
}

/* HBO Max: Deep Purple */
.stream-pill.stream-hbo {
  background: rgba(147, 51, 234, 0.16);
  color: #d8b4fe;
  border-color: rgba(147, 51, 234, 0.35);
}

/* Default Streamer: Sleek Glass */
.stream-pill.stream-default {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.14);
}

.stream-rent-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-dim);
  font-size: 0.725rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.stream-rent-tag:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.film-synopsis {
  font-size: 0.865rem;
  line-height: 1.55;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
  margin-top: 0.15rem;
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===================================================================
   Player Check Buttons & Tactile Checkboxes
   =================================================================== */
.film-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.player-action-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.player-btn-watchlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-btn-watchlist:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.player-btn-watchlist.p1-active {
  color: var(--p1-color);
  background: var(--p1-bg);
  box-shadow: 0 0 8px var(--p1-glow);
}

.player-btn-watchlist.p2-active {
  color: var(--p2-color);
  background: var(--p2-bg);
  box-shadow: 0 0 8px var(--p2-glow);
}

.player-btn-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.player-btn-check:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tactile Check Box Square */
.check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.check-box svg {
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active P1 check */
.player-btn-check.p1-active {
  background: var(--p1-bg);
  border-color: var(--p1-color);
  color: var(--p1-color);
  box-shadow: 0 0 12px var(--p1-glow);
}

.player-btn-check.p1-active .check-box {
  background: var(--p1-color);
  border-color: var(--p1-color);
  box-shadow: 0 0 8px var(--p1-glow);
}

.player-btn-check.p1-active .check-box svg {
  opacity: 1;
  transform: scale(1);
  stroke: #000000;
}

/* Active P2 check */
.player-btn-check.p2-active {
  background: var(--p2-bg);
  border-color: var(--p2-color);
  color: var(--p2-color);
  box-shadow: 0 0 12px var(--p2-glow);
}

.player-btn-check.p2-active .check-box {
  background: var(--p2-color);
  border-color: var(--p2-color);
  box-shadow: 0 0 8px var(--p2-glow);
}

.player-btn-check.p2-active .check-box svg {
  opacity: 1;
  transform: scale(1);
  stroke: #ffffff;
}

.film-link-btn {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border-radius: 50%;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.film-link-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* ===================================================================
   Modals & Overlays
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem;
}

.share-link-input-group {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.share-link-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border-focus);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Empty search / filter results */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ===================================================================
   Dedicated Mobile Responsive Overrides
   =================================================================== */
@media (max-width: 680px) {
  .container {
    padding: 1rem 0.75rem 4rem 0.75rem;
  }

  .hero {
    padding: 1.25rem 0.25rem 1rem;
  }

  .hero h1 {
    font-size: 1.85rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: 0.925rem;
    margin-bottom: 1.25rem;
  }

  .hero-actions {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .list-tabs-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    padding: 0.25rem;
    gap: 0.25rem;
    margin: 0 auto 1.25rem;
  }

  .list-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 0.5rem 0.35rem;
    font-size: 0.775rem;
    gap: 0.3rem;
  }

  .tab-prefix {
    display: none;
  }

  .list-tab-btn .tab-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .list-tab-btn .tab-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    flex-shrink: 0;
  }

  .hero-actions .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.825rem;
  }

  .players-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .player-card {
    padding: 1.15rem;
  }

  .shared-section {
    margin-bottom: 1.5rem;
  }

  .shared-card {
    padding: 1.25rem 1.15rem;
  }

  .shared-title h3 {
    font-size: 1.25rem;
  }

  .controls-bar {
    padding: 0.85rem;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .search-box {
    flex: 1 1 100%;
  }

  .filter-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .sort-select {
    width: 100%;
    padding: 0.5rem 0.85rem;
  }

  .films-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .film-card {
    padding: 1rem;
    gap: 0.65rem;
  }

  .film-card-header {
    display: contents;
  }

  .film-info-wrap {
    order: 1;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .film-rank {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    margin-top: 2px;
  }

  .film-stream-row {
    margin-top: 0.3rem;
    gap: 0.35rem;
  }

  .film-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .film-meta-row {
    gap: 0.35rem 0.5rem;
    font-size: 0.785rem;
    margin-top: 0.2rem;
  }

  .film-synopsis {
    order: 2;
    font-size: 0.825rem;
    line-height: 1.5;
    padding-top: 0.1rem;
    margin-top: 0;
  }

  .film-actions {
    order: 3;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    padding-top: 0.85rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .player-action-group {
    flex: 1;
  }

  .player-btn-check {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.6rem;
    font-size: 0.825rem;
    min-height: 36px;
  }

  .film-link-btn {
    padding: 0.55rem;
    flex-shrink: 0;
    min-width: 36px;
    min-height: 36px;
  }

  .modal-content {
    padding: 1.4rem;
    margin: 1rem;
  }
}
