/* ============================================
   StreamVault — Dark Cinema Theme
   ============================================ */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #151c2c;
  --bg-card-hover: #1a2236;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: linear-gradient(to bottom, rgba(10, 14, 23, 0.98), rgba(10, 14, 23, 0.85));
  backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 10px;
  font-size: 16px;
  color: white;
}

.logo-text {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.15);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ============ SEARCH ============ */
.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 280px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  width: 340px;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow);
  z-index: 100;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

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

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-poster {
  width: 40px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-card);
  flex-shrink: 0;
}

.search-result-info h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.search-result-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============ MAIN CONTENT ============ */
main {
  padding-top: 64px;
  min-height: 100vh;
}

/* ============ HERO SECTION ============ */
.hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  max-height: 700px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(0.55);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-primary) 0%,
    rgba(10, 14, 23, 0.7) 40%,
    rgba(10, 14, 23, 0.3) 70%,
    transparent 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 3rem;
  left: 2rem;
  right: 2rem;
  max-width: 600px;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--gold);
  font-weight: 600;
}

.hero-overview {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.genre-select {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.genre-select:focus {
  border-color: var(--accent);
}

/* ============ SECTION ============ */
.section {
  padding: 0 2rem;
  margin-bottom: 2.5rem;
}

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

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-more {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.section-more:hover {
  color: var(--accent-hover);
}

/* ============ MOVIE GRID ============ */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.movie-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg-card);
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.movie-card:hover .movie-card-overlay {
  opacity: 1;
}

.movie-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--bg-card);
}

.movie-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.movie-card-rating {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  backdrop-filter: blur(4px);
}

.movie-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.movie-card-play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent white;
  margin-left: 3px;
}

.movie-info {
  padding: 0.75rem;
}

.movie-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============ CONTINUE WATCHING ============ */
.continue-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.continue-row::-webkit-scrollbar {
  display: none;
}

.continue-card {
  flex: 0 0 280px;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  transition: var(--transition);
}

.continue-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}

.continue-backdrop {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
}

.continue-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.continue-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.continue-info {
  padding: 0.75rem;
}

.continue-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

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

.modal {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

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

.modal-backdrop-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.modal-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.modal-backdrop-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.modal-header {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  z-index: 2;
}

.modal-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.modal-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--gold);
  font-weight: 600;
}

.modal-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.modal-overview {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

/* Cast */
.cast-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.cast-grid::-webkit-scrollbar {
  display: none;
}

.cast-card {
  flex: 0 0 100px;
  text-align: center;
}

.cast-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.4rem;
  background: var(--bg-card);
}

.cast-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

/* Trailer */
.trailer-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #000;
}

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

/* Similar movies */
.similar-grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.similar-grid::-webkit-scrollbar {
  display: none;
}

.similar-card {
  flex: 0 0 120px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.similar-card:hover {
  transform: scale(1.05);
}

.similar-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.similar-title {
  padding: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.page-info {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

/* ============ LOADER ============ */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 23, 0.7);
  z-index: 3000;
  backdrop-filter: blur(4px);
}

.loader.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ============ NO-POSTER PLACEHOLDER ============ */
.no-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .nav-links {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .search-input {
    width: 180px;
  }

  .search-input:focus {
    width: 220px;
  }

  .hero {
    height: 50vh;
    min-height: 360px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-content {
    left: 1rem;
    right: 1rem;
    bottom: 2rem;
  }

  .filter-bar {
    padding: 0 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .section {
    padding: 0 1rem;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .modal {
    margin-top: 0;
    border-radius: 0;
    min-height: 100vh;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-backdrop-container {
    height: 260px;
  }

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

  .modal-body {
    padding: 1rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .movie-info {
    padding: 0.5rem;
  }

  .movie-title {
    font-size: 0.75rem;
  }

  .continue-card {
    flex: 0 0 220px;
  }

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

/* Mobile nav toggle for small screens */
@media (max-width: 768px) {
  .nav-right {
    margin-left: auto;
  }
}

/* ============ GENRE TAGS ============ */
.genre-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.genre-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-hover);
  font-size: 0.7rem;
  font-weight: 500;
}

/* ============ VIDEO PLAYER PAGE ============ */
.player-page {
  padding-top: 64px;
  min-height: 100vh;
  background: #000;
}

.player-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: #000;
}

.player-container iframe,
.player-container video {
  width: 100%;
  height: 100%;
  border: none;
}

.player-info {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ============ ARCHIVE.ORG STYLES ============ */
.archive-hero {
  position: relative;
  padding: 6rem 2rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  margin-bottom: 2rem;
  overflow: hidden;
}

.archive-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.archive-hero-content {
  position: relative;
  z-index: 1;
}

.archive-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.archive-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.archive-stats {
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-weight: 500;
}

.archive-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
}

.archive-badge-lg {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.archive-free-tag {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-watch-now {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

.btn-watch-now:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
  transform: scale(1.02);
}

.video-quality-options {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Player top bar */
.player-top-bar {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.player-back-btn {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.player-back-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.player-title-overlay {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-player-container {
  padding-top: 48px; /* space for top bar */
}

.archive-player-container video {
  width: 100%;
  height: 100%;
  background: #000;
  max-height: calc(100vh - 112px);
}

/* Search badges */
.search-free-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}

.search-section-label {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid var(--border);
}

.search-section-label:first-child {
  border-top: none;
}

/* Mobile archive adjustments */
@media (max-width: 768px) {
  .archive-hero {
    padding: 5rem 1rem 2rem;
  }

  .archive-hero-title {
    font-size: 1.8rem;
  }

  .archive-hero-subtitle {
    font-size: 0.9rem;
  }

  .player-top-bar {
    top: 64px;
    padding: 0.5rem 1rem;
  }

  .archive-player-container {
    padding-top: 40px;
  }

  .archive-player-container video {
    max-height: calc(100vh - 104px);
  }
}

/* ============ SKELETON LOADING ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

.skeleton-poster {
  aspect-ratio: 2/3;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
