@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-red: #E50914;
  --primary-red-hover: #b80710;
  --bg-black: #0c0c0c;
  --bg-card: #181818;
  --glass-bg: rgba(20, 20, 20, 0.65);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: rgba(0, 0, 0, 0.5);
  --text-white: #ffffff;
  --text-grey: #a3a3a3;
  --text-dim: #737373;
  --rating-gold: #ffc107;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-red) rgba(255, 255, 255, 0.05);
}

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-family);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-red-hover);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* App Layout & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.8rem 4%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  color: var(--primary-red);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  text-transform: uppercase;
  background: linear-gradient(to right, #FF1E27, var(--primary-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo i {
  -webkit-text-fill-color: var(--primary-red);
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-grey);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-red);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 100%;
}

.search-nav-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-wrapper input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: var(--text-white);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  width: 220px;
  transition: var(--transition-smooth);
}

.search-box-wrapper input:focus {
  width: 320px;
  border-color: var(--primary-red);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.search-box-wrapper i {
  position: absolute;
  left: 0.9rem;
  color: var(--text-grey);
  font-size: 0.9rem;
  pointer-events: none;
}

/* Home Page Content Layout */
main {
  padding-bottom: 5rem;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  display: flex;
  align-items: center;
  padding: 0 6%;
  background-size: cover;
  background-position: center 20%;
  margin-bottom: 2rem;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(12, 12, 12, 0.9) 20%, rgba(12, 12, 12, 0.3) 60%, rgba(12, 12, 12, 0) 100%),
              linear-gradient(to top, rgba(12, 12, 12, 1) 0%, rgba(12, 12, 12, 0.4) 30%, rgba(12, 12, 12, 0) 70%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-tag {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #d1d1d1;
}

.hero-rating {
  color: var(--rating-gold);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-overview {
  font-size: 1rem;
  color: var(--text-grey);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background-color: var(--primary-red);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* Category Filter Bar */
.filter-bar {
  padding: 0 4%;
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--text-grey);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-select:focus, .filter-select:hover {
  border-color: var(--primary-red);
  background: rgba(255, 255, 255, 0.05);
}

/* Section Title & Horizontal Slider */
.section-container {
  padding: 0 4%;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.25rem;
  background-color: var(--primary-red);
  border-radius: 2px;
}

.slider-wrapper {
  position: relative;
}

.media-slider {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1.5rem;
  scroll-behavior: smooth;
}

.media-slider::-webkit-scrollbar {
  height: 4px;
}

.media-slider::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.media-slider:hover::-webkit-scrollbar-thumb {
  background: var(--primary-red);
}

/* Media Card Item */
.media-card {
  position: relative;
  flex: 0 0 calc(100% / 6.5);
  min-width: 170px;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
  .media-card {
    flex: 0 0 calc(100% / 4.5);
  }
}
@media (max-width: 768px) {
  .media-card {
    flex: 0 0 calc(100% / 3.2);
  }
}
@media (max-width: 480px) {
  .media-card {
    flex: 0 0 calc(100% / 2.2);
  }
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.media-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
  z-index: 10;
}

.media-card:hover img {
  filter: brightness(0.4);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 2;
}

.media-card:hover .card-overlay {
  opacity: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-grey);
}

.card-rating {
  color: var(--rating-gold);
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.card-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  border: 1px solid var(--text-dim);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

/* Modals System (Details, Torrents, Player) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 2rem;
}

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

.modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  border-radius: 12px;
  overflow-y: auto;
  animation: modalScaleUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
  transform: scale(1.1);
}

/* Details Modal Specifics */
.details-backdrop {
  height: 380px;
  width: 100%;
  position: relative;
  background-size: cover;
  background-position: center 20%;
}

.details-backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--bg-card) 0%, rgba(24, 24, 24, 0.4) 70%, rgba(24, 24, 24, 0) 100%),
              linear-gradient(to right, rgba(24, 24, 24, 0.8) 10%, rgba(24, 24, 24, 0) 50%);
}

.details-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 2rem;
  background: var(--bg-card);
}

@media (max-width: 768px) {
  .details-body {
    grid-template-columns: 1fr;
  }
  .details-poster-col {
    display: none;
  }
}

.details-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
}

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

.details-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.details-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.details-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-grey);
}

.details-genre-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.details-overview {
  color: var(--text-grey);
  font-size: 0.95rem;
  line-height: 1.6;
}

.details-cast {
  font-size: 0.9rem;
  color: var(--text-white);
}

.details-cast span {
  color: var(--text-grey);
}

/* TV Show Seasons & Episodes Selection */
.tv-series-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.tv-selector-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tv-selector-row select {
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-white);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.episode-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.episode-card {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.6rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.episode-still {
  width: 100px;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-black);
}

.episode-still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.episode-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.episode-number {
  font-size: 0.75rem;
  color: var(--primary-red);
  font-weight: 700;
  text-transform: uppercase;
}

.episode-desc {
  font-size: 0.8rem;
  color: var(--text-grey);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Torrents Results Modal Specifics */
.torrents-modal-content {
  background: var(--bg-card);
  padding: 2.2rem;
  color: var(--text-white);
  border: 1px solid var(--glass-border);
}

.torrents-header {
  margin-bottom: 1.5rem;
}

.torrents-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.torrents-header p {
  color: var(--text-grey);
  font-size: 0.9rem;
}

.torrents-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.torrent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: var(--transition-smooth);
  gap: 1.5rem;
}

