/* CineTrack Premium Style System */

:root {
  /* TV Time Pro Palette & WCAG 2.1 AA Compliant Glassmorphic Tokens */
  --bg-primary: #0f172a; /* Deep Slate */
  --bg-secondary: #020617; /* Pitch Black */
  --surface-primary: rgba(15, 23, 42, 0.85); /* Translucent Slate Cards */
  --surface-secondary: rgba(30, 41, 59, 0.85);
  --surface-border: rgba(255, 255, 255, 0.08); /* Subtle Borders */
  --surface-border-active: rgba(99, 102, 241, 0.6);
  
  --accent-primary: #6366f1; /* Vibrant Indigo */
  --accent-secondary: #8b5cf6; /* Electric Violet */
  --accent-gold: #eab308; /* Amber Gold */
  --accent-danger: #ef4444; /* Crimson Red */
  --accent-success: #10b981; /* Emerald Green */

  --text-primary: #f8fafc; /* Slate 50 */
  --text-secondary: #cbd5e1; /* Slate 300 */
  --text-muted: #94a3b8; /* Slate 400 */
  
  /* Fonts & Radius */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows & Filters */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 0 24px rgba(99, 102, 241, 0.4);
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.5);
  --glass-blur: blur(16px);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Accessibility: Skip to Main Content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  z-index: 9999;
  transition: top 0.2s ease, outline 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent-gold);
}

/* Accessible Focus Indicators */
:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom Scrollbar Styles (Cross-browser Firefox + WebKit) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Wrapper and Base Layouts */
#app-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(234, 179, 8, 0.03) 0%, transparent 45%);
}

/* Sidebar Layout (Desktop) */
#sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.logo-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-normal);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-btn.active {
  background: var(--surface-primary);
  border-color: var(--surface-border-active);
  color: var(--text-primary);
  box-shadow: var(--shadow-accent);
}

.nav-btn .icon {
  font-size: 18px;
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--surface-border);
}

.avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #4f46e5 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.user-profile-summary .info {
  display: flex;
  flex-direction: column;
}

.username {
  font-size: 14px;
  font-weight: 600;
}

.badge {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 600;
}

/* Main Content Structure */
#main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}

#mobile-top-bar {
  display: none;
}

#mobile-bottom-nav {
  display: none;
}

#view-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

/* Base Loader Styles */
.global-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* Glass Surface Card */
.glass-panel {
  background: var(--surface-primary);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.glass-panel.interactive:hover {
  border-color: var(--surface-border-active);
  box-shadow: var(--shadow-accent);
}

/* Headings & Texts */
h2.view-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* Grid layout for Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* Cards lists */
.horizontal-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

/* Media Item Card (TV/Movie) */
.media-card {
  width: 160px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: var(--transition-normal);
}

.media-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.media-poster-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background-color: var(--bg-secondary);
}

.media-poster-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99,102,241,0.05) 100%);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.media-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(7, 9, 19, 0.85);
  border: 1px solid var(--surface-border);
  backdrop-filter: var(--glass-blur);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
}

.media-info {
  margin-top: 10px;
}

.media-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Up Next Section styles */
.up-next-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
}

.dashboard-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
}

.up-next-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--surface-border);
  transition: var(--transition-fast);
}

.up-next-row:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(99,102,241,0.2);
}

.up-next-thumbnail {
  width: 80px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-secondary);
  flex-shrink: 0;
}

.up-next-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-next-info {
  flex-grow: 1;
  min-width: 0;
}

.up-next-show {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-next-episode {
  font-size: 13px;
  color: var(--text-secondary);
}

.up-next-action-btn {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.up-next-action-btn:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Statistics circle gauge and panel */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  text-align: center;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--surface-border);
  padding: 16px;
  border-radius: var(--radius-md);
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Settings, Drag-and-Drop and Progress Dashboard */
.upload-zone {
  border: 2px dashed var(--surface-border);
  background: rgba(255,255,255,0.01);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.02);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.upload-text-highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.upload-input {
  display: none;
}

/* Importer Progress Screen */
.import-progress-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-bar-container {
  background: rgba(255,255,255,0.05);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-gold) 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.sync-activity-log {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--surface-border);
  height: 150px;
  border-radius: var(--radius-md);
  padding: 12px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.log-entry {
  margin-bottom: 4px;
}

.log-entry.success { color: var(--accent-success); }
.log-entry.warning { color: var(--accent-gold); }

/* Rating control, sliders */
.rating-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rating-slider {
  flex-grow: 1;
  accent-color: var(--accent-gold);
}

/* Details page structures */
.details-backdrop {
  height: 350px;
  width: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--surface-border);
}

.details-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-backdrop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--bg-primary) 5%, rgba(7, 9, 19, 0.4) 60%, rgba(7, 9, 19, 0.2) 100%);
  display: flex;
  align-items: flex-end;
  padding: 32px;
}

.details-header-content {
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

.details-poster {
  width: 120px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.details-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-main-info {
  min-width: 0;
}

.details-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.details-meta-line {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.season-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.season-header:hover {
  background: rgba(255,255,255,0.04);
}

.episode-accordion-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 16px;
  border-left: 2px solid var(--accent-primary);
  margin-left: 12px;
}

.episode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.01);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
}

