/*
Theme Name: Warez Lite
Version: 1.1.47
Author: DevCreativos
Author URI: https://devcreativos.com/
License: GPLv2 or later
Requires at least: 6.2
Requires PHP: 7.4
*/
:root {
  color-scheme: light;

  /* =========================================
     PALETTE: MODERN (Default) - Clean Blue/Zinc
     ========================================= */
  --palette-modern-light-bg: #ffffff;
  --palette-modern-light-panel: #f4f4f5;
  /* Zinc-100 */
  --palette-modern-light-text: #18181b;
  /* Zinc-900 */
  --palette-modern-light-muted: #71717a;
  /* Zinc-500 */
  --palette-modern-light-border: #e4e4e7;
  /* Zinc-200 */
  --palette-modern-light-accent: #2563eb;
  /* Blue-600 */
  --palette-modern-light-accent-bright: #3b82f6;
  /* Blue-500 */

  --palette-modern-dark-bg: #09090b;
  /* Zinc-950 */
  --palette-modern-dark-panel: #18181b;
  /* Zinc-900 */
  --palette-modern-dark-text: #f4f4f5;
  /* Zinc-100 */
  --palette-modern-dark-muted: #a1a1aa;
  /* Zinc-400 */
  --palette-modern-dark-border: #27272a;
  /* Zinc-800 */
  --palette-modern-dark-accent: #3b82f6;
  /* Blue-500 */
  --palette-modern-dark-accent-bright: #60a5fa;
  /* Blue-400 */

  /* =========================================
     PALETTE: CINEMA - Netflix Red / Deep Black
     ========================================= */
  --palette-cinema-light-bg: #ffffff;
  --palette-cinema-light-panel: #f9f9f9;
  --palette-cinema-light-text: #111111;
  --palette-cinema-light-muted: #666666;
  --palette-cinema-light-border: #e5e5e5;
  --palette-cinema-light-accent: #e50914;
  --palette-cinema-light-accent-bright: #f40612;

  --palette-cinema-dark-bg: #000000;
  --palette-cinema-dark-panel: #141414;
  --palette-cinema-dark-text: #ffffff;
  --palette-cinema-dark-muted: #808080;
  --palette-cinema-dark-border: #333333;
  --palette-cinema-dark-accent: #e50914;
  --palette-cinema-dark-accent-bright: #ff1f1f;

  /* =========================================
     PALETTE: FOREST - Nature Green / Slate
     ========================================= */
  --palette-forest-light-bg: #f8fafc;
  /* Slate-50 */
  --palette-forest-light-panel: #ffffff;
  --palette-forest-light-text: #0f172a;
  /* Slate-900 */
  --palette-forest-light-muted: #64748b;
  /* Slate-500 */
  --palette-forest-light-border: #e2e8f0;
  /* Slate-200 */
  --palette-forest-light-accent: #059669;
  /* Emerald-600 */
  --palette-forest-light-accent-bright: #10b981;
  /* Emerald-500 */

  --palette-forest-dark-bg: #020617;
  /* Slate-950 */
  --palette-forest-dark-panel: #0f172a;
  /* Slate-900 */
  --palette-forest-dark-text: #f1f5f9;
  /* Slate-100 */
  --palette-forest-dark-muted: #94a3b8;
  /* Slate-400 */
  --palette-forest-dark-border: #1e293b;
  /* Slate-800 */
  --palette-forest-dark-accent: #10b981;
  /* Emerald-500 */
  --palette-forest-dark-accent-bright: #34d399;
  /* Emerald-400 */

  /* =========================================
     PALETTE: ROYAL - Purple / Midnight
     ========================================= */
  --palette-royal-light-bg: #ffffff;
  --palette-royal-light-panel: #faf5ff;
  /* Purple-50 */
  --palette-royal-light-text: #3b0764;
  /* Purple-950 */
  --palette-royal-light-muted: #9333ea;
  /* Purple-600 */
  --palette-royal-light-border: #e9d5ff;
  /* Purple-200 */
  --palette-royal-light-accent: #7e22ce;
  /* Purple-700 */
  --palette-royal-light-accent-bright: #a855f7;
  /* Purple-500 */

  --palette-royal-dark-bg: #0b0a14;
  --palette-royal-dark-panel: #181621;
  --palette-royal-dark-text: #e9d5ff;
  /* Purple-100 */
  --palette-royal-dark-muted: #a855f7;
  /* Purple-500 */
  --palette-royal-dark-border: #2d2640;
  --palette-royal-dark-accent: #d8b4fe;
  /* Purple-300 */
  --palette-royal-dark-accent-bright: #e9d5ff;
  /* Purple-200 */

  /* =========================================
     DEFAULT MAPPINGS (Light Mode is Default)
     ========================================= */
  --bg: var(--palette-modern-light-bg);
  --panel: var(--palette-modern-light-panel);
  --text: var(--palette-modern-light-text);
  --muted: var(--palette-modern-light-muted);
  --border: var(--palette-modern-light-border);
  --accent: var(--palette-modern-light-accent);
  --accent-bright: var(--palette-modern-light-accent-bright);

  --nav-bg: var(--panel);
  --nav-text: var(--text);


  /* =========================================
   TV Show Hero & Season Styles (Moved from Inline)
   ========================================= */

  /* Hero Section */
  .movie-header {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    background: var(--panel);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .movie-poster-card {
    position: relative;
    width: 240px;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background: #000;
  }

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

  .movie-card-category {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--accent);
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.35rem 1rem;
    border-radius: 0 8px 0 0;
    font-weight: 700;
    z-index: 2;
  }

  .movie-card-views {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
  }

  @media (max-width: 768px) {
    .movie-header {
      grid-template-columns: 1fr;
    }

    .movie-poster-card {
      width: 200px;
      height: 280px;
      margin: 0 auto;
    }
  }

  /* Gallery Grid */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    height: 160px;
    background: #000;
  }

  .gallery-item:hover {
    transform: scale(1.03);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.2s;
  }

  .gallery-item:hover img {
    opacity: 1;
  }

  @media (max-width: 600px) {
    .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
      height: 120px;
    }
  }

  /* Modern Season Grid (Warez Scoped) */
  .warez-season-block {
    margin-bottom: 1.5rem;
  }

  .warez-season-header {
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    color: var(--text-main);
  }

  .warez-season-header:hover {
    background: var(--panel);
  }

  .warez-season-header.active {
    background: var(--panel);
    border-color: var(--accent);
  }

  /* Ensure title color is always visible */
  .warez-season-header .season-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
  }

  .warez-season-header.active .season-title {
    color: var(--accent);
  }

  .warez-episode-count {
    font-size: 0.8rem;
    color: var(--muted);
  }

  .warez-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding-top: 1rem;
  }

  .warez-ep-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    position: relative;
    cursor: pointer;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .warez-ep-card:hover {
    transform: translateY(-4px);
  }

  .warez-ep-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
    flex-shrink: 0;
  }

  .warez-ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .warez-ep-card:hover .warez-ep-thumb img {
    opacity: 0.8;
  }

  /* Play Overlay */
  .warez-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
  }

  .warez-ep-card:hover .warez-play-overlay {
    opacity: 1;
  }

  .warez-ep-info h4 {
    font-size: 0.85rem;
    /* Slightly smaller for better fit */
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
    text-align: left;
    /* User request: Align left */

    /* Truncate to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    height: 2.6em;
    /* Fixed height for consistency (1.3 * 2) */
  }

  .warez-ep-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .warez-badge {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
    background: #1f2937;
  }

  .warez-badge-s {
    background: #ef4444;
    color: #fff;
    padding: 2px 6px;
  }

  .warez-badge-e {
    padding: 2px 6px;
    color: #d1d5db;
  }

  .warez-duration {
    color: var(--muted);
  }

  /* Dark Mode Glass (Default) */
  --glass-bg: rgba(0, 0, 0, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(255, 255, 255, 0.08);
  --hover-bg: rgba(255, 255, 255, 0.1);

  /* Layout */
  --layout-width: 1120px;
  --card-height: 396px;

  color-scheme: dark;
}