.torrent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.torrent-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0; /* allows text truncation inside flexbox */
}

.torrent-name-display {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.torrent-subdetails {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-grey);
}

.torrent-seeds {
  color: #2ecc71;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.torrent-source {
  text-transform: uppercase;
  color: var(--primary-red);
}

.torrent-actions-row {
  display: flex;
  gap: 0.6rem;
}

.torrent-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  padding: 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.torrent-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

.torrent-btn-primary {
  background: var(--primary-red);
  border-color: var(--primary-red);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
}

.torrent-btn-primary:hover {
  background: var(--primary-red-hover);
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.3);
}

/* Video Player Modal Specifics */
.player-modal-content {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  background: #000;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.player-controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.video-container:hover .player-controls-overlay,
.video-container.controls-active .player-controls-overlay {
  opacity: 1;
  pointer-events: auto;
}

.player-timeline-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.player-timeline {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.player-timeline-progress {
  height: 100%;
  width: 0%;
  background: var(--primary-red);
  border-radius: 4px;
  position: relative;
}

.player-timeline-handle {
  position: absolute;
  right: -6px;
  top: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-white);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.player-timeline:hover .player-timeline-handle {
  opacity: 1;
}

.player-time-display {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.player-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-left-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.player-right-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.player-icon-btn {
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.player-icon-btn:hover {
  color: var(--primary-red);
  transform: scale(1.15);
}

.player-stats-toast {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.player-stats-title {
  color: var(--primary-red);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.player-stats-item {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.player-stats-item span {
  color: var(--text-grey);
}

/* Active and Completed Downloads Panel */
.library-section {
  padding: 0 4%;
  margin-top: 6rem;
  animation: fadeIn 0.5s ease-out;
}

.tabs-container {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
  gap: 2rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-grey);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.tab-btn:hover, .tab-btn.active {
  color: var(--text-white);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--primary-red);
  transition: var(--transition-smooth);
}

.tab-btn.active::after {
  width: 100%;
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 1.25rem;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.download-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.download-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-grey);
  font-weight: 600;
}

.download-progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.download-progress-fill {
  height: 100%;
  background: var(--primary-red);
  width: 0%;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
}

.download-actions {
  display: flex;
  gap: 0.5rem;
}

/* Toast System (Clipboard copy alert) */
.toast-alert {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-alert.show {
  transform: translateY(0);
}

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

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

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Search results grid */
.search-results-section {
  padding: 6rem 4% 3rem;
  animation: fadeIn 0.4s ease-out;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Spinner Animation */
.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Responsive design optimizations */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.8rem 4%;
    justify-content: space-between;
  }
  
  header.scrolled {
    padding: 0.6rem 4%;
  }

  nav {
    gap: 1.2rem;
    order: 2;
  }

  .search-nav-container {
    width: 100%;
    order: 3;
    margin-top: 0.25rem;
  }

  .search-box-wrapper {
    width: 100%;
  }

  .search-box-wrapper input {
    width: 100%;
    border-radius: 12px;
  }

  .search-box-wrapper input:focus {
    width: 100%;
  }

  .hero {
    height: 70vh;
    padding: 8rem 4% 2rem;
    align-items: flex-end;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-overview {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }

  .hero-meta {
    font-size: 0.85rem;
    gap: 0.8rem;
  }

  .section-container {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
  }

  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-content {
    max-height: 90vh;
  }

  .modal-close-btn {
    width: 2.5rem;
    height: 2.5rem;
    top: 1rem;
    right: 1rem;
  }

  .details-backdrop {
    height: 220px;
  }

  .details-body {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .details-title {
    font-size: 1.75rem;
  }

  .torrents-modal-content {
    padding: 1.5rem;
  }

  .toast-alert {
    left: 50%;
    right: auto;
    transform: translate(-50%, 150%);
    width: calc(100% - 2rem);
    max-width: 400px;
    justify-content: center;
  }

  .toast-alert.show {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 600px) {
  .filter-bar {
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  .filter-group {
    flex: 1;
    min-width: 120px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .filter-select {
    width: 100%;
  }

  .torrent-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  .torrent-actions-row {
    flex-wrap: wrap;
    width: 100%;
    gap: 0.5rem;
  }
  .torrent-btn {
    flex: 1;
    justify-content: center;
  }
  .torrent-btn-primary {
    flex: 2;
    min-width: 120px;
    justify-content: center;
  }

  .details-info-col .hero-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  .details-info-col .hero-buttons .btn {
    width: 100%;
  }

  .download-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  .player-controls-overlay {
    padding: 1.5rem 1rem 1rem;
  }
  .player-actions-row {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  .player-left-actions, .player-right-actions {
    width: 100%;
    justify-content: space-around;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.4rem;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  .hero {
    height: 60vh;
    padding: 7rem 4% 1.5rem;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-overview {
    display: none;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  .media-card {
    flex: 0 0 135px;
  }
  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
  }
  .episode-card {
    grid-template-columns: 80px 1fr auto;
    gap: 0.6rem;
    padding: 0.5rem;
  }
  .episode-still {
    width: 80px;
  }
  .episode-name {
    font-size: 0.8rem;
  }
  .episode-desc {
    display: none;
  }
}



