:root {
  /* Dark theme variables - Updated to use black */
  --background: #000000;
  --foreground: #f1f5f9;
  --primary: #8b5cf6;
  --primary-foreground: #ffffff;
  --secondary: #1a1a1a;
  --secondary-foreground: #f1f5f9;
  --muted: #262626;
  --muted-foreground: #94a3b8;
  --accent: #262626;
  --accent-foreground: #f1f5f9;
  --border: #404040;
  --input: #404040;
  --card: #1a1a1a;
  --card-foreground: #f1f5f9;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-hover: rgba(0, 0, 0, 0.6);
  --content-background: #000000;
  --dialog-background: #1a1a1a;
  --dialog-text: #f1f5f9;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --radius: 0.5rem;
}

.light-theme {
  /* Light theme variables - Enhanced for better contrast */
  --background: #ffffff;
  --foreground: #1a1a1a;
  --primary: #7c3aed;
  --primary-foreground: #ffffff;
  --secondary: #f8fafc;
  --secondary-foreground: #334155;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #334155;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --content-background: #ffffff;
  --dialog-background: #ffffff;
  --dialog-text: #1e293b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
}

/* Smooth theme transitions */
*,
*::before,
*::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Prevent flash during theme switch */
html {
  background-color: var(--background);
  transition: background-color 0.3s ease;
}

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

html {
  font-size: 16px;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--primary);
  opacity: 0.8;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary:hover {
  opacity: 0.9;
  color: var(--primary-foreground);
}

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

.btn-outline:hover {
  background-color: var(--muted);
  color: var(--foreground);
  border-color: var(--border);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--foreground);
  background-color: transparent;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-icon:hover {
  background-color: var(--muted);
  color: var(--primary);
  border-color: var(--border);
}

.btn-icon i {
  color: inherit;
  font-size: 1rem;
}

/* Mobile-specific share button improvements */
.share-button-mobile {
  display: none;
}

@media (max-width: 767px) {
  .btn-icon.share-button {
    display: none;
  }

  .share-button-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
    min-height: 44px;
    white-space: nowrap;
  }

  .share-button-mobile:hover {
    background-color: var(--muted);
    color: var(--foreground);
    border-color: var(--border);
  }

  .share-button-mobile i {
    font-size: 1rem;
    color: inherit;
  }

  .header-right {
    gap: 0.5rem;
    flex-shrink: 0;
    flex: 1;
    min-width: 0;
  }

  .search-container {
    display: block !important;
    min-width: 80px;
    max-width: 150px;
    flex: 1;
    position: relative;
  }

  .search-input {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem 0.4rem 2rem;
  }

  .search-icon {
    left: 0.5rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 480px) {
  .search-container {
    min-width: 140px;
    max-width: 220px;
    flex: 1;
  }

  .search-input {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  }

  .search-icon {
    left: 0.75rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 640px) {
  .search-container {
    min-width: 160px;
    max-width: 240px;
    flex: 1;
  }
}

@media (min-width: 768px) {
  .search-container {
    min-width: 200px;
    max-width: 320px;
    flex: 1;
    margin-right: 1.5rem;
  }
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

/* Series Hero Section */
.series-hero {
  position: relative;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  background-color: var(--background);
}

.series-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.series-cover {
  position: relative;
  width: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  align-self: center;
}

.series-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.series-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.series-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-align: center;
  color: var(--foreground);
}

.series-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.series-author {
  font-weight: 500;
  color: var(--foreground);
}

.series-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.25rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--foreground);
}

.stat-item i {
  color: var(--primary);
}

.stat-item span {
  font-weight: 600;
  font-size: 1rem;
  color: var(--foreground);
}

.stat-item small {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Enhanced Series Genres - Improved Layout */
.series-genres {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  max-width: 100%;
}

.genres-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  transition: all 0.3s ease;
}

.genre-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.genre-tag.genre-hidden {
  display: none;
  opacity: 0;
  transform: scale(0.8);
}

.genre-tag.genre-visible {
  display: inline-block;
  opacity: 1;
  transform: scale(1);
  animation: genreSlideIn 0.3s ease forwards;
}

@keyframes genreSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.genres-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  white-space: nowrap;
}

.genres-toggle-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.genres-toggle-btn:active {
  transform: translateY(0);
}

.show-more-text,
.show-less-text {
  transition: opacity 0.2s ease;
}

.series-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem; /* Increased margin to ensure proper spacing */
  align-items: center;
  min-height: 44px; /* Ensure minimum touch target height */
}

