@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Colors */
  --bg-main: #06060c;
  --bg-card: rgba(15, 15, 27, 0.65);
  --bg-card-hover: rgba(22, 22, 40, 0.85);
  --bg-header: rgba(6, 6, 12, 0.7);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.08);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(99, 102, 241, 0.3);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6); /* Indigo to Purple */
  --grad-secondary: linear-gradient(135deg, #a855f7, #ec4899); /* Purple to Pink */
  --grad-accent: linear-gradient(135deg, #3b82f6, #06b6d4); /* Blue to Cyan */
  --grad-warning: linear-gradient(135deg, #f59e0b, #eab308); /* Amber to Yellow */
  --grad-danger: linear-gradient(135deg, #ef4444, #f43f5e); /* Red to Rose */
  --grad-success: linear-gradient(135deg, #10b981, #14b8a6); /* Emerald to Teal */
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  --grad-glow: radial-gradient(circle at top left, rgba(99, 102, 241, 0.15), transparent 45%),
               radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.1), transparent 45%);

  /* Neon Shadows */
  --shadow-neon-primary: 0 0 20px rgba(99, 102, 241, 0.25);
  --shadow-neon-secondary: 0 0 20px rgba(168, 85, 247, 0.25);
  --shadow-box: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Transition speeds */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --max-width: 1400px;
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg-main);
  background-image: var(--grad-glow);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

/* --- Layout --- */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px 60px 24px;
}

.layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

.sidebar-container {
  position: sticky;
  top: 96px;
  z-index: 10;
}

@media (max-width: 1023px) {
  .layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  
  .sidebar-container {
    position: static;
  }
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-neon-primary);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Buttons & UI Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  transition: var(--transition-normal);
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--bg-input-focus);
  border-color: var(--text-muted);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-neon-primary);
}

.btn-primary:hover {
  background: var(--grad-primary);
  opacity: 0.9;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Split Button & Dropdown Menu */
.split-btn-container {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.btn-split-main {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
  margin-right: 0 !important;
}

.btn-split-toggle {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  padding: 10px 10px !important;
  margin-left: 0 !important;
  border-left: none !important;
  display: flex !important;
  align-items: center !important;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0d0d1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  flex-direction: column;
  min-width: 260px;
  overflow: hidden;
  padding: 6px 0;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}

.plex-status-badge.syncing .plex-status-dot {
  animation: sync-pulse 1.5s infinite;
}

.plex-status-badge.waiting .plex-status-dot {
  animation: wait-pulse 2s infinite ease-in-out;
}

@keyframes wait-pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Toggle Group for View Modes */
.view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: var(--transition-fast);
}

.view-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
}

.view-btn:hover svg {
  fill: var(--text-main);
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.08);
}

.view-btn.active svg {
  fill: #fff;
}

/* --- Filter Panel --- */
.filter-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-box);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.filter-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-primary);
}

.filter-row-top {
  display: flex;
  gap: 16px;
  width: 100%;
}

.search-box {
  position: relative;
  flex-grow: 1;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--text-dim);
  transition: var(--transition-fast);
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: var(--transition-normal);
  color: var(--text-main);
}

.search-input:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.search-input:focus + svg {
  fill: #6366f1;
}

.filter-row-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 1023px) {
  .filter-row-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Pill Select styles */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  outline: none;
}

.pill:hover {
  background: var(--bg-input-focus);
  color: var(--text-main);
  border-color: rgba(99, 102, 241, 0.4);
}

.pill.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-neon-primary);
}

/* Resolution count tags in items */
.meta-resolution-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.meta-tag-q-2160p {
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
  background: rgba(251, 191, 36, 0.05) !important;
}

.meta-tag-q-1080p {
  color: #a5b4fc !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
  background: rgba(99, 102, 241, 0.05) !important;
}

.meta-tag-q-720p {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  background: rgba(56, 189, 248, 0.05) !important;
}

.meta-tag-q-other {
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  background: rgba(148, 163, 184, 0.05) !important;
}

