/* ==========================================================================
   COSMOBUBS - Modern Cosmic Theme for Zeiss-Großplanetarium Berlin
   ========================================================================== */

:root,
html[data-theme="light"] {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Palette - Light Celestial / Observatory Theme */
  --bg-cosmos: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-glass: rgba(255, 255, 255, 0.88);
  --header-bg: rgba(241, 245, 249, 0.88);
  --thumb-bg: #e2e8f0;
  --tag-bg: rgba(15, 23, 42, 0.05);

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.28);
  --border-gold: rgba(217, 119, 6, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Accents */
  --cyan-bright: #0284c7;
  --cyan-glow: rgba(2, 132, 199, 0.18);
  --indigo-accent: #4f46e5;
  --purple-accent: #7c3aed;
  --magenta-accent: #db2777;
  --gold-accent: #d97706;
  --gold-glow: rgba(217, 119, 6, 0.2);

  /* Status */
  --status-available: #059669;
  --status-low: #d97706;
  --status-soldout: #dc2626;

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

  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px -3px rgba(79, 70, 229, 0.15);
  --shadow-gold: 0 0 18px -3px rgba(217, 119, 6, 0.2);

  --stars-opacity: 0.35;
  --nebula-opacity: 0.16;
  --nebula-1-gradient: radial-gradient(circle, #818cf8 0%, transparent 70%);
  --nebula-2-gradient: radial-gradient(circle, #f472b6, #38bdf8 50%, transparent 70%);

  --date-tab-active-bg: linear-gradient(180deg, rgba(2, 132, 199, 0.1) 0%, rgba(79, 70, 229, 0.14) 100%);
  --divider-bg: linear-gradient(90deg, rgba(2, 132, 199, 0.08) 0%, rgba(255, 255, 255, 0.75) 100%);
  --divider-today-bg: linear-gradient(90deg, rgba(217, 119, 6, 0.12) 0%, rgba(255, 255, 255, 0.75) 100%);
  --divider-tomorrow-bg: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, rgba(255, 255, 255, 0.75) 100%);
  --skeleton-bg: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  --modal-backdrop-bg: rgba(15, 23, 42, 0.55);
  --modal-grid-bg: rgba(15, 23, 42, 0.04);
  --gradient-logo: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #7c3aed 100%);
  --venue-badge-bg: rgba(79, 70, 229, 0.08);
  --venue-badge-color: #4338ca;
  --venue-badge-border: rgba(79, 70, 229, 0.22);
  --btn-book-bg: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --btn-book-text: #ffffff;
  --btn-book-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
  --toggle-inactive-bg: rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] {
  /* Palette - Dark Cosmic Theme */
  --bg-cosmos: #060813;
  --bg-surface: #0e1224;
  --bg-surface-elevated: #161c36;
  --bg-surface-glass: rgba(14, 18, 36, 0.75);
  --header-bg: rgba(6, 8, 19, 0.88);
  --thumb-bg: #0d1124;
  --tag-bg: rgba(255, 255, 255, 0.05);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(245, 158, 11, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #030712;

  --cyan-bright: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.35);
  --indigo-accent: #6366f1;
  --purple-accent: #a855f7;
  --magenta-accent: #ec4899;
  --gold-accent: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.3);

  --status-available: #10b981;
  --status-low: #f59e0b;
  --status-soldout: #ef4444;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px -5px var(--cyan-glow);
  --shadow-gold: 0 0 20px -3px var(--gold-glow);

  --stars-opacity: 0.65;
  --nebula-opacity: 0.22;
  --nebula-1-gradient: radial-gradient(circle, #6366f1, transparent 70%);
  --nebula-2-gradient: radial-gradient(circle, #ec4899, #00f2fe 50%, transparent 70%);

  --date-tab-active-bg: linear-gradient(180deg, rgba(0, 242, 254, 0.18) 0%, rgba(99, 102, 241, 0.25) 100%);
  --divider-bg: linear-gradient(90deg, rgba(0, 242, 254, 0.08) 0%, rgba(14, 18, 36, 0.55) 100%);
  --divider-today-bg: linear-gradient(90deg, rgba(251, 191, 36, 0.12) 0%, rgba(14, 18, 36, 0.55) 100%);
  --divider-tomorrow-bg: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(14, 18, 36, 0.55) 100%);
  --skeleton-bg: linear-gradient(90deg, #13172e 25%, #1d2345 50%, #13172e 75%);
  --modal-backdrop-bg: rgba(3, 5, 12, 0.85);
  --modal-grid-bg: rgba(0, 0, 0, 0.25);
  --gradient-logo: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #c084fc 100%);
  --venue-badge-bg: rgba(99, 102, 241, 0.18);
  --venue-badge-color: #a5b4fc;
  --venue-badge-border: rgba(99, 102, 241, 0.3);
  --btn-book-bg: linear-gradient(135deg, #00f2fe 0%, #38bdf8 100%);
  --btn-book-text: #030712;
  --btn-book-shadow: 0 3px 10px rgba(0, 242, 254, 0.25);
  --toggle-inactive-bg: rgba(255, 255, 255, 0.12);
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg-cosmos);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Background Atmosphere */
.cosmos-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, currentColor, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 120px 80px, currentColor, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 240px 150px, #6366f1, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 320px 40px, currentColor, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 450px 220px, #00f2fe, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 560px 110px, currentColor, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 700px 300px, #ec4899, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 850px 80px, currentColor, rgba(0,0,0,0));
  background-size: 550px 550px;
  color: var(--text-primary);
  opacity: var(--stars-opacity);
  transition: opacity 0.3s ease;
}

.nebula {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: var(--nebula-opacity);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nebula-1 {
  width: 500px;
  height: 500px;
  background: var(--nebula-1-gradient);
  top: -100px;
  left: -100px;
}

.nebula-2 {
  width: 600px;
  height: 600px;
  background: var(--nebula-2-gradient);
  top: 400px;
  right: -200px;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -16px 20px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 14px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.5));
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.venue-badge {
  background: var(--venue-badge-bg);
  color: var(--venue-badge-color);
  border: 1px solid var(--venue-badge-border);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.location-text {
  color: var(--text-muted);
}

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

@media (max-width: 640px) {
  .brand-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .header-actions {
    justify-content: space-between;
  }
  .annual-pass-toggle {
    flex: 1;
  }
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--cyan-bright);
}

.icon-btn.spinning svg {
  animation: spin 1s linear infinite;
}

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

/* Jahreskarte Toggle */
.annual-pass-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  position: relative;
  text-align: left;
}

.annual-pass-toggle .star-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.toggle-text-wrap {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.toggle-status {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.toggle-switch-indicator {
  width: 36px;
  height: 20px;
  background: var(--toggle-inactive-bg);
  border-radius: var(--radius-full);
  position: relative;
  margin-left: 4px;
  transition: background-color 0.25s ease;
  flex-shrink: 0;
}

.toggle-switch-indicator::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Annual Pass Active State */
.annual-pass-toggle.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.08) 100%);
  border-color: var(--gold-accent);
  box-shadow: var(--shadow-gold);
}

