
/* CSS Variables for Crypto Theme */
:root {
  --primary-color: #00d4ff;
  --secondary-color: #16213e;
  --background-color: #0f0f23;
  --surface-color: #1a1a2e;
  --accent-color: #ff6b35;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --border-color: rgba(255, 255, 255, 0.1);
  --gradient-primary: #00d4ff, #0099cc;
  --gradient-secondary: #16213e, #0f0f23;
  --gradient-accent: #ff6b35, #ff4500;
  --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
  --shadow-neon: 0 0 30px rgba(0, 212, 255, 0.6);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  overflow: visible;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  width: 100%;
  position: relative;
}

/* Global nav bar (landing + app-wide pattern) */
.global-nav {
  width: 100%;
  padding: 14px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.global-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
}

.global-nav .logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.global-nav .logo {
  width: 180px;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
  transition: all 0.3s ease;
}

.global-nav .logo:hover {
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
  transform: scale(1.05);
}

.global-nav .top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 32px;
}

.global-nav .top-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.global-nav .top-nav-links a:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.06);
}

.global-nav .top-nav-links a.active {
  color: var(--primary-color);
  background: rgba(0, 212, 255, 0.12);
}

.global-nav .nav-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-nav .nav-auth .auth-user {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: 0;
}

.global-nav .nav-auth .auth-link-discord {
  padding: 8px 16px;
}

/* App footer (all pages) — modern style with icons */
.app-footer {
  width: 100%;
  margin-top: auto;
  padding: 28px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.app-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.app-footer-powered {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.app-footer-powered a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

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

.app-footer-artists {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 32px;
}

.app-footer-artist-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.app-footer-artist-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.app-footer-artist-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.app-footer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.app-footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-footer-btn-spotify:hover {
  background: rgba(29, 185, 84, 0.2);
  border-color: rgba(29, 185, 84, 0.5);
  color: #1db954;
}

.app-footer-btn-spotify:hover .app-footer-icon { color: #1db954; }

.app-footer-btn-youtube:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.5);
  color: #ff0000;
}

.app-footer-btn-youtube:hover .app-footer-icon { color: #ff0000; }

.auth-user {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: auto;
}

.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auth-link:hover {
  color: var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
}

.auth-link-discord {
  background: #5865f2;
  color: white;
  padding: 8px 16px;
}

.auth-link-discord:hover {
  background: #4752c4;
  color: white;
}

.auth-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.auth-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: var(--accent-color);
}

.auth-error {
  background: rgba(255, 107, 53, 0.2);
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.header-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 32px;
  position: relative;
}

.header-top::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  box-shadow: var(--shadow-glow);
}

.logo {
  width: 220px;
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
  transition: all 0.3s ease;
  margin-top: 20px;
}

.logo-link {
  text-decoration: none;
}

.logo:hover {
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
  transform: scale(1.05);
}

.motto {
  text-align: center;
  color: #999;
  font-size: 1.1em;
  margin-top: 15px;
  font-weight: 300;
  line-height: 1.4;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
  overflow: visible;
}

.motto:hover {
  color: #ccc;
  opacity: 1;
}

.crypto-address {
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  text-align: center;
  margin: 0 auto;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 400px;
  width: fit-content;
  word-break: break-all;
  display: block;
}

.crypto-address:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
}

.crypto-address:active {
  transform: translateY(0);
}

.banner {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--gradient-primary));
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: var(--shadow-neon);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(10px);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification .toast-icon {
  font-size: 18px;
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.streaming-services {
  margin: 20px 0;
  overflow: hidden;
  position: relative;
  background: transparent;
  border-radius: 0;
  padding: 20px 0;
  box-shadow: none;
  border: none;
  max-width: 100vw;
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
}

.streaming-banner {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--gradient-secondary));
  border-radius: 15px;
  padding: 20px 0;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.streaming-track {
  display: flex;
  animation: scrollLeft 30s linear infinite;
  width: max-content;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.streaming-track:hover {
  animation-play-state: paused;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  margin: 0 20px;
  padding: 20px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.service-item:hover::before {
  left: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-color);
}

.service-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: brightness(1.1) contrast(1.2) drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

.service-item:hover .service-logo {
  filter: brightness(1.3) contrast(1.4) drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
  transform: scale(1.15) rotate(2deg);
}

.service-logo-fallback {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

.service-item:hover .service-logo-fallback {
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
  transform: scale(1.15) rotate(2deg);
}

.service-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  text-align: center;
  margin-top: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.service-item:hover .service-name {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.motto-text {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 300;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.motto-text:hover {
  opacity: 1;
  color: var(--text-color);
}

.search-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 50px 0;
  gap: 15px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  display: inline-block;
}

#searchInput {
  padding: 15px 20px;
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-size: 1rem;
  min-width: 300px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glow);
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-neon);
  background: rgba(255, 255, 255, 0.1);
}