/* Empty State / No matching releases message inside drawers */
.no-matching-releases {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  padding: 24px 15px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.sync-status.syncing {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
  color: #f1f5f9;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background var(--transition-normal);
}

.sync-status.syncing .sync-status-dot {
  background: #a855f7;
  animation: sync-pulse 1.5s infinite;
  box-shadow: 0 0 8px #a855f7;
}

.sync-status.idle .sync-status-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

@keyframes sync-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

.btn:disabled, .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
}

.stats-count span {
  font-weight: 700;
  color: var(--text-main);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Timeline & Releases Grid --- */
.releases-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.releases-timeline::before {
  content: '';
  position: absolute;
  left: 60px; /* Aligned with day-title dot */
  top: 25px;
  bottom: 25px;
  width: 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.day-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 73px;
  z-index: 10;
  padding: 12px 16px;
  margin: 0 -16px;
  background: rgba(6, 6, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.day-title {
  position: relative;
  padding-left: 76px; /* Dot center at 60px edge */
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.day-title::before {
  content: '';
  position: absolute;
  left: 55px; /* center is 60px */
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-neon-primary);
  z-index: 2;
}

.day-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%);
}

/* --- List View Layout --- */
.releases-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding-left: 80px; /* Make space for timeline times and dots */
}

/* Timeline Rows & Dots */
.release-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: visible; /* Allow timeline time and dot to sit outside card bounds */
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-box);
  margin-bottom: 4px;
}

@media (min-width: 769px) {
  .card-main-content {
    position: relative;
  }
  
  .timeline-time {
    position: absolute;
    left: -88px; /* occupy 0px to 45px of page margin */
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    text-align: right;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
  }
  
  /* Timeline node dot centered on 60px line relative to card-main-content */
  .card-main-content::before {
    content: '';
    position: absolute;
    left: -27px; /* center is 60px */
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    border: 2px solid var(--bg-main);
    z-index: 2;
    transition: all var(--transition-normal);
  }
  
  .release-card.type-movie .card-main-content::before {
    background: #a855f7 !important;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6) !important;
  }
  .release-card.type-series .card-main-content::before,
  .release-card.type-anime .card-main-content::before {
    background: #06b6d4 !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6) !important;
  }
}

/* Card type distinctions (left border + colored hover shadow glow) */
.release-card.type-movie {
  border-left: 3px solid rgba(99, 102, 241, 0.85);
}
.release-card.type-movie .release-info-line {
  color: rgba(99, 102, 241, 0.95);
  background: rgba(99, 102, 241, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.25);
  width: fit-content;
}
.release-card.type-movie:hover {
  border-left-color: rgba(99, 102, 241, 1.0);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(99, 102, 241, 0.18),
    inset 0 0 12px rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.release-card.type-series {
  border-left: 3px solid rgba(6, 182, 212, 0.85);
}
.release-card.type-series .release-info-line {
  color: rgba(6, 182, 212, 0.95);
  background: rgba(6, 182, 212, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.25);
  width: fit-content;
}
.release-card.type-series:hover {
  border-left-color: rgba(6, 182, 212, 1.0);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(6, 182, 212, 0.18),
    inset 0 0 12px rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

/* New Item Highlights (glowing border + poster badge) */
.release-card.is-new-item {
  box-shadow: 
    var(--shadow-box), 
    0 0 15px rgba(168, 85, 247, 0.15),
    inset 0 0 10px rgba(168, 85, 247, 0.05);
}
.release-card.is-new-item:hover {
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(168, 85, 247, 0.25),
    inset 0 0 12px rgba(255, 255, 255, 0.02);
}

.new-media-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--grad-secondary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  z-index: 5;
  box-shadow: var(--shadow-neon-secondary);
  animation: pulse-glow-purple 2s infinite ease-in-out;
}

@keyframes pulse-glow-purple {
  0% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.6); }
  100% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.3); }
}