.annual-pass-toggle.active .star-icon {
  transform: scale(1.15) rotate(15deg);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}

.annual-pass-toggle.active .toggle-title {
  color: var(--gold-accent);
}

.annual-pass-toggle.active .toggle-status {
  color: var(--gold-accent);
}

.annual-pass-toggle.active .toggle-switch-indicator {
  background: var(--gold-accent);
}

.annual-pass-toggle.active .toggle-switch-indicator::after {
  transform: translateX(16px);
  background: #ffffff;
}

.chip {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chip:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.chip.active {
  background: var(--bg-surface-elevated);
  color: var(--cyan-bright);
  border-color: var(--cyan-bright);
  font-weight: 600;
}

/* Date Navigator */
.date-navigator {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  margin-top: 4px;
}

.date-scroll-nav-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.date-scroll-nav-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--cyan-bright);
}

@media (max-width: 600px) {
  .date-scroll-nav-btn {
    display: none;
  }
}

.date-scroller {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px;
  flex: 1;
}
.date-scroller::-webkit-scrollbar { display: none; }

.date-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 52px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.date-tab:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-highlight);
}

.date-tab .date-day-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.date-tab .date-number {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.date-tab .date-count-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.date-tab.active {
  background: var(--date-tab-active-bg);
  border-color: var(--cyan-bright);
  box-shadow: 0 0 16px -3px var(--cyan-glow);
}

.date-tab.active .date-day-label {
  color: var(--cyan-bright);
}

.date-tab.active .date-number {
  color: var(--text-primary);
}

.date-tab.active .date-count-badge {
  color: var(--indigo-accent);
}

/* Status & Results Summary Bar */
.status-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}

