/*
Theme Name: SpectraBox Main
Description: Entertainment website theme for movies and series (Main Site)
Version: 3.0
Author: MR GUSU
*/

@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

:root {
  --primary-color: #ff6b35;
  --secondary-color: #7c3aed;
  --bg-light: #ffffff;
  --bg-dark: #1a1a1a;
  --text-light: #333333;
  --text-dark: #ffffff;
  --card-bg-light: #f8f9fa;
  --card-bg-dark: #2d2d2d;
}

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

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Layout with Sidebar for Ads */
.site-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  padding: 0 1rem;
}

.main-content-wrapper {
  flex: 1;
  max-width: 1000px;
}

.sidebar {
  width: 180px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-left {
  order: -1;
}

.sidebar-right {
  order: 1;
}

/* Ad Containers */
.ad-container {
  margin-bottom: 2rem;
  text-align: center;
}

.ad-container.banner-160x600,
.ad-container.banner-160x300 {
  width: 160px;
  margin: 0 auto 2rem;
}

.ad-container.banner-300x250 {
  width: 300px;
  margin: 0 auto 2rem;
}

.ad-container.banner-728x90 {
  width: 100%;
  max-width: 728px;
  margin: 0 auto 2rem;
}

.ad-container.banner-468x60 {
  width: 100%;
  max-width: 468px;
  margin: 0 auto 2rem;
}

.ad-container.banner-320x50 {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 2rem;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  height: 50px;
}

.logo-section {
  width: 150px;
  flex-shrink: 0;
}

.logo-section a {
  display: block;
}

.logo {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.custom-logo {
  height: 30px !important;
  width: auto !important;
  max-width: 140px !important;
}

.desktop-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 1rem;
}

.main-nav {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
}

.main-nav li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.header-controls {
  width: 120px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.85rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.search-modal.active {
  display: flex;
}

.search-container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
}

.search-container h3 {
  margin-bottom: 1rem;
  color: #333;
}

.search-container input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.search-container button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 1rem;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-light);
  transition: right 0.3s ease;
  z-index: 1500;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.dark-mode .mobile-menu {
  background: var(--bg-dark);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1400;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.dark-mode .mobile-menu-close {
  color: var(--text-dark);
}

.mobile-nav {
  list-style: none;
  margin-top: 3rem;
}

.mobile-nav li {
  margin-bottom: 1rem;
}

.mobile-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.1rem;
  display: block;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
}

.dark-mode .mobile-nav a {
  color: var(--text-dark);
  border-bottom-color: #444;
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

/* Category Header */
.category-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.category-header p {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Content Grid - Fixed for proper poster display and single card sizing */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  justify-content: center;
}

/* Single item grid fix */
.content-grid:has(.movie-card:only-child) {
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  justify-content: center;
}

.movie-card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  max-width: 300px;
  margin: 0 auto;
}

.light-mode .movie-card {
  background: var(--card-bg-light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark-mode .movie-card {
  background: var(--card-bg-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Fixed poster display - no cropping */
.movie-poster {
  width: 100%;
  height: 375px;
  object-fit: cover;
  object-position: center top;
}

.movie-info {
  padding: 1rem;
}

.movie-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Fixed tags display - show all tags */
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.movie-category {
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 15px;
  font-size: 0.75rem;
  display: inline-block;
  white-space: nowrap;
}

.movie-category:nth-child(2) {
  background: var(--secondary-color);
}

.movie-category:nth-child(3) {
  background: #10b981;
}

.movie-category:nth-child(4) {
  background: #f59e0b;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.8rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s;
}

.dark-mode .pagination a,
.dark-mode .pagination span {
  color: var(--text-dark);
  border-color: #555;
}

.pagination a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Post Template Styles */
.post-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.post-header {
  text-align: center;
  margin-bottom: 2rem;
}

.post-tags {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.post-tag {
  background: var(--secondary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  display: inline-block;
  font-size: 0.8rem;
}

.post-tag:nth-child(2) {
  background: var(--primary-color);
}

.post-tag:nth-child(3) {
  background: #10b981;
}

.post-tag:nth-child(4) {
  background: #f59e0b;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.post-poster {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.storyline {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.trailer-section {
  margin-bottom: 3rem;
}

.trailer-video {
  width: 100%;
  height: 400px;
  border-radius: 10px;
}

/* Download Sections */
.download-section {
  margin-bottom: 2rem;
}

.quality-section {
  margin-bottom: 2rem;
  border-radius: 10px;
  overflow: hidden;
}

.light-mode .quality-section {
  background: var(--card-bg-light);
  border: 1px solid #e0e0e0;
}

.dark-mode .quality-section {
  background: var(--card-bg-dark);
  border: 1px solid #404040;
}

.quality-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.download-buttons {
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-btn {
  background: var(--secondary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
  display: inline-block;
  text-align: center;
}

.download-btn:hover {
  background: #6d28d9;
}

.download-btn .file-size {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

/* Series Specific */
.season-section {
  margin-bottom: 3rem;
}

.season-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 10px 10px 0 0;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
}

.episode-btn {
  background: #6b7280;
  color: white;
  padding: 0.8rem 0.5rem;
  border: none;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
  text-decoration: none;
  display: block;
  text-align: center;
}

.episode-btn:hover {
  background: #4b5563;
}

.episode-btn .file-size {
  display: block;
  font-size: 0.7rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

.zip-download {
  margin-top: 1rem;
  text-align: center;
}

/* Comments Section */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #eee;
}

.dark-mode .comments-section {
  border-top-color: #444;
}

.comment-form {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
}

.light-mode .comment-form {
  background: var(--card-bg-light);
}

.dark-mode .comment-form {
  background: var(--card-bg-dark);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
}

.dark-mode .comment-form input,
.dark-mode .comment-form textarea {
  background: #333;
  border-color: #555;
  color: white;
}

.comment-submit {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.comments-list {
  margin-top: 2rem;
}

.comment-item {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.light-mode .comment-item {
  background: var(--card-bg-light);
}

.dark-mode .comment-item {
  background: var(--card-bg-dark);
}

.comment-author {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.comment-date {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

/* Disclaimer */
.disclaimer {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 3rem 0;
  font-weight: 500;
}

.dark-mode .disclaimer {
  background: #451a03;
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Footer */
.footer {
  background: #1f2937;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .site-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    order: 2;
  }

  .sidebar-left,
  .sidebar-right {
    order: 2;
  }

  .main-content-wrapper {
    order: 1;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
    height: 55px;
  }

  .desktop-nav {
    display: none;
  }

  .logo-section {
    width: auto;
  }

  .logo {
    height: 35px;
    max-width: 150px;
  }

  .header-controls {
    width: auto;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .trailer-video {
    height: 250px;
  }

  .episodes-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .site-wrapper {
    padding: 0 0.5rem;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .hamburger-btn {
    display: flex !important;
  }
}

@media (max-width: 992px) {
  .main-nav {
    gap: 0.8rem;
  }

  .main-nav li a {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    height: 40px;
  }

  .logo {
    height: 22px;
    max-width: 100px;
  }

  .header-btn {
    width: 26px;
    height: 26px;
  }
}