@media (max-width: 768px) {
  .releases-container {
    padding-left: 0;
  }
  .releases-timeline::before {
    display: none;
  }
  .day-header {
    padding: 12px 16px;
    margin: 0 -16px;
  }
  .day-title {
    padding-left: 16px;
  }
  .day-title::before {
    left: 0;
  }
  .timeline-time {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    margin-left: 4px;
  }
}

.card-main-content {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 16px;
  gap: 20px;
}

@media (max-width: 768px) {
  .card-main-content {
    flex-direction: column;
    gap: 12px;
  }
}

.card-media {
  position: relative;
  width: 110px;
  height: 165px; /* exactly 2:3 ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-media:hover {
  border-color: var(--border-color-glow);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
  .card-media {
    width: 100%;
    height: 180px;
  }
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fully fills the container without black bars! */
  transition: transform 0.3s ease;
}

.card-media:hover img {
  transform: scale(1.05); /* subtle internal zoom */
}

.media-no-image {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.85rem;
}

.card-details-area {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 16px;
}

.card-left-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}

.card-right-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: monospace;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .release-card {
    position: relative;
  }
  .card-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .card-right-info {
    align-items: flex-start;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.release-info-line {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px; /* Changed from -4px to 2px for better spacing */
}

.release-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0;
  flex-grow: 1;
}

.title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.release-fulltitle {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.4;
}

.property-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.badge-property {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.badge-prop-dv {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(168, 85, 247, 0.15));
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.badge-prop-hdr {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.badge-prop-source {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.badge-prop-codec {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-prop-audio {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.card-badges-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-anime {
  background: var(--grad-secondary);
  color: #fff;
}

.badge-series {
  background: var(--grad-accent);
  color: #fff;
}

.badge-movie {
  background: var(--grad-primary);
  color: #fff;
}

.badge-quality {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
}

.badge-quality-4k {
  background: var(--grad-warning);
  color: #000;
}

.badge-quality-1080p {
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
}

.badge-season {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.badge-rating {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  display: flex;
  align-items: center;
}

.badge-plex {
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: default;
}

.badge-plex-present {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.badge-plex-partial {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.badge-plex-missing {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.plex-status-badge {
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.plex-status-badge:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--text-main) !important;
}

.release-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-tag-highlight {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.2);
}

.meta-tag-imdb {
  color: #f5c518;
  border-color: rgba(245, 197, 24, 0.15);
  cursor: pointer;
  transition: var(--transition-fast);
}

.meta-tag-imdb:hover {
  background: rgba(245, 197, 24, 0.08);
  border-color: rgba(245, 197, 24, 0.4);
  box-shadow: 0 0 10px rgba(245, 197, 24, 0.1);
}

.meta-tag-warez {
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.15);
  cursor: pointer;
  transition: var(--transition-fast);
}

.meta-tag-warez:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}

.meta-tag-episodes {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.15);
}

.card-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 16px;
  flex-wrap: wrap;
}

.hoster-pill-row {
  display: flex;
  gap: 6px;
}

.hoster-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hoster-ddownload {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.08);
  border-color: rgba(255, 85, 85, 0.2);
}

.hoster-rapidgator {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.08);
  border-color: rgba(255, 159, 67, 0.2);
}

.btn-expand-drawer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-expand-drawer:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--border-color-glow);
  color: var(--text-main);
}

.btn-expand-drawer.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-neon-primary);
}

.btn-expand-drawer .chevron-icon {
  transition: transform 0.2s ease;
}

.btn-expand-drawer.active .chevron-icon {
  transform: rotate(180deg);
}

/* --- Card Drawer --- */
.card-drawer {
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.drawer-inner-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .drawer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.drawer-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
  border-left: 3px solid #6366f1;
  padding-left: 8px;
}

/* Compact Cast List */
.actors-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.actor-card-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px;
  overflow: hidden;
}

.actor-image-compact {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  background: #111;
}

.actor-info-compact {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.7rem;
}