.summary-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.results-count {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.results-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.reset-filters-btn {
  background: transparent;
  border: 1px dashed var(--border-highlight);
  color: var(--cyan-bright);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-filters-btn:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan-bright);
}

/* Events Grid - Compact List on Mobile, 2 Columns on Wide Screens */
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 860px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Static Day Divider (for Alle tab, grouped like ridebubs) */
.day-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-top: 14px;
  margin-bottom: 2px;
  background: var(--divider-bg);
  border-left: 3px solid var(--cyan-bright);
  border-radius: var(--radius-sm);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.day-divider:first-of-type {
  margin-top: 2px;
}

.day-divider.is-today {
  background: var(--divider-today-bg);
  border-left-color: var(--gold-accent);
}

.day-divider.is-today .day-divider-prefix {
  color: var(--gold-accent);
}

.day-divider.is-tomorrow {
  background: var(--divider-tomorrow-bg);
  border-left-color: var(--indigo-accent);
}

.day-divider.is-tomorrow .day-divider-prefix {
  color: var(--indigo-accent);
}

.day-divider-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.day-divider-prefix {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cyan-bright);
}

.day-divider-sep {
  color: var(--border-highlight);
  font-size: 0.72rem;
}

.day-divider-date {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.day-divider-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Event Card - Compact Row */
.event-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-bright);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.event-card.card-annual-pass {
  border-color: var(--border-gold);
}

.event-card.card-annual-pass:hover {
  border-color: var(--gold-accent);
  box-shadow: var(--shadow-card), var(--shadow-gold);
}

/* Thumbnail Column */
.card-thumb-col {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--thumb-bg);
  cursor: pointer;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.event-card:hover .card-thumb {
  transform: scale(1.08);
}

.badge-star-mini {
  position: absolute;
  top: 3px;
  left: 3px;
  background: var(--bg-surface-elevated);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-gold);
}

/* Main Info Column */
.card-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.card-top-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.card-time {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--cyan-bright);
}

.card-duration {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.card-bottom-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.seats-status {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.seats-status.available { color: var(--status-available); }
.seats-status.low { color: var(--status-low); }
.seats-status.soldout { color: var(--status-soldout); }
.seats-status.free-entrance { color: #38bdf8; }


/* Action Column */
.card-action-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-book-compact {
  background: var(--btn-book-bg);
  color: var(--btn-book-text);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--btn-book-shadow);
}

.btn-book-compact:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-book-compact.sold-out {
  background: var(--tag-bg);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  padding: 8px 10px;
}

/* Skeleton Loaders for Compact Cards */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-thumb {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--skeleton-bg);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  border-radius: 4px;
  background: var(--skeleton-bg);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.line-sm { height: 10px; width: 35%; }
.skeleton-line.line-lg { height: 16px; width: 80%; }
.skeleton-line.line-md { height: 12px; width: 50%; }

.skeleton-btn {
  width: 68px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--skeleton-bg);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error & Empty States */
.error-container, .empty-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  max-width: 480px;
  margin: 40px auto;
}

.error-icon, .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.error-container h3, .empty-container h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.error-container p, .empty-container p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.action-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retry-btn {
  background: #ef4444;
  color: #ffffff;
}

.retry-btn:hover {
  background: #dc2626;
}

.secondary-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-highlight);
  color: var(--cyan-bright);
}

.secondary-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--cyan-bright);
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), var(--shadow-glow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.modal-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-grid-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--modal-grid-bg);
  border-radius: var(--radius-md);
  padding: 14px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.detail-val {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-footer-actions a {
  flex: 1;
}

/* Footer */
.app-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

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

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