#searchInput::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

#searchButton {
  padding: 15px 30px;
  background: linear-gradient(135deg, var(--gradient-accent));
  border: none;
  border-radius: 25px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#searchButton:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
  background: linear-gradient(135deg, var(--gradient-primary));
}

.search-history {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 380px;
  background: rgba(26, 26, 46, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
}

.search-history-label {
  padding: 8px 14px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-history-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-color);
  transition: background 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-history-item:hover {
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary-color);
}

.search-history-item:last-child {
  border-bottom: none;
}

.media-section {
  margin-top: 40px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.media-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 212, 255, 0.1);
  position: relative;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.media-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.media-item:hover::before {
  left: 100%;
}

.media-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-neon);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.05);
}

.media-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

.media-item:hover img {
  transform: scale(1.1);
  filter: brightness(1.2) contrast(1.1);
}

.media-info {
  padding: 20px;
  position: relative;
  z-index: 2;
}

.media-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.media-item:hover .media-title {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.media-year {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.media-rating {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.watched-badge {
  background: var(--accent-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 8px;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.media-item.watched {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  overflow: auto;
}

.modal-content {
  background: var(--surface-color);
  border-radius: 20px;
  box-shadow: var(--shadow-glow);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  margin: 5% auto;
  color: var(--text-color);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--gradient-primary));
  border-radius: 20px 20px 0 0;
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  padding: 0;
}

.media-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.media-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(2px);
}

.backdrop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.media-info-hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  width: 100%;
  gap: 30px;
}

.media-poster {
  flex-shrink: 0;
  width: 200px;
  height: 300px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-poster:hover img {
  transform: scale(1.05);
}

.media-details-hero {
  flex: 1;
  color: white;
}

.media-title-hero {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, var(--gradient-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.media-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.media-year,
.media-rating,
.media-runtime {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-overview {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 600px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.media-genres {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.genre-tag {
  background: linear-gradient(135deg, var(--gradient-accent));
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-content {
  padding: 40px;
  background: var(--surface-color);
}

.media-actions {
  margin: 30px 0;
}

.tv-show-content {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.debug-button {
  background: var(--accent-color) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  margin-top: 15px !important;
}

.debug-button:hover {
  background: var(--primary-color) !important;
  transform: translateY(-2px) !important;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, 
.close:focus {
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

/* Enhanced Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 30px 0;
  border-radius: 15px;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Enhanced Cast Section */
.cast-section {
  margin-top: 40px;
}

.cast-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
  background: linear-gradient(135deg, var(--gradient-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.cast-member {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.cast-member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  background: rgba(255, 255, 255, 0.1);
}

.cast-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid var(--accent-color);
}

.cast-image-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  color: white;
  font-size: 0.8rem;
}

.cast-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 5px;
}

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

/* Enhanced Video Modal Styles */
#videoModal {
  display: none;
  position: fixed;
  z-index: 2000; /* Higher than regular modal */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  overflow: auto;
}

#videoModal .modal-content {
  background: var(--surface-color);
  border-radius: 20px;
  box-shadow: var(--shadow-glow);
  max-width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  margin: 2.5% auto;
  color: var(--text-color);
}

.video-modal-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--gradient-primary));
  border-radius: 20px 20px 0 0;
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1000;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.video-modal-body {
  padding: 0;
  background: var(--surface-color);
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 0 0 15px 15px;
}

.video-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.video-info-panel {
  background: linear-gradient(135deg, var(--gradient-secondary));
  padding: 30px;
  color: white;
  text-align: center;
  border-radius: 0 0 20px 20px;
}

.video-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, var(--gradient-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.episode-info {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.post-playback-options {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 0 0 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.post-playback-options .media-button {
  background: linear-gradient(135deg, var(--gradient-accent));
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 200px;
  justify-content: center;
  text-decoration: none;
}

.post-playback-options .media-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-neon);
  background: linear-gradient(135deg, var(--gradient-primary));
}

.post-playback-options .media-button svg {
  width: 20px;
  height: 20px;
}

/* Responsive Design for Streaming Banner */
@media (max-width: 768px) {
  .streaming-services {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }
  
  #searchInput {
    min-width: 200px;
    width: 100%;
    max-width: 100%;
  }
  
  .service-item {
    min-width: 100px;
    margin: 0 10px;
    padding: 15px 10px;
  }
  
  .service-logo {
    width: 40px;
    height: 40px;
  }
  
  .service-name {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .streaming-services {
    margin-left: -5px;
    margin-right: -5px;
    width: calc(100% + 10px);
  }
  
  .service-item {
    min-width: 80px;
    margin: 0 8px;
    padding: 12px 8px;
  }
  
  .service-logo {
    width: 30px;
    height: 30px;
  }
  
  .service-name {
    font-size: 0.7rem;
  }
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .media-info-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }
  
  .media-poster {
    width: 150px;
    height: 225px;
  }
  
  .media-title-hero {
    font-size: 2rem;
  }
  
  .media-meta {
    justify-content: center;
  }
  
  .cast-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .media-content {
    padding: 20px;
  }
}

/* Responsive Design for Video Modal */
@media (max-width: 768px) {
  .video-info-panel {
    padding: 20px;
  }
  
  .video-title {
    font-size: 1.5rem;
  }
  
  .playback-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .playback-actions .media-button {
    min-width: 250px;
  }
  
  .post-playback-options {
    padding: 20px;
  }
}

/* Carousel Styles */
.carousel {
  position: relative;
  margin: 40px 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow-glow);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.carousel-button {
  background: rgba(0, 212, 255, 0.2);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 15px 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.carousel-button:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-glow);
  transform: scale(1.1);
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: -250px;
  top: 0;
  height: 100%;
  width: 250px;
  background-color: var(--secondary-color);
  transition: left 0.3s ease;
  z-index: 2;
  padding-top: 60px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.sidebar.open {
  left: 0;
}

.sidebar-toggle {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 3;
  background: var(--primary-color);
  border: none;
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.genre-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.genre-list::-webkit-scrollbar {
  width: 6px;
}

.genre-list::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

.genre-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.genre-list li {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.genre-list li:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-color);
}

.genre-list li.active {
  background: var(--primary-color);
  color: white;
}

/* Media Button Styles */
.media-button {
  background: linear-gradient(135deg, var(--gradient-accent));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
  background: linear-gradient(135deg, var(--gradient-primary));
}

.media-button svg {
  width: 18px;
  height: 18px;
}

.episode-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

/* Season/Episode Selector Styles */
#seasonEpisodeSelector {
  margin: 20px 0;
}

.season-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.season-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.season-tab:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary-color);
}

.season-tab.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-glow);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.episode-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 200px;
  min-width: 280px;
}

.episode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.episode-card:hover::before {
  left: 100%;
}

.episode-card:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.episode-card.selected {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-neon);
}