/* Mobile optimizations for genres */
@media (max-width: 479px) {
  .series-genres {
    margin: 0.75rem 0;
  }

  .genres-container {
    gap: 0.4rem;
  }

  .genre-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .genres-toggle-btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    margin-top: 0.5rem;
  }

  .series-actions {
    margin-top: 1.25rem;
    gap: 0.75rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .series-genres {
    margin: 0.75rem 0;
  }

  .series-actions {
    margin-top: 1rem;
    gap: 0.75rem;
  }
}

/* Desktop layout improvements */
@media (min-width: 640px) {
  .series-hero-content {
    align-items: flex-start;
  }

  .series-genres {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .genres-container {
    justify-content: flex-start;
  }

  .series-actions {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}

/* Improved genre tag hover effects */
.genre-tag:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px var(--shadow);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .genre-tag {
    border: 1px solid var(--border);
  }

  .genres-toggle-btn {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .genre-tag,
  .genres-toggle-btn,
  .genres-container {
    transition: none;
    animation: none;
  }

  .genre-tag:hover,
  .genres-toggle-btn:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .genres-toggle-btn {
    display: none;
  }

  .genre-tag.genre-hidden {
    display: inline-block;
    opacity: 1;
  }
}

.series-content {
  padding-bottom: 2rem;
  width: 100%;
  overflow-x: hidden;
}

.series-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

.series-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.btn-toggle {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-toggle:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.series-description {
  color: var(--foreground);
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.series-description.expanded {
  max-height: 1000px;
}

.series-description p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--foreground);
  line-height: 1.6;
  white-space: pre-wrap;
}

.series-description p:last-child {
  margin-bottom: 0;
}

/* Episodes Section */
.episodes-filter {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: all 0.2s ease;
}

.filter-btn.active {
  background-color: var(--secondary);
  color: var(--foreground);
  font-weight: 500;
}

.filter-btn:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
}

.episode-item {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, max-height 0.3s ease;
  border: 1px solid var(--border);
}

.episode-item.episode-hidden {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(20px);
}

.episode-item.episode-visible {
  display: block;
  opacity: 1;
  max-height: 200px;
  transform: translateY(0);
  animation: slideInUp 0.4s ease forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.episode-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.episode-link {
  display: flex;
  color: var(--card-foreground);
  padding: 0.75rem;
  width: 100%;
  text-decoration: none;
}

.episode-link:hover {
  color: var(--card-foreground);
}

.episode-details {
  flex: 1;
  min-width: 0;
}

.episode-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--card-foreground);
}

.episode-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.episode-date {
  font-weight: 500;
  color: var(--muted-foreground);
}

.episode-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.episode-stats span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted-foreground);
}

.episode-stats i {
  color: var(--primary);
}

.load-more-btn {
  margin-top: 1.25rem;
  align-self: center;
  width: 100%;
  max-width: 300px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.load-more-btn.loading i {
  animation: spin 1s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

.series-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.creator-card,
.similar-series,
.series-tags {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

.creator-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--card-foreground);
}

.creator-other-series h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--card-foreground);
}

.other-series-list {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.other-series-list::-webkit-scrollbar {
  height: 6px;
}

.other-series-list::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 3px;
}

.other-series-list::-webkit-scrollbar-thumb {
  background-color: var(--muted-foreground);
  border-radius: 3px;
}

.other-series-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 80px;
  flex-shrink: 0;
  text-align: center;
  text-decoration: none;
}

.other-series-item:hover {
  text-decoration: none;
}

.other-series-item img {
  border-radius: var(--radius);
  transition: transform 0.2s ease;
  width: 100%;
  height: auto;
}

.other-series-item:hover img {
  transform: scale(1.05);
}

.other-series-item span {
  font-size: 0.75rem;
  color: var(--card-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-series-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.similar-series-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.similar-series-item:hover {
  background-color: var(--secondary);
  text-decoration: none;
  color: inherit;
}

.similar-series-cover {
  width: 50px;
  height: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.similar-series-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-series-info {
  flex: 1;
  min-width: 0;
}

.similar-series-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--card-foreground);
}

.similar-series-info p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.similar-series-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #f59e0b;
  font-size: 0.75rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.tag:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
  text-decoration: none;
}

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

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--card);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px var(--shadow);
  animation: modalFadeIn 0.3s ease;
  border: 1px solid var(--border);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--card-foreground);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--card-foreground);
}