.actor-name-compact {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actor-role-compact {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Loading Shimmer States --- */
.shimmer {
  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: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-card {
  height: 182px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  padding: 16px;
  gap: 20px;
  align-items: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .shimmer-card {
    flex-direction: column;
    height: auto;
    align-items: stretch;
  }
}

.shimmer-media {
  width: 110px;
  height: 150px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .shimmer-media {
    width: 100%;
    height: 180px;
  }
}

.shimmer-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.shimmer-line {
  height: 14px;
  border-radius: 4px;
}

.shimmer-title { width: 45%; height: 20px; }
.shimmer-text { width: 75%; }
.shimmer-badges { display: flex; gap: 8px; margin-top: auto; }
.shimmer-badge { width: 60px; height: 22px; border-radius: var(--radius-full); }



/* Technical Details Table */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tech-table tr {
  border-bottom: 1px solid var(--border-color);
}

.tech-table tr:last-child {
  border-bottom: none;
}

.tech-table td {
  padding: 10px 0;
}

.tech-label {
  font-weight: 700;
  color: var(--text-muted);
  width: 35%;
}

.tech-value {
  color: var(--text-main);
  font-family: monospace;
}

/* Download / Hoster Section */
.hoster-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hoster-block {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.hoster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hoster-name-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

.hoster-actions-btn-group {
  display: flex;
  gap: 10px;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(20, 20, 20, 0.5);
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-family: monospace;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.link-item a {
  color: var(--text-muted);
  word-break: break-all;
  transition: var(--transition-fast);
}

.link-item a:hover {
  color: #6366f1;
}

.link-num {
  font-weight: 700;
  color: var(--text-dim);
  padding-right: 10px;
  border-right: 1px solid var(--border-color);
  margin-right: 10px;
  flex-shrink: 0;
}

/* Floating Actions */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.fab {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-box);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.fab:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-glow);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.fab svg {
  width: 22px;
  height: 22px;
  fill: var(--text-main);
}

.fab-totop {
  opacity: 0;
  pointer-events: none;
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: var(--shadow-neon-primary);
  color: #fff;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.fab-totop:hover {
  background: var(--grad-primary);
  opacity: 0.95 !important;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
}

.fab-totop svg {
  fill: #fff !important;
}

.fab-totop.visible {
  opacity: 1;
  pointer-events: auto;
  animation: fab-entrance 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both, fab-glow-pulse 2s infinite;
}

@keyframes fab-entrance {
  from {
    transform: translateY(20px) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fab-glow-pulse {
  0% {
    box-shadow: var(--shadow-neon-primary);
  }
  50% {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
  }
  100% {
    box-shadow: var(--shadow-neon-primary);
  }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  gap: 20px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  fill: var(--text-dim);
}

.empty-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-desc {
  color: var(--text-muted);
  max-width: 400px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .modal-container {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 90px 16px 40px 16px;
  }
  
  .filter-panel {
    padding: 16px;
  }
  
  .filter-row-top {
    flex-direction: column;
  }
  
}

@media (max-width: 480px) {
  
  .header-content {
    padding: 12px 16px;
  }
  
  .logo-text {
    font-size: 1.2rem;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  
  .logo-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .modal-body {
    padding: 20px;
  }
}

/* --- Container Files Styles --- */
.container-files-section {
  margin-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.container-files-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.container-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episode-group {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition-fast);
}

.episode-group:hover {
  background: rgba(255, 255, 255, 0.01);
  border-color: rgba(99, 102, 241, 0.15);
}

.episode-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #a5b4fc;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.episode-group-header::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform var(--transition-normal);
  margin-left: 10px;
}

.episode-group.expanded .episode-group-header::after {
  transform: rotate(90deg);
}

.episode-parts-list {
  display: none; /* Collapsed by default */
  flex-direction: column;
  gap: 4px;
  padding-left: 10px;
  border-left: 2px solid rgba(99, 102, 241, 0.25);
  margin-top: 8px;
}

.episode-group.expanded .episode-parts-list {
  display: flex;
}

.part-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
  padding: 2px 0;
  transition: var(--transition-fast);
}

.part-item:hover {
  color: var(--text-main);
}

.part-name {
  word-break: break-all;
  padding-right: 12px;
}

.part-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.part-size {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.part-status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.part-status-online {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.part-status-offline {
  background-color: #f43f5e;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

/* Episode Click'n'Load and Header layouts */
.btn-episode-cnl {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
  margin-right: 28px; /* Position to the left of the chevron arrow */
  z-index: 2;
  transition: var(--transition-fast);
}

.btn-episode-cnl:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
  transform: translateY(-0.5px);
}

.btn-episode-cnl:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-dim) !important;
  box-shadow: none !important;
  opacity: 0.5;
}

.episode-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.episode-parts-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: normal;
}

/* Bulk Click'n'Load Button */
.btn-bulk-cnl {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
  transition: var(--transition-fast);
}

.btn-bulk-cnl:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
  transform: translateY(-0.5px);
}

.btn-bulk-cnl:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-dim) !important;
  box-shadow: none !important;
  opacity: 0.5;
}

/* Floating Cover Preview Tooltip */
#cover-preview-tooltip {
  position: absolute;
  pointer-events: none; /* prevent blocking mouse events */
  z-index: 10000;
  width: 240px;
  height: 360px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 16, 0.88);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.95);
  display: none;
}