/* =========================================
   LIGHT MODE OVERRIDES (.light-mode class)
   ========================================= */
body.light-mode {
  color-scheme: light;

  /* Light Mode Glass */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  --input-bg: rgba(0, 0, 0, 0.05);
  --hover-bg: rgba(0, 0, 0, 0.05);
}

/* =========================================
   PALETTE OVERRIDES (Applied via body classes)
   ========================================= */

/* CINEMA */
/* CINEMA */
body.palette-cinema {
  --bg: var(--palette-cinema-dark-bg);
  --panel: var(--palette-cinema-dark-panel);
  --text: var(--palette-cinema-dark-text);
  --muted: var(--palette-cinema-dark-muted);
  --border: var(--palette-cinema-dark-border);
  --accent: var(--palette-cinema-dark-accent);
  --accent-bright: var(--palette-cinema-dark-accent-bright);
}

body.light-mode.palette-cinema {
  --bg: var(--palette-cinema-light-bg);
  --panel: var(--palette-cinema-light-panel);
  --text: var(--palette-cinema-light-text);
  --muted: var(--palette-cinema-light-muted);
  --border: var(--palette-cinema-light-border);
  --accent: var(--palette-cinema-light-accent);
  --accent-bright: var(--palette-cinema-light-accent-bright);
}

