/* ================================================
   KURO ANIME — Minimalist Dark Anime Streaming
   Design language calibrated from portfolio-4li
   ================================================ */

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

:root {
  --bg:             #090909;
  --bg2:            #0e0e0e;
  --surface:        #131313;
  --surface2:       #1a1a1a;
  --surface3:       #222222;

  --border:         rgba(255, 255, 255, 0.08);
  --border2:        rgba(255, 255, 255, 0.15);
  --border3:        rgba(255, 255, 255, 0.28);

  --accent:         #ffffff;
  --text:           #f0f0f0;
  --text2:          #b8b8b8;
  --sub:            #8e8e8e;
  --muted:          #707070;

  --accent-dim:     rgba(255, 255, 255, 0.06);
  --glow-white:     rgba(255, 255, 255, 0.12);

  --mono:           'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --sans:           'Inter', system-ui, -apple-system, sans-serif;

  --r-sm:           6px;
  --r-md:           10px;
  --r-lg:           14px;
  --r-full:         9999px;

  --transition:     0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main, footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
}

.container {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

header.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(9, 9, 9, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.nav-brand .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
}

.nav-tab {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--sub);
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-tab.active {
  color: var(--accent);
  background: var(--surface2);
  border-color: var(--border2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.38rem 0.75rem;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-portfolio-btn:hover {
  color: #ffffff;
  border-color: var(--border3);
  background: var(--surface2);
  transform: translateY(-1px);
}

.nav-portfolio-btn svg {
  opacity: 0.65;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-portfolio-btn:hover svg {
  opacity: 1;
  transform: translate(1px, -1px);
}

.footer-author-link {
  color: #ffffff;
  font-family: var(--mono);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.footer-author-link:hover {
  opacity: 0.8;
}

/* Search Box */
.search-wrapper {
  position: relative;
  width: 260px;
  z-index: 600;
  display: flex;
  align-items: center;
}

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

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 0.45rem 2rem 0.45rem 2.2rem;
  font-size: 0.84rem;
  color: var(--text);
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--border3);
  background: var(--surface2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
  transition: color var(--transition);
}

.search-clear-btn:hover {
  color: #ffffff;
}

.tab-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  background: #ffffff;
  color: #000000;
  border-radius: 9999px;
  padding: 1px 6px;
  font-weight: 700;
  margin-left: 0.35rem;
}

/* Search Dropdown Results */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  background: rgba(14, 14, 14, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border3);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2);
  max-height: 440px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-dropdown.open {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--surface2);
}

.search-result-thumb {
  width: 42px;
  height: 60px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface3);
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.search-result-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sub);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────
   HERO SPOTLIGHT (CINEMATIC STREAMING BANNER)
───────────────────────────────────────────── */
.hero-spotlight {
  position: relative;
  min-height: 520px;
  padding: 4.5rem 0 3.8rem;
  border-bottom: 1px solid var(--border);
  background: #090909;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-backdrop {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.18;
  filter: blur(42px);
  transform: scale(1.08);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 1s ease;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 90% 70% at 75% 40%, transparent 0%, rgba(9, 9, 9, 0.65) 55%, #090909 95%),
    linear-gradient(to top, #090909 0%, transparent 60%),
    linear-gradient(to right, #090909 20%, rgba(9, 9, 9, 0.7) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
}

.tag.hl {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border2);
  font-weight: 700;
}

.tag.rating-tag {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.3);
  font-weight: 700;
}

.tag.quality-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0;
  transition: opacity 0.22s ease;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sub);
  font-family: var(--sans);
  letter-spacing: -0.01em;
  transition: opacity 0.22s ease;
}

.hero-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: -0.1rem;
}

.hero-genre-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--transition);
}