#cover-preview-tooltip.visible {
  opacity: 1;
  transform: scale(1);
}

#cover-preview-tooltip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Language Flags next to Title */
.title-flags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.lang-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  object-fit: cover;
}

.lang-text-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  vertical-align: middle;
}

/* Releases list inside drawer */
.releases-list-container,
.releases-flat-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.release-list-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.release-list-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.3);
}

.release-row-header-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.release-row-title {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-main);
  word-break: break-all;
  line-height: 1.4;
  flex-grow: 1;
}

.release-row-title-flags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

.release-row-title-flags img.lang-flag {
  width: 14px;
  height: 14px;
}

.release-row-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.release-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge-tech {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-tech.badge-res {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.badge-tech.badge-audio {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.badge-tech.badge-size {
  font-family: monospace;
}

.release-plex-container {
  display: flex;
  align-items: center;
}

.release-row-actions-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.container-files-list {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-top: 8px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.meta-genre-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Added Layout and Interactive Styles --- */

.drawer-content-full {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-info-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.drawer-releases-row {
  width: 100%;
}

@media (max-width: 768px) {
  .drawer-info-row {
    flex-direction: column;
    gap: 16px;
  }
}

/* Plex Button Styling on Card Face */
.meta-tag-plex {
  color: #e5a93b;
  border-color: rgba(229, 169, 59, 0.15);
  cursor: pointer;
  transition: var(--transition-fast);
}

.meta-tag-plex:hover {
  background: rgba(229, 169, 59, 0.08);
  border-color: rgba(229, 169, 59, 0.4);
  box-shadow: 0 0 10px rgba(229, 169, 59, 0.1);
}

/* "What's New" Badge */
.whats-new-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-top: 2px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.1);
  animation: pulse-glow-blue 2s infinite ease-in-out;
}

@keyframes pulse-glow-blue {
  0% { box-shadow: 0 0 8px rgba(56, 189, 248, 0.1); }
  50% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.25); }
  100% { box-shadow: 0 0 8px rgba(56, 189, 248, 0.1); }
}

/* Season Block and Headers */
.season-block-group {
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
}

.season-block-group:last-child {
  margin-bottom: 0;
}

.season-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: none;
  cursor: pointer;
  user-select: none;
}

.season-block-group.expanded .season-group-header {
  border-bottom: 1px solid var(--border-color);
}

.season-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.season-releases-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.season-plex-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 169, 59, 0.1);
  border: 1px solid rgba(229, 169, 59, 0.25);
  color: #e5a93b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.season-plex-btn:hover {
  background: rgba(229, 169, 59, 0.18);
  border-color: rgba(229, 169, 59, 0.5);
  box-shadow: 0 0 10px rgba(229, 169, 59, 0.15);
  transform: translateY(-0.5px);
}