.episode-card.watched {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.episode-thumbnail {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-radius: 12px;
}

.episode-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 15px;
  border-radius: 12px;
}

.episode-info {
  width: 100%;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.episode-number {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.episode-title {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.episode-duration {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 500;
}

.episode-watched-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  animation: pulse 2s infinite;
  z-index: 2;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

/* Footer Styles */
footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-color);
  font-size: 14px;
  font-weight: bold;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Video player error handling and loading states */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    z-index: 5;
}

.video-error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    z-index: 10;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.video-error-message h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.video-error-message p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.server-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.server-options .media-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.server-options .media-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}

.section-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: iconGlow 3s ease-in-out infinite alternate;
}

.section-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), transparent);
    border-radius: 1px;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.section-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: shimmer 2s infinite;
}

@keyframes iconGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Hide any unwanted text from video player iframe */
.video-player-wrapper iframe {
    position: relative;
    z-index: 1;
}

/* Hide any debugging text that might appear */
.video-player-wrapper::after {
    content: none !important;
}

/* Ensure no unwanted text appears in bottom left */
.video-player-container {
    position: relative;
    overflow: hidden;
}

/* Hide any text that might be coming from the iframe */
iframe {
    pointer-events: auto;
}

/* Additional cleanup for any unwanted text */
.video-modal-body {
    position: relative;
    overflow: hidden;
}

/* Hide any text that might be appearing from iframe or debugging */
.video-player-wrapper * {
    font-family: inherit;
}

/* Ensure no unwanted text appears anywhere in the video player */
.video-player-container *::before,
.video-player-container *::after {
    content: none !important;
}