.modal-body {
  padding: 1.25rem;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: none;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.share-btn:hover {
  opacity: 0.9;
}

.share-btn.facebook {
  background-color: #1877f2;
}

.share-btn.twitter {
  background-color: #1da1f2;
}

.share-btn.whatsapp {
  background-color: #25d366;
}

.share-btn.telegram {
  background-color: #0088cc;
}

.share-link {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-link input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.share-link input:focus {
  outline: none;
  border-color: var(--primary);
}

.copy-link {
  white-space: nowrap;
}

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

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Touch states for mobile */

/* Media Queries */
@media (min-width: 480px) {
  .series-actions {
    gap: 0.75rem;
  }

  .episode-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .share-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 640px) {
  .header-left {
    gap: 1.5rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .series-hero-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .series-cover {
    width: 220px;
    align-self: flex-start;
  }

  .series-title {
    text-align: left;
    font-size: 2rem;
  }

  .series-meta {
    align-items: flex-start;
  }

  .series-stats {
    justify-content: flex-start;
  }

  .series-genres {
    justify-content: flex-start;
  }

  .series-actions {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .episode-title {
    font-size: 1.125rem;
  }

  .similar-series-cover {
    width: 60px;
    height: 80px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .header-right {
    gap: 1rem;
  }

  .main-nav {
    display: block;
  }

  .main-nav ul {
    display: flex;
    gap: 1.5rem;
  }

  .search-container {
    display: block;
  }

  .auth-buttons {
    display: flex;
    gap: 0.5rem;
  }

  .mobile-menu-btn {
    display: none;
  }

  .series-title {
    font-size: 2.25rem;
  }

  .series-stats {
    gap: 1.5rem;
  }

  .stat-item span {
    font-size: 1.125rem;
  }

  .episode-link {
    padding: 1rem;
  }

  .series-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .series-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
    max-width: 100%;
    overflow: hidden;
  }

  .series-sidebar {
    position: sticky;
    top: 5rem;
    max-width: 100%;
  }

  .series-title {
    font-size: 2.5rem;
  }

  .series-cover {
    width: 250px;
  }

  .episode-link {
    padding: 1.25rem;
  }

  .creator-card,
  .similar-series,
  .series-tags {
    padding: 1.5rem;
  }

  .creator-name {
    font-size: 1.25rem;
  }

  .other-series-item {
    width: 100px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 2rem;
  }

  .series-hero {
    padding: 2.5rem 0;
  }

  .series-content {
    padding-bottom: 3rem;
  }

  .series-layout {
    gap: 3rem;
  }
}

/* Disqus Comments Styling */
#disqus_thread {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px var(--shadow);
  color: var(--card-foreground);
}

/* Disqus iframe responsive styling */
#disqus_thread iframe {
  max-width: 100% !important;
  border-radius: var(--radius);
}

/* Disqus loading state */
#disqus_thread:empty::before {
  content: "Yorumlar yükleniyor...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Disqus error state */
#disqus_thread:empty::after {
  content: "Yorumlar yüklenemedi. Lütfen sayfayı yenileyin.";
  display: none;
  text-align: center;
  padding: 1rem;
  color: #ef4444;
  font-size: 0.875rem;
}

/* Mobile optimization for Disqus */
@media (max-width: 767px) {
  #disqus_thread {
    margin-top: 1rem;
    padding: 1rem;
  }

  #disqus_thread iframe {
    min-height: 400px;
  }
}

/* Disqus theme integration */
#disqus_thread * {
  font-family: "Inter", sans-serif !important;
}

/* Form elements theming */
input,
textarea,
select {
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Ensure all interactive elements have proper theming */
button {
  transition: all 0.2s ease;
}

/* Fix any remaining hardcoded colors */
.search-highlight {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* Scrollbar theming */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary);
}

::-webkit-scrollbar-thumb {
  background-color: var(--muted-foreground);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--foreground);
}

/* Selection theming */
::selection {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

::-moz-selection {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Varsayılan olarak güneş simgesi göster (karanlık tema için) */
.light-icon {
  display: block;
}

.dark-icon {
  display: none;
}

/* Aydınlık temada ay simgesi göster */
.light-theme .light-icon {
  display: none;
}

.light-theme .dark-icon {
  display: block;
}

/* --- Mobil taşma düzeltmeleri başlangıç --- */
@media (max-width: 480px) {
  .container,
  .series-main,
  .series-sidebar,
  .series-layout {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .series-content {
    padding: 0 0.5rem;
  }

  .series-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  img,
  .series-cover,
  .similar-series-cover {
    max-width: 100%;
    height: auto;
  }

  .series-title,
  .episode-title,
  .creator-name,
  .other-series-item span {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .container {
    padding: 0 8px;
  }
  
  .series-sidebar {
    margin-top: 1rem;
  }
}

/* --- Mobil taşma düzeltmeleri bitiş --- */