.season-plex-btn svg {
  flex-shrink: 0;
}

/* Releases Categorization Subheaders */
.release-class-subheader {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 14px;
  margin-bottom: 8px;
  width: fit-content;
}

.release-class-subheader:first-child {
  margin-top: 0;
}

.hevc-subheader {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.standard-subheader {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
}

.bad-subheader {
  color: #f87171;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* HEVC Row Highlight Style (Redesigned to distinguish from movie card borders) */
.hevc-highlight-row {
  background: rgba(168, 85, 247, 0.03) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.25) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.05) !important;
}

.hevc-highlight-row:hover {
  background: rgba(168, 85, 247, 0.06) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15) !important;
}

/* Crypted Containers List & Row Styles */
.release-containers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.release-container-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  gap: 12px;
}

.container-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.container-hoster-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.container-hoster-badge.hoster-ddownload {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.08);
  border: 1px solid rgba(255, 85, 85, 0.2);
}

.container-hoster-badge.hoster-rapidgator {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.08);
  border: 1px solid rgba(255, 159, 67, 0.2);
}

.container-type-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.container-health {
  display: inline-flex;
  align-items: center;
}

.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.health-dot.status-online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.health-dot.status-offline {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.health-dot.status-partial {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.health-dot.status-unknown {
  background-color: var(--text-dim);
}

.container-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.container-files-list {
  width: 100%;
}

/* Custom Multiselect styles */
.custom-multiselect {
  position: relative;
  display: inline-block;
}

.btn-multiselect-toggle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-multiselect-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-glow);
  color: var(--text-main);
}

.multiselect-dropdown {
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  min-width: 180px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 4px;
  animation: slideUpFade 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.multiselect-dropdown label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  margin-bottom: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  position: relative;
  user-select: none;
}

.multiselect-dropdown label:last-child {
  margin-bottom: 0;
}

.multiselect-dropdown label:hover {
  color: var(--text-main);
}

/* Hide native checkbox inside dropdown */
.multiselect-dropdown input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom Checkbox Box */
.custom-checkbox-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: inline-block;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

/* Checkbox Checked state */
.multiselect-dropdown input[type="checkbox"]:checked + .custom-checkbox-box {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* Checkmark check symbol */
.custom-checkbox-box::after {
  content: '';
  position: absolute;
  display: none;
  left: 4px;
  top: 1px;
  width: 3.5px;
  height: 7px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.multiselect-dropdown input[type="checkbox"]:checked + .custom-checkbox-box::after {
  display: block;
}

/* Indeterminate state checkmark (for Select All) */
.multiselect-dropdown input[type="checkbox"]:indeterminate + .custom-checkbox-box {
  background: var(--grad-primary);
  border-color: transparent;
}

.multiselect-dropdown input[type="checkbox"]:indeterminate + .custom-checkbox-box::after {
  display: block;
  left: 3px;
  top: 5px;
  width: 6px;
  height: 0;
  border: solid white;
  border-width: 1.5px 0 0 0;
  transform: none;
}

/* Resolution Filter Chips */
.drawer-resolution-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label-inline {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.res-chip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.res-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.res-chip-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.res-chip:hover .res-chip-text {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
  color: var(--text-main);
}

.res-chip input[type="checkbox"]:checked + .res-chip-text {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-neon-primary);
}

.res-chip input[type="checkbox"]:focus-visible + .res-chip-text {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* --- Pagination --- */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-pagination {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-title);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.btn-pagination:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-pagination.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-neon-primary);
}

.btn-pagination.active:hover {
  background: var(--grad-primary);
  opacity: 0.9;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
  transform: none;
}

.btn-pagination:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
  border-color: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  pointer-events: none;
}

.pagination-ellipsis {
  color: var(--text-dim);
  font-family: var(--font-title);
  padding: 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  user-select: none;
}

/* --- Redesigned UI/UX Elements (Overrides) --- */

