/* Falafilm Website Style */
:root {
  --primary-color: #0a0c1a;
  --secondary-color: #1a1410;
  --accent-color: #00fff9;
  --accent-color-dark: #ff0550;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --bg-light: #f0f0f0;
  --bg-dark: #0a0c1a;
  --border-color: #333;
  --border-color-glass: rgba(255, 255, 255, 0.1);
  --rating-good: #4caf50;
  --rating-medium: #ff9800;
  --rating-bad: #f44336;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  direction: rtl;
  overflow-x: hidden;
  transition: var(--transition);
}

.light-theme {
  --bg-dark: var(--bg-light);
  --text-primary: #333;
  --text-secondary: #666;
  --border-color: #ddd;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 12, 26, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color-glass);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(0, 255, 249, 0.1);
  color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  max-width: 300px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  padding: 0.25rem;
  font-size: 1rem;
}

.search-box button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Hero Slider */
.hero-slider {
  height: 60vh;
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.slider-item {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease;
}

.slider-content {
  background: rgba(10, 12, 26, 0.8);
  padding: 2rem;
  border-radius: 10px;
  max-width: 600px;
  text-align: center;
  margin: 0 2rem;
}

.slider-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.slider-description {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.slider-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

/* Main Content */
.main-content {
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  margin: 2rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-more {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.content-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow);
}

.content-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.poster-image-container {
  position: relative;
  width: 100%;
  padding-top: 150%; /* Aspect ratio for posters */
}

.poster-image-container img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-type-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 2;
}

.poster-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.imdb-rating {
  background: var(--primary-color);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  overflow: hidden;
}

.imdb-rating::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--rating-color, var(--rating-bad));
  z-index: -1;
  transition: width 0.5s ease;
}

.release-year {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.content-info {
  padding: 1rem;
}

.content-info h3 {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Detail Page */
.content-detail {
  max-width: 1200px;
  margin: 90px auto 3rem;
  padding: 0 2rem;
}

.detail-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.detail-backdrop {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.detail-poster {
  width: 300px;
  height: 450px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.detail-info {
  flex: 1;
  padding-right: 2rem;
}

.detail-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.meta-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.meta-info span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.genres {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.genres span {
  background: rgba(0, 255, 249, 0.1);
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.download-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.quality-link-container {
  margin-top: 1.5rem;
}

.quality-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.quality-link-label {
  font-weight: 500;
}

.quality-link-size {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.quality-link-actions {
  display: flex;
  gap: 1rem;
}

.quality-link-actions a {
  color: var(--accent-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.quality-link-actions a:hover {
  text-decoration: underline;
}

/* Accordion for Seasons */
.accordion-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-header {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header span {
  font-weight: 500;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 1rem;
  display: none;
  background: rgba(0, 0, 0, 0.2);
}

.accordion-panel.show {
  display: block;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.5);
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color-glass);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .detail-poster {
    width: 200px;
    height: 300px;
  }
  
  .detail-info {
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.8rem 1rem;
  }
  
  .nav-menu {
    gap: 0.8rem;
  }
  
  .hero-slider {
    height: 50vh;
    margin-top: 60px;
  }
  
  .slider-title {
    font-size: 1.8rem;
  }
  
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  .main-content {
    padding: 2rem 1rem;
  }
}

@media (max-width: 576px) {
  .nav-menu {
    display: none;
  }
  
  .slider-content {
    padding: 1rem;
  }
  
  .slider-title {
    font-size: 1.5rem;
  }
  
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-poster {
    width: 150px;
    height: 225px;
  }
  
  .detail-title {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.2rem;
  }
}

/* Custom message box */
.custom-message-box {
  position: fixed;
  bottom: 6rem;
  right: 50%;
  transform: translateX(50%);
  background-color: rgba(10, 12, 26, 0.9);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  z-index: 9999;
  font-family: 'Vazir', sans-serif;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color-glass);
  backdrop-filter: blur(5px);
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}

/* Loading spinner */
.loader-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s linear infinite;
  margin: auto;
}

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