.episode-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.episode-title-info {
  flex-grow: 1;
  font-size: 14px;
}

.episode-airdate {
  font-size: 12px;
  color: var(--text-muted);
}

/* Calendar Vertical Timeline Styles */
#calendar-timeline-container {
  scroll-behavior: smooth;
}

#calendar-timeline-container::-webkit-scrollbar {
  width: 6px;
}
#calendar-timeline-container::-webkit-scrollbar-track {
  background: transparent;
}
#calendar-timeline-container::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 3px;
}

.timeline-day-group {
  transition: background 0.2s ease;
}
.timeline-day-group:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

.timeline-day-group:last-child {
  border-bottom: none !important;
}

.up-next-action-btn {
  background: transparent;
  border: 1px dashed var(--surface-border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.up-next-action-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.glass-panel.interactive {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.glass-panel.interactive:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
}

/* Search input field designs */
.search-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-field {
  width: 100%;
  padding: 16px 20px;
  background: var(--surface-primary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: var(--transition-normal);
}

.search-field:focus {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-accent);
}

.search-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  padding: 0 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-fast);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Grid displays */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

/* Skeletal Loading elements */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 14px;
  margin-bottom: 6px;
  width: 80%;
}

.skeleton-poster {
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

/* Toast container notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.toast {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: slide-in-toast 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.toast.success { border-left: 4px solid var(--accent-success); }
.toast.error { border-left: 4px solid var(--accent-danger); }
.toast.info { border-left: 4px solid var(--accent-primary); }
.toast.warning { border-left: 4px solid var(--accent-gold); }

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  padding: 2px 6px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.toast-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

@keyframes slide-in-toast {
  from { transform: translateY(20px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Settings Form elements */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--surface-border);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 15px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-primary);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  align-self: flex-start;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  box-shadow: var(--shadow-accent);
}

/* Responsive Adaptive styling changes */
@media (max-width: 768px) {
  .up-next-list, .dashboard-upcoming-list {
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0;
  }

  #app-wrapper {
    flex-direction: column;
  }

  #sidebar {
    display: none;
  }

  #mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--surface-border);
    padding: 16px 20px;
    height: 60px;
  }

  .avatar-mobile {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
  }

  #view-container {
    padding: 20px;
    padding-bottom: 90px; /* Spacer for bottom nav */
  }

  #mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 70px;
    background: rgba(11, 15, 30, 0.85);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--surface-border);
    justify-content: space-around;
    align-items: center;
    z-index: 100;
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    gap: 4px;
  }

  .mobile-nav-btn.active {
    color: var(--accent-primary);
  }

  .mobile-nav-btn .icon {
    font-size: 20px;
  }


  .details-backdrop {
    height: 200px;
  }

  .details-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .details-title {
    font-size: 24px;
  }
}

/* Auth View Layout & Inputs */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.auth-card {
  max-width: 440px;
  width: 100%;
}

.demo-logins-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.demo-login-box {
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--surface-border);
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  transition: var(--transition-fast);
}

.demo-login-box:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Modals & Watch Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 9, 19, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--shadow-md);
  animation: scaleUp 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Role Badges */
.role-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: inline-block;
}

.role-badge.super-admin {
  background: rgba(234, 179, 8, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.role-badge.admin {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.role-badge.moderator {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.role-badge.user {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Administrative Console Styles */
.admin-tab-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 12px;
}

.admin-log-console {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  padding: 16px;
  color: #a5b4fc;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.admin-table th, .admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
}

.admin-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.admin-table tr:hover {
  background: rgba(255,255,255,0.01);
}

/* Super Admin SVG Graphs */
.graph-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}

/* Casthead Gallery scrolls */
.cast-scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px 20px;
  scrollbar-width: thin;
}

.cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90px;
  flex-shrink: 0;
  cursor: pointer;
}

.cast-avatar {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
  border: 2px solid var(--surface-border);
  transition: var(--transition-fast);
}

.cast-card:hover .cast-avatar {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cast-character {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Watch Providers OTT Badge rows */
.provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.provider-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}

.provider-logo:hover {
  transform: scale(1.08);
  border-color: var(--accent-primary);
}

.provider-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Artist Portfolios Header & Profile Layout */
.artist-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.artist-profile-img {
  width: 160px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.artist-profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-bio-container {
  flex-grow: 1;
  min-width: 0;
}

.artist-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.artist-meta-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

/* Redesigned Dual Split Dashboard Columns */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 28px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.upcoming-release-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--surface-border);
  font-size: 13px;
}

.upcoming-release-date {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  min-width: 54px;
  flex-shrink: 0;
}

/* Administrative Dashboard & Analytics Styles */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stats-card {
  background: var(--surface-primary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.stats-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.stats-card h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 8px 0 4px;
}

.stats-card p {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

/* Settings Column Spacing & Balance */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Discussion Forum styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.spoiler-overlay {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.spoiler-overlay:hover {
  background: rgba(20, 20, 20, 0.9) !important;
  transform: scale(1.01);
}