/* FOREST */
/* FOREST */
body.palette-forest {
  --bg: var(--palette-forest-dark-bg);
  --panel: var(--palette-forest-dark-panel);
  --text: var(--palette-forest-dark-text);
  --muted: var(--palette-forest-dark-muted);
  --border: var(--palette-forest-dark-border);
  --accent: var(--palette-forest-dark-accent);
  --accent-bright: var(--palette-forest-dark-accent-bright);
}

body.light-mode.palette-forest {
  --bg: var(--palette-forest-light-bg);
  --panel: var(--palette-forest-light-panel);
  --text: var(--palette-forest-light-text);
  --muted: var(--palette-forest-light-muted);
  --border: var(--palette-forest-light-border);
  --accent: var(--palette-forest-light-accent);
  --accent-bright: var(--palette-forest-light-accent-bright);
}

/* ROYAL */
/* ROYAL */
body.palette-royal {
  --bg: var(--palette-royal-dark-bg);
  --panel: var(--palette-royal-dark-panel);
  --text: var(--palette-royal-dark-text);
  --muted: var(--palette-royal-dark-muted);
  --border: var(--palette-royal-dark-border);
  --accent: var(--palette-royal-dark-accent);
  --accent-bright: var(--palette-royal-dark-accent-bright);
}

body.light-mode.palette-royal {
  --bg: var(--palette-royal-light-bg);
  --panel: var(--palette-royal-light-panel);
  --text: var(--palette-royal-light-text);
  --muted: var(--palette-royal-light-muted);
  --border: var(--palette-royal-light-border);
  --accent: var(--palette-royal-light-accent);
  --accent-bright: var(--palette-royal-light-accent-bright);
}

.warez-lite-entry-template {
  width: 100%;
  max-width: var(--layout-width);
  margin: 2rem auto 1rem;
  background: var(--panel);
  padding: 1.5rem;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.warez-lite-entry-template .entry-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 2vw, 2.6rem);
  letter-spacing: 0.05em;
}