.hero-genre-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.hero-overview {
  color: var(--text2);
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: 650px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.22s ease;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

/* Button System */
.btn {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-play-icon {
  font-size: 0.75rem;
}

.btn-accent {
  background: #ffffff;
  color: #090909;
  font-weight: 700;
  border: 1px solid #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.18);
}

.btn-accent:hover {
  background: #eaeaea;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--border2);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border3);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Hero Carousel Controls */
.hero-carousel-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.carousel-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-btn:hover {
  color: #fff;
  border-color: var(--border3);
  background: var(--surface2);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  width: 22px;
  border-radius: 4px;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.carousel-counter {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

/* Hero Poster Showcase */
.hero-poster-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-poster-card {
  position: relative;
  width: 270px;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  background: var(--surface2);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero-poster-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 255, 255, 0.1);
}

.hero-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-poster-card:hover .hero-poster {
  transform: scale(1.04);
}

.hero-poster-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-poster-card:hover .hero-poster-overlay {
  opacity: 1;
}

.poster-play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.hero-poster-card:hover .poster-play-circle {
  transform: scale(1);
}

.poster-play-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────
   SECTION & FILTER BAR
───────────────────────────────────────────── */
.catalog-section {
  padding-bottom: 5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '//';
  color: var(--muted);
  font-weight: 400;
}

.section-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sub);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-sm);
}

.filter-status-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.filter-status-text {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.clear-filter-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.clear-filter-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
}

.genre-filter-wrapper {
  position: relative;
  margin-bottom: 1.8rem;
}

.genre-filter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.3rem 0.2rem 0.6rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.genre-filter-row::-webkit-scrollbar {
  display: none;
}

.genre-chip {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-full);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.genre-chip:hover {
  color: #ffffff;
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-1px);
}

.genre-chip.active {
  color: #000000 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

/* ─────────────────────────────────────────────
   ANIME GRID & CARDS
───────────────────────────────────────────── */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  min-height: 380px;
}

/* Skeleton Loading Cards */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-50 { width: 50%; }

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

.anime-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20,20,20,0.85) 0%, rgba(14,14,14,0.85) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.anime-card:hover {
  transform: translateY(-5px);
  border-color: var(--border3);
  border-left-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 255, 255, 0.05);
}

.anime-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface2);
}

.anime-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.anime-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  background: rgba(9, 9, 9, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 4px;
}

.anime-card-rating {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(9, 9, 9, 0.85);
  backdrop-filter: blur(8px);
  color: #f7d070;
  border: 1px solid rgba(247, 208, 112, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.anime-card-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.anime-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anime-card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   THEATER WATCH MODAL & PLAYER
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-container {
  width: min(1100px, 100%);
  max-height: 94vh;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.theater-container {
  width: min(1200px, 98%);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  overflow: hidden;
  flex: 1;
}

.modal-title {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theater-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-control-btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-control-btn:hover:not(:disabled) {
  color: #fff;
  background: var(--surface3);
  border-color: var(--border2);
}

.nav-control-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.modal-close-btn {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--sub);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  background: transparent;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: var(--surface2);
  border-color: var(--border3);
}

.theater-episodes-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.theater-episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theater-ep-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Player Stage */
.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #000;
  color: var(--sub);
  font-family: var(--mono);
  font-size: 0.85rem;
}

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

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

/* Modal Content & Episode List */
.modal-body {
  padding: 1.2rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--surface);
}

.server-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.server-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 0.2rem;
}

.server-pill {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--sub);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.server-pill:hover {
  color: var(--text);
  border-color: var(--border2);
}

.server-pill.active {
  color: var(--accent);
  background: var(--surface3);
  border-color: var(--border3);
}

.episode-grid-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 0.5rem;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.ep-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--sub);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.5rem 0.2rem;
  border-radius: var(--r-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.ep-btn:hover {
  color: var(--text);
  background: var(--surface3);
  border-color: var(--border2);
}

.ep-btn.active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

/* ─────────────────────────────────────────────
   DETAILS MODAL
───────────────────────────────────────────── */
.details-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  overflow-y: auto;
}

.details-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border2);
}

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

.details-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.details-synopsis {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg2);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--sub);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  transition: color var(--transition);
}

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

/* ─────────────────────────────────────────────
   RESPONSIVE MEDIA QUERIES (MOBILE & TABLET)
───────────────────────────────────────────── */

/* Global Mobile Fix */
html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

/* Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
  }
  .search-wrapper {
    width: 220px;
  }
}

/* Tablets & Mobile Landscape (<= 860px) */
@media (max-width: 860px) {
  .container {
    width: calc(100% - 2rem);
  }

  /* Header & Navigation */
  .navbar {
    padding: 0.5rem 0;
  }
  .navbar-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.2rem 0;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.2rem 0 0.4rem;
    gap: 0.4rem;
    justify-content: flex-start;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--r-full);
    background: var(--surface);
    border: 1px solid var(--border);
  }
  .nav-tab.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
  }

  .nav-actions {
    margin-left: auto;
    gap: 0.5rem;
  }
  .search-wrapper {
    width: 170px;
  }
  .search-wrapper:focus-within {
    width: 210px;
  }
  .search-input {
    font-size: 0.78rem;
    padding: 0.4rem 1.8rem 0.4rem 2rem;
  }
  .nav-portfolio-btn {
    padding: 0.38rem 0.65rem;
    font-size: 0.72rem;
  }

  .search-dropdown {
    position: fixed;
    top: 116px;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: 65vh;
    border-radius: var(--r-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0 2rem;
  }
  .hero-poster-wrapper {
    display: none;
  }
  .hero-content {
    align-items: flex-start;
    text-align: left;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }
  .hero-overview {
    font-size: 0.84rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-cta {
    width: 100%;
  }

  /* Grid */
  .anime-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  /* Modal */
  .details-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .details-poster {
    max-width: 160px;
    margin: 0 auto;
  }
}

/* Standard Smartphones (<= 640px) */
@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.25rem);
  }

  /* Compact Navbar */
  .nav-brand {
    font-size: 0.95rem;
    gap: 0.4rem;
  }
  .nav-brand span span {
    display: none; /* Hide '// anime' on small screens */
  }
  .search-wrapper {
    width: 130px;
  }
  .search-wrapper:focus-within {
    width: 165px;
  }
  .nav-portfolio-btn span {
    font-size: 0.68rem;
  }

  /* Hero Mobile */
  .hero-spotlight {
    min-height: auto;
    padding: 1rem 0 1.5rem;
  }
  .hero-grid {
    padding: 1.5rem 0 1.2rem;
    gap: 1rem;
  }
  .hero-badge-row {
    gap: 0.35rem;
    flex-wrap: wrap;
  }
  .hero-badge-row .tag {
    font-size: 0.64rem;
    padding: 2px 6px;
  }
  .hero-title {
    font-size: 1.45rem;
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 0.78rem;
  }
  .hero-overview {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }
  .hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .hero-cta #hero-play-btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
  }
  .hero-cta .btn-secondary,
  .hero-cta #hero-bookmark-btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.6rem;
    font-size: 0.72rem;
  }

  .hero-carousel-bar {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.8rem;
    padding-top: 0.75rem;
  }

  /* Catalog Section */
  .catalog-section {
    padding: 1.2rem 0 2.5rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .filter-status-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .filter-status-text {
    font-size: 0.7rem;
  }

  /* Anime Grid — Standard 2-Column Streaming Layout */
  .anime-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .anime-card {
    border-radius: var(--r-sm);
  }
  .anime-card-badge {
    top: 6px;
    right: 6px;
    font-size: 0.62rem;
    padding: 1px 5px;
  }
  .anime-card-rating {
    bottom: 6px;
    left: 6px;
    font-size: 0.64rem;
    padding: 1px 5px;
  }
  .anime-card-body {
    padding: 0.65rem 0.55rem;
    gap: 0.3rem;
  }
  .anime-card-title {
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .anime-card-meta {
    font-size: 0.66rem;
    padding-top: 0.3rem;
  }

  /* Genre Filter Bar */
  .genre-filter-row {
    padding: 0.2rem 0 0.5rem;
    gap: 0.35rem;
  }
  .genre-chip {
    padding: 0.35rem 0.7rem;
    font-size: 0.68rem;
  }

  /* Modals — Bottom Sheet on Mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal-container {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: none;
  }
  .modal-header {
    padding: 0.75rem 1rem;
  }
  .modal-title {
    font-size: 0.82rem;
  }
  .details-body {
    padding: 1rem;
    gap: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .details-title {
    font-size: 1.25rem;
  }
  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 0.35rem;
  }
  .ep-btn {
    padding: 0.5rem 0.2rem;
    font-size: 0.72rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 0;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
  }
}

/* Extra Small Phones (<= 380px) */
@media (max-width: 380px) {
  .search-wrapper {
    width: 110px;
  }
  .search-wrapper:focus-within {
    width: 145px;
  }
  .anime-grid {
    gap: 0.5rem;
  }
  .anime-card-body {
    padding: 0.5rem 0.45rem;
  }
  .anime-card-title {
    font-size: 0.74rem;
  }
}
