/* ============================================================
   anime-hx.css — Netflix Cinema Style
   ============================================================ */

/* ============ HERO ============ */
.hx-cinema-main {
  gap: 0 !important;
  padding-top: 0 !important;
}
.hx-cinema-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin: -80px -40px 0;
  padding: 80px 40px 0;
}
.hx-cinema-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.45) saturate(1.2);
  transform: scale(1.02);
  transition: background-image 0.8s ease;
}
.hx-cinema-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(7, 22, 47, 1) 0%,
    rgba(7, 22, 47, 0.85) 30%,
    rgba(7, 22, 47, 0.4) 60%,
    rgba(7, 22, 47, 0.7) 100%
  );
}
.hx-cinema-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 0 50px;
}
.hx-cinema-hero-empty {
  max-width: 640px;
}
.hx-cinema-hero-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #eaf1ff;
  margin: 16px 0 12px;
  letter-spacing: -0.02em;
}
.hx-cinema-hero-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(220, 230, 250, 0.75);
  margin: 0 0 24px;
}
.hx-cinema-hero-meta {
  display: flex;
  gap: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(220, 230, 250, 0.5);
}
.hx-cinema-hero-meta b {
  color: #4ad6c4;
  font-weight: 700;
}

/* ============ THEATRE (playing state) ============ */
.hx-cinema-theatre {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.hx-cinema-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}
.hx-cinema-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
}
.hx-cinema-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hx-cinema-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hx-cinema-now {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #ff5555;
  font-weight: 700;
}
.hx-cinema-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(220, 230, 250, 0.5);
}
.hx-cinema-info-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #eaf1ff;
  margin: 0;
}
.hx-cinema-info-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(220, 230, 250, 0.65);
  margin: 0;
}
.hx-cinema-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(220, 230, 250, 0.6);
}
.hx-cinema-hotkeys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(220, 230, 250, 0.3);
}
.hx-cinema-hotkeys span {
  padding: 3px 8px;
  border: 1px solid rgba(76, 201, 240, 0.12);
  border-radius: 4px;
}

/* ============ TOOLBAR ============ */
.hx-cinema-toolbar-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: rgba(7, 22, 47, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(76, 201, 240, 0.1);
}
.hx-cinema-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hx-cinema-status {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(220, 230, 250, 0.4);
}

/* ============ RAILS ============ */
.hx-cinema-rails {
  padding: 40px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hx-cinema-rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.hx-cinema-rail-head h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #eaf1ff;
  margin: 0;
}
.hx-cinema-rail-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(74, 214, 196, 0.8);
  background: rgba(74, 214, 196, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.hx-cinema-rail-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.hx-cinema-rail-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 6px;
  color: #eaf1ff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.hx-cinema-rail-btn:hover {
  background: rgba(74, 214, 196, 0.15);
  border-color: rgba(74, 214, 196, 0.5);
}
.hx-cinema-rail-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0 12px;
}
.hx-cinema-rail-track::-webkit-scrollbar { display: none; }

/* ============ CARD ============ */
.hx-cinema-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hx-cinema-rail.is-big .hx-cinema-card {
  flex: 0 0 300px;
}
.hx-cinema-card:hover {
  transform: translateY(-6px) scale(1.03);
}
.hx-cinema-card.is-active .hx-cinema-card-thumb {
  border-color: #4ad6c4;
  box-shadow: 0 0 0 2px rgba(74, 214, 196, 0.3), 0 8px 30px rgba(74, 214, 196, 0.15);
}
.hx-cinema-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(7, 22, 47, 0.8);
  border: 1px solid rgba(76, 201, 240, 0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.hx-cinema-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hx-cinema-card:hover .hx-cinema-card-thumb img {
  transform: scale(1.08);
}
.hx-cinema-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(74, 214, 196, 0.3);
}
.hx-cinema-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.hx-cinema-card:hover .hx-cinema-card-overlay {
  opacity: 1;
}
.hx-cinema-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 214, 196, 0.9);
  border-radius: 50%;
  color: #07162f;
  opacity: 0;
  transition: all 0.3s;
}
.hx-cinema-card-play svg { width: 20px; height: 20px; }
.hx-cinema-card:hover .hx-cinema-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hx-cinema-card-info {
  position: relative;
  z-index: 2;
}
.hx-cinema-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hx-cinema-card-meta {
  display: flex;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}
.hx-cinema-card-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}
.hx-cinema-card-progress div {
  height: 100%;
  background: linear-gradient(90deg, #4ad6c4, #4cc9f0);
  border-radius: 0 2px 2px 0;
}
.hx-cinema-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffb86c;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(255, 184, 108, 0.3);
}
.hx-cinema-card-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(220, 230, 250, 0.85);
  margin: 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hx-cinema-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 14px;
  color: rgba(220, 230, 250, 0.4);
}

/* ============ PLAYER TOOLBAR ============ */
.hx-player-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.hx-pbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 8px;
  color: #eaf1ff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.hx-pbtn:hover {
  border-color: rgba(74, 214, 196, 0.6);
  background: rgba(74, 214, 196, 0.1);
  color: #4ad6c4;
}
.hx-pbtn-primary {
  background: rgba(74, 214, 196, 0.15);
  border-color: rgba(74, 214, 196, 0.4);
  color: #4ad6c4;
}
.hx-pbtn svg { width: 14px; height: 14px; }
.hx-pswitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(76, 201, 240, 0.15);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(220, 230, 250, 0.8);
  cursor: pointer;
}
.hx-pswitch input { accent-color: #4ad6c4; }
.hx-pselect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(220, 230, 250, 0.7);
}
.hx-pselect select {
  padding: 7px 10px;
  background: rgba(7, 22, 47, 0.6);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 6px;
  color: #eaf1ff;
  font-family: inherit;
  font-size: 11px;
  outline: none;
  cursor: pointer;
}

/* ============ SEARCH (reused) ============ */
.hx-anime-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 320px;
}
.hx-anime-search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: rgba(220, 230, 250, 0.4);
  pointer-events: none;
}
.hx-anime-search {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: rgba(7, 22, 47, 0.6);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 8px;
  color: #eaf1ff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.hx-anime-search:focus { border-color: rgba(74, 214, 196, 0.6); }
.hx-anime-search::placeholder { color: rgba(220, 230, 250, 0.35); }
.hx-anime-sort {
  padding: 9px 12px;
  background: rgba(7, 22, 47, 0.6);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 8px;
  color: #eaf1ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hx-cinema-hero {
    min-height: 50vh;
    margin: -60px -16px 0;
    padding: 60px 16px 0;
  }
  .hx-cinema-card { flex: 0 0 160px; }
  .hx-cinema-rail.is-big .hx-cinema-card { flex: 0 0 220px; }
  .hx-cinema-toolbar { flex-wrap: wrap; }
  .hx-anime-search-wrap { max-width: 100%; flex-basis: 100%; }
  .hx-player-toolbar { gap: 6px; }
  .hx-pbtn { padding: 6px 10px; font-size: 11px; }
  .hx-cinema-hotkeys { display: none; }
}