.warez-lite-entry-template .entry-content {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.warez-lite-ad-slot {
  max-width: var(--layout-width);
  margin: 0.75rem auto;
  padding: 1rem;
  background: var(--glass-bg);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
  .warez-lite-ad-slot {
    width: calc(100% - 2rem);
    margin: 1rem auto;
    padding: 0.9rem;
  }
}

.warez-lite-ad-slot.warez_lite_ad_html_header {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
}

.warez-lite-home-ad {
  margin-bottom: 0.5rem;
}

.warez-lite-home-ad .warez-lite-ad-slot {
  border-radius: 16px;
  padding: 1.2rem;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  z-index: 99;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: top 0.2s ease;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.skip-link:focus {
  top: 1rem;
}

.menu a:focus-visible,
.nav-tool:focus-visible,
.nav-mobile-toggle:focus-visible,
.action-btn:focus-visible,
.nav-search-modal button:focus-visible,
.nav-search-modal input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  padding: 0 0 4rem;
}

.layout-shell {
  width: 100%;
  max-width: var(--layout-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .layout-shell {
    padding: 0 1rem;
  }
}

@media (max-width: 600px) {
  .layout-shell {
    padding: 0 0.75rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.footer {
  padding: 1.5rem;
  background: #080c11;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-tool svg {
  vertical-align: middle;
}

/* Default (Dark Mode) -> Show Sun to switch to Light */
.icon-sun {
  display: inline-block;
}

.icon-moon {
  display: none;
}

/* Light Mode -> Show Moon to switch to Dark */
body.light-mode .icon-sun {
  display: none;
}

body.light-mode .icon-moon {
  display: inline-block;
}

/* --- Global Action Buttons & Modals --- */
.movie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 240px;
  /* Default width match */
}

@media (max-width: 768px) {
  .movie-actions {
    width: 100%;
    max-width: 240px;
    margin: 1rem auto;
  }
}

.movie-actions .action-btn {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}

.movie-actions .action-btn svg {
  width: 18px;
  height: 18px;
}

.movie-actions .action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
  filter: brightness(1.2);
}

.btn-report,
.btn-telegram {
  flex: 0 0 calc(50% - 0.25rem);
}

.btn-report {
  background: #dc2626;
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.btn-telegram {
  background: #0288d1;
  box-shadow: 0 4px 6px rgba(2, 136, 209, 0.2);
}

.btn-trailer {
  flex: 0 0 100%;
  background: #0ea5e9;
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.2);
}

/* Modals */
.trailer-modal {
  display: none;
  position: fixed;
  z-index: 100000;
  /* High Z-index */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background-color: #000;
  margin: auto;
  padding: 0;
  border: 1px solid #333;
  width: 80%;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: #f1f1f1;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Global Post Header & Card --- */
.movie-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  background: var(--panel);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.movie-poster-card {
  position: relative;
  width: 240px;
  height: 350px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.movie-card-category {
  position: absolute;
  bottom: 0;
  left: 0;
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 0 8px 0 0;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  z-index: 2;
}

.movie-card-views {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  backdrop-filter: blur(2px);
}

.card__views {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(2px);
  line-height: 1;
}

.card__views svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 768px) {
  .movie-header {
    grid-template-columns: 1fr;
  }

  .movie-poster-card {
    margin: 0 auto;
    width: 220px;
    height: 320px;
  }

  /* --- Comments Section Styles --- */
  .comments-section {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .comment-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
}

/* --- Download Table --- */
.warez-download-table {
  width: 100%;
  border-collapse: collapse;
}

.warez-download-table th {
  padding: 15px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

.warez-download-table td {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text);
  vertical-align: middle;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s;
}

.btn-download:hover {
  filter: brightness(1.2);
}

.movie-poster {
  display: flex;
  flex-direction: column;
  width: 240px;
  /* Match grid column width explicitly */
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .movie-poster {
    width: 100%;
    align-items: center;
  }
}

/* Scoped Colors to ensure higher specificity */
.movie-actions .btn-report {
  background: #dc2626 !important;
}

.movie-actions .btn-telegram {
  background: #0288d1 !important;
}

.movie-actions .btn-trailer {
  background: #0ea5e9 !important;
}

/* --- Global Download Buttons (User Request) --- */
.global-download-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
  justify-content: center;
  /* Centering buttons */
}

.btn-warez-global {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
  border-radius: 50px;
  /* Pillow shape for that 'game button' look */
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 4px solid rgba(0, 0, 0, 0.2);
  /* 3D effect base */
}

.btn-warez-global:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-warez-global:active {
  transform: translateY(2px);
  border-bottom-width: 0;
  margin-top: 4px;
  /* Simulates press */
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2);
}

.btn-warez-global svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Green Button (Free) - Matches User Image */
.btn-warez-green {
  background: #84cc16;
  /* Fallback */
  background: linear-gradient(180deg, #a3e635 0%, #65a30d 100%);
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border-bottom-color: #3f6212;
  /* Darker green for 3D part */
}

/* Premium Button (Gold/Yellow) - Complementary */
.btn-warez-premium {
  background: #f59e0b;
  /* Fallback */
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border-bottom-color: #92400e;
  /* Darker orange for 3D part */
}

/* Security Badge */
.warez-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Centering badge content */
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -10px;
  /* Pull closer to buttons */
  margin-bottom: 25px;
  opacity: 0.8;
  width: 100%;
  /* Ensure it takes full width to center effectively */
}

.warez-security-badge svg {
  color: #22c55e;
  /* Trust Green */
}

.warez-security-badge strong {
  color: #3b82f6;
  /* VirusTotal Blue-ish */
}

/* --- Comments Section Styles (Restored) --- */
.comment-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Strict White Text for Tabs */
.server-tab-overlay {
  background: rgba(40, 40, 40, 0.8) !important;
  /* Darker gray background */
  color: #ffffff !important;
  /* Pure white text */
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.server-tab-overlay:hover {
  background: rgba(60, 60, 60, 0.9) !important;
  border-color: #fff !important;
}

.server-tab-overlay.active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* Ensure sub-text is also readable */
.server-tab-overlay .srv-lang-text {
  color: #fff !important;
}

.server-tab-overlay .srv-opt-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Nav Arrows Hover */
.prev-ep-arrow:hover,
.next-ep-arrow:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.4);
}

.comment-list li.comment {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  transition: border-color 0.2s;
}

.comment-list li.comment:hover {
  border-color: var(--accent);
}

.comment-body {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.comment-author.vcard {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  color: var(--text);
}

.comment-author img.avatar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
}

.comment-metadata {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.comment-metadata a {
  color: inherit;
  text-decoration: none;
}

.comment-content p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--text-muted, #9ca3af);
}

.reply {
  width: 100%;
  text-align: right;
}

.comment-reply-link {
  display: inline-block;
  padding: 5px 15px;
  background: var(--bg-dark, #111827);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.comment-reply-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Threaded Comments */
.comment-list .children {
  list-style: none;
  padding-left: 20px;
  margin-top: 20px;
  border-left: 2px solid var(--border);
}

@media (max-width: 600px) {
  .comment-list .children {
    padding-left: 10px;
  }
}

/* Comment Form Styles + Gap Fix */
.comment-respond {
  margin-top: 20px;
  /* Reduced from 40px to fix empty gap */
  background: var(--bg);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.comments-section .comment-respond {
  margin-top: 0;
  /* Even tighter if inside our section wrapper */
  border: none;
  /* seamless look inside the panel */
  background: transparent;
  padding: 0;
}

.comment-reply-title {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
  margin-top: 0 !important;
  /* Force no top margin */
}

.comment-form p {
  margin-bottom: 15px;
}

.comment-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 37, 99, 235), 0.1);
}

.btn-submit-comment {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: filter 0.2s;
}

.btn-submit-comment:hover {
  filter: brightness(1.1);
}

.comments-area {
  margin: 0 !important;
  padding: 0 !important;
}

.comments-section .section-title {
  margin-bottom: 1rem !important;
  /* Reduce default gap */
}

/* =========================================
   SINGLE TV SHOW STYLES (Moved from template)
   ========================================= */

/* Fixed Icons & Layout */
.movie-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  background: var(--panel);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.movie-poster-card {
  position: relative;
  width: 240px;
  height: 350px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: #000;
}

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

.movie-card-category {
  position: absolute;
  bottom: 0;
  left: 0;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 0.35rem 1rem;
  border-radius: 0 8px 0 0;
  font-weight: 700;
  z-index: 2;
}

.movie-card-views {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

@media (max-width: 768px) {
  .movie-header {
    grid-template-columns: 1fr;
  }

  .movie-poster-card {
    width: 200px;
    height: 280px;
    margin: 0 auto;
  }
}

/* Series Specific */
.series-seasons {
  background: var(--panel);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.season-block {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  /* Fixed Context */
}

.season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--panel);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}

.season-header:hover {
  background: var(--accent-hover, rgba(0, 0, 0, 0.05));
}

.season-header.active {
  background: var(--accent);
  color: white;
  border-bottom: 1px solid transparent;
}

.season-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.episodes-list {
  display: none;
  padding: 1.5rem;
  background: var(--bg);
}

.episodes-list.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  /* Force 140px compact grid */
  gap: 15px;
}

/* Episode Card High Contrast */
.episode-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (prefers-color-scheme: dark) {
  .episode-card {
    background: #1f2937;
    border-color: #374151;
  }
}

[data-theme='dark'] .episode-card {
  background: #1f2937;
  border-color: #374151;
}

.episode-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.episode-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.episode-info h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
}

.episode-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================================
   TRAILER MODAL & BACK TO TOP
   ========================================= */

/* Trailer Modal (Enhanced) */
.trailer-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.trailer-modal[style*="display: flex"] {
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: #000;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 960px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trailer-modal[style*="display: flex"] .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-modal:hover {
  color: #fff;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  background: var(--text-main);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#backToTop svg {
  width: 24px;
  height: 24px;
}