/* Desktop-specific card media sizing */
@media (min-width: 769px) {
  .card-media {
    width: 130px !important;
    height: 195px !important;
  }
}

/* Card details inner grid structure */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title-row {
  margin-top: 4px;
  width: 100%;
  display: block !important;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  gap: 16px;
  width: 100%;
}

.card-footer-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.card-footer-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* Redesigned Brand Type Badges */
.badge-item-type {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
}

.badge-item-type.type-movie {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.05);
}

.badge-item-type.type-series {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.05);
}

/* Glassmorphism Badges */
.badge-glass {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
}

.badge-glass.badge-rating {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

.badge-glass.badge-plex-present {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

.badge-glass.badge-plex-partial {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

.badge-glass.badge-plex-missing {
  background: rgba(239, 68, 68, 0.04) !important;
  border-color: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
}

/* YouTube Trailer Section */
.trailer-section {
  width: 100%;
  margin-bottom: 8px;
}

.trailer-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.trailer-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.trailer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.trailer-card:hover .trailer-thumb {
  transform: scale(1.02);
}

.play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.trailer-card:hover .play-button-overlay {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
}

.trailer-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Redesigned Collapsible Tabular Release Rows */
.release-list-row {
  border-radius: var(--radius-md) !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  border: 1px solid var(--border-color) !important;
}

.release-row-clickable-header {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color var(--transition-fast);
}

.release-row-clickable-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.release-row-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
  flex-wrap: nowrap !important;
}

.release-row-chevron {
  transition: transform var(--transition-normal);
  color: var(--text-dim);
  flex-shrink: 0;
}

.release-list-row.expanded {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.release-list-row.expanded.hevc-highlight-row {
  border-color: rgba(168, 85, 247, 0.45) !important;
}

.release-list-row.expanded .release-row-chevron {
  transform: rotate(180deg);
  color: var(--text-main);
}

.release-containers-list {
  display: none;
  padding: 14px 16px !important;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  animation: slideDownFade 0.2s ease forwards;
}

/* Technical Badges for Dolby Vision / HDR inside Release list */
.badge-tech.badge-prop-dv {
  background: rgba(236, 72, 153, 0.1) !important;
  border-color: rgba(236, 72, 153, 0.3) !important;
  color: #f472b6 !important;
}

.badge-tech.badge-prop-hdr {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .card-footer-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .card-footer-left {
    justify-content: flex-start !important;
  }
  .card-footer-right {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .card-footer-right .btn-expand-drawer {
    width: 100% !important;
    justify-content: center !important;
  }
  .release-row-meta-line {
    flex-wrap: wrap !important;
  }
  .release-row-chevron {
    margin-left: auto;
  }
}

/* --- UI/UX Refinements & Bugfixes --- */

/* Distinct Movie vs Series Card Borders and Glow Shadows */
.release-card.type-movie {
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  border-left: 3.5px solid rgba(168, 85, 247, 0.9) !important; /* Vibrant Violet */
}

.release-card.type-movie:hover {
  border-left-color: rgba(168, 85, 247, 1.0) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(168, 85, 247, 0.25), /* Violet Glow */
    inset 0 0 12px rgba(255, 255, 255, 0.02) !important;
}

.release-card.type-movie .badge-item-type.type-movie {
  color: #f3e8ff !important;
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.release-card.type-series {
  border: 1px solid rgba(6, 182, 212, 0.5) !important; /* High-intensity cyan border in normal state */
  border-left: 3.5px solid rgba(6, 182, 212, 0.9) !important; /* Vibrant Cyan */
}

.release-card.type-series:hover {
  border-left-color: rgba(6, 182, 212, 1.0) !important;
  border-color: rgba(6, 182, 212, 0.75) !important;
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(6, 182, 212, 0.25), /* Cyan Glow */
    inset 0 0 12px rgba(255, 255, 255, 0.02) !important;
}

.release-card.type-series .badge-item-type.type-series {
  color: #cffafe !important;
  background: rgba(6, 182, 212, 0.12) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.release-card.type-anime {
  border: 1px solid rgba(6, 182, 212, 0.5) !important;
  border-left: 3.5px solid rgba(6, 182, 212, 0.9) !important; /* Vibrant Cyan */
}

.release-card.type-anime:hover {
  border-left-color: rgba(6, 182, 212, 1.0) !important;
  border-color: rgba(6, 182, 212, 0.75) !important;
  box-shadow: 
    var(--shadow-box), 
    0 10px 30px rgba(6, 182, 212, 0.25), /* Cyan Glow */
    inset 0 0 12px rgba(255, 255, 255, 0.02) !important;
}

.release-card.type-anime .badge-item-type.type-anime {
  color: #cffafe !important;
  background: rgba(6, 182, 212, 0.12) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

/* Two-column grid for Trailer & Cast on desktop */
.drawer-media-grid {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 768px) {
  .drawer-media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Absolute position for the Multiselect dropdown (overlay instead of stretching) */
.custom-multiselect {
  position: relative !important;
}

.multiselect-dropdown {
  display: none;
  position: absolute !important;
  bottom: calc(100% + 6px) !important;
  left: 0 !important;
  z-index: 1000 !important;
  margin-bottom: 0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(99, 102, 241, 0.15) !important;
}

/* Technical Badges Grid Alignment in Releases Sektion */
.release-tech-badges.has-episodes {
  display: grid !important;
  grid-template-columns: 50px 48px 80px 65px 55px 68px 90px auto !important;
  gap: 8px !important;
  align-items: center !important;
  flex-grow: 1;
}

.release-tech-badges.no-episodes {
  display: grid !important;
  grid-template-columns: 48px 80px 65px 55px 68px 90px auto !important;
  gap: 8px !important;
  align-items: center !important;
  flex-grow: 1;
}

.badge-tech {
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  padding: 3px 4px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: center;
  height: 20px !important;
}

/* Individual color-coding for each technical badge type */
.badge-tech.badge-episodes {
  color: #f472b6 !important; /* Pink */
  background: rgba(236, 72, 153, 0.08) !important;
  border: 1px solid rgba(236, 72, 153, 0.25) !important;
}

.badge-tech.badge-res {
  color: #60a5fa !important; /* Blue */
  background: rgba(59, 130, 246, 0.08) !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

.badge-tech.badge-audio {
  color: #d8b4fe !important; /* Purple */
  background: rgba(168, 85, 247, 0.08) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.badge-tech.badge-source {
  color: #34d399 !important; /* Emerald */
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.badge-tech.badge-codec {
  color: #fb7185 !important; /* Rose */
  background: rgba(244, 63, 94, 0.08) !important;
  border: 1px solid rgba(244, 63, 94, 0.25) !important;
}

.badge-tech.badge-size {
  color: #38bdf8 !important; /* Sky */
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  font-family: monospace;
}

.badge-tech.badge-group {
  color: #94a3b8 !important; /* Slate */
  background: rgba(148, 163, 184, 0.08) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.badge-tech.badge-empty {
  border: none !important;
  background: transparent !important;
  visibility: hidden !important;
}

.badge-tech-properties {
  display: flex;
  gap: 4px;
  align-items: center;
}

.badge-tech-properties .badge-tech {
  width: auto !important;
  padding: 3px 6px !important;
}

/* Mobile responsive resets for badges and grid */
@media (max-width: 768px) {
  .release-tech-badges.has-episodes,
  .release-tech-badges.no-episodes {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  
  .badge-tech.badge-empty {
    display: none !important;
  }
  
  .badge-tech {
    width: auto !important;
    padding: 3px 8px !important;
  }
  
  .badge-tech.badge-audio,
  .badge-tech.badge-group {
    max-width: none !important;
    text-overflow: clip;
    overflow: visible;
    white-space: normal;
  }
}

/* Allow multiselect dropdowns to be visible over parent boundaries */
.release-list-row {
  overflow: visible !important;
}

.season-block-group {
  overflow: visible !important;
}

.release-containers-list {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}
