/* Discovery floor — everything below the hero. */
:root {
  --content-shell: min(1600px, calc(100% - 64px));
  --content-line: rgba(255, 255, 255, .08);
  --content-surface: rgba(14, 20, 32, .72);
  --content-soft: #91a0b8;
}

/* Discovery dock */
.filters-container {
  width: var(--content-shell);
  max-width: none;
  margin: 0 auto 52px;
  overflow: visible;
}
.discovery-dock-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 166px;
  padding: 2px 18px 2px 4px;
  border-right: 1px solid rgba(255,255,255,.09);
}
.discovery-dock-copy span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ff6074;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.discovery-dock-copy span i { font-size: 13px; }
.discovery-dock-copy strong {
  margin-top: 4px;
  color: #e8edf7;
  font: 600 12px/1.2 var(--font-heading);
  white-space: nowrap;
}
.categories-scroll {
  gap: 7px;
  padding: 3px 3px 5px;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.chip {
  min-height: 35px;
  padding: 0 13px;
  border-radius: 10px;
  background: transparent;
  border-color: transparent;
  color: #8f9db4;
  font-size: 11px;
  font-weight: 600;
}
.chip:hover {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.08);
  color: #fff;
}
.chip.active {
  background: linear-gradient(135deg, #ff304a, #cf071e);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 8px 22px rgba(229,9,20,.22), inset 0 1px rgba(255,255,255,.2);
}
.filters-right { gap: 8px; }
.custom-select select {
  height: 37px;
  min-width: 134px;
  padding: 0 32px 0 12px;
  border-radius: 10px;
  background-color: rgba(5,10,18,.52);
  border-color: rgba(255,255,255,.09);
  color: #a9b5c8;
  font-size: 10px;
}

/* Content shelves */
.content-wrapper {
  width: var(--content-shell);
  max-width: none;
  padding: 0 0 72px;
}
.rails-container { display: flex; flex-direction: column; gap: 0; }
.rail-section {
  --shelf-accent: #ff2b45;
  position: relative;
  margin: 0;
  padding: 40px 0 50px;
  border-top: 1px solid var(--content-line);
}
.rail-section:first-child { border-top: 0; padding-top: 0; }
.rail-section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, var(--shelf-accent), transparent);
}
#rail-anime { --shelf-accent: #d061ff; }
#rail-series { --shelf-accent: #35c6df; }
#rail-games { --shelf-accent: #8c68ff; }
#rail-software { --shelf-accent: #35d39a; }
#rail-hindi { --shelf-accent: #ffb53d; }
#rail-south { --shelf-accent: #ff704d; }
#rail-bangla { --shelf-accent: #ef5f96; }
#rail-fhd { --shelf-accent: #55a8ff; }
.rail-section.anime-rail {
  margin: 0;
  padding: 40px 0 50px;
  background: transparent;
  border-radius: 0;
  border-width: 1px 0 0;
  border-color: var(--content-line);
  box-shadow: none;
}
.section-header {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 19px;
}
.shelf-number {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.08);
  font: 700 27px/1 var(--font-heading);
  letter-spacing: -.05em;
}
.section-title-wrap { gap: 3px; }
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--shelf-accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.section-eyebrow i { font-size: 12px; }
.section-title,
.anime-header .section-title {
  margin: 0;
  color: #f4f7fc !important;
  background: none;
  -webkit-text-fill-color: initial;
  font: 700 clamp(20px, 1.7vw, 28px)/1.16 var(--font-heading);
  letter-spacing: -.035em;
  text-shadow: none;
}
.section-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 0;
  color: #77869e;
  font-size: 10px;
  font-weight: 400;
}
.section-subtitle span {
  color: #a6b1c3;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,.12);
}
.section-view-all,
.anime-view-all {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  color: #cbd4e4 !important;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.09);
  font-size: 10px;
  font-weight: 600;
  box-shadow: none;
  text-shadow: none;
}
.section-view-all i { color: var(--shelf-accent); }
.section-view-all:hover,
.anime-view-all:hover {
  color: #fff !important;
  background: rgba(255,255,255,.08);
  border-color: color-mix(in srgb, var(--shelf-accent) 55%, transparent);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transform: translateY(-2px);
}
.anime-sparkle-pill, .anime-title-icon { display: none; }
.rail-wrapper { position: relative; }
.rail-carousel,
.anime-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(166px, 12.4vw, 198px);
  gap: 13px;
  overflow-x: auto;
  padding: 5px 2px 18px;
  scroll-padding-left: 2px;
  scrollbar-width: none;
}
.rail-carousel::-webkit-scrollbar { display: none; }
.rail-scroll-btn {
  top: 42%;
  width: 42px;
  height: 68px;
  border-radius: 12px;
  background: rgba(8,13,23,.88);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 14px 30px rgba(0,0,0,.48);
  font-size: 15px;
}
.rail-scroll-btn.left { left: 8px; }
.rail-scroll-btn.right { right: 8px; }
.rail-scroll-btn:hover {
  background: var(--shelf-accent);
  border-color: var(--shelf-accent);
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 10px 32px color-mix(in srgb, var(--shelf-accent) 30%, transparent);
}

/* Poster cards */
.movie-card,
.anime-carousel .movie-card {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #171f30, #101725);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 9px 28px rgba(0,0,0,.25);
  transform: translateZ(0);
  transition: transform .45s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .45s;
}
.movie-card:hover,
.anime-carousel .movie-card:hover {
  z-index: 5;
  transform: translateY(-9px);
  border-color: color-mix(in srgb, var(--shelf-accent, #ff2b45) 62%, transparent);
  box-shadow: 0 22px 38px rgba(0,0,0,.52), 0 0 22px color-mix(in srgb, var(--shelf-accent, #ff2b45) 13%, transparent);
}
.card-poster-wrap {
  padding-top: 143%;
  border-radius: 13px 13px 0 0;
  background: #111827;
}
.card-poster-wrap::after {
  background: linear-gradient(180deg, transparent 52%, rgba(7,10,17,.12) 68%, rgba(7,10,17,.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
.card-poster { transition: transform .65s cubic-bezier(.2,.8,.2,1), filter .45s; }
.movie-card:hover .card-poster { transform: scale(1.055); filter: saturate(1.08) contrast(1.03); }
.card-badges { top: 9px; left: 9px; right: 9px; }
.badge-quality,
.game-platform-badge {
  border-radius: 6px;
  background: rgba(7,12,22,.72);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
  box-shadow: 0 5px 12px rgba(0,0,0,.2);
  font-size: 8px;
  padding: 4px 7px;
}
.badge-quality.fhd { background: rgba(226,15,40,.9); }
.badge-audio { border-radius: 6px; font-size: 8px; padding: 4px 7px; }
.card-overlay {
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(0deg, rgba(5,9,16,.98), rgba(5,9,16,.65) 42%, transparent 75%);
  transition: opacity .3s ease;
}
.card-overlay h4 { transform: translateY(8px); transition: transform .35s ease; }
.card-overlay p { opacity: .72; }
.movie-card:hover .card-overlay h4 { transform: none; }
.card-actions { gap: 7px; margin-top: 10px; }
.action-play-btn {
  min-height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff2f49, #d20720);
  font-size: 10px;
  box-shadow: 0 7px 18px rgba(229,9,20,.25);
}
.action-btn-sm {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.12);
  font-size: 13px;
}
.card-info { min-height: 69px; padding: 11px 12px 12px; gap: 5px; }
.card-title { color: #edf2fa; font-size: 12px; font-weight: 600; letter-spacing: -.01em; }
.card-meta { color: #71819a; font-size: 9px; gap: 8px; }
.card-meta > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-size { color: #aeb9ca; font-weight: 500; white-space: nowrap; }

/* Game and software cards follow the same shelf language. */
.game-card {
  width: 100%;
  min-width: 0;
  flex: none;
  border-radius: 14px;
  border-color: rgba(139,92,246,.2);
  background: linear-gradient(160deg, #1c2035, #111725);
  box-shadow: 0 9px 28px rgba(0,0,0,.28);
}
.game-card:hover { transform: translateY(-9px); box-shadow: 0 22px 38px rgba(0,0,0,.5), 0 0 24px rgba(139,92,246,.17); }
.game-card .card-poster-wrap { aspect-ratio: 16/11; padding-top: 0; border-radius: 13px 13px 0 0; }
.game-card-info { padding: 12px; }
.game-card-title { font-size: 12px; }
.game-card-meta { font-size: 9px; }
.game-download-cta { border-radius: 9px; font-size: 9px; }

/* Catalog grid view */
body.is-catalog-view .filters-container { width: var(--content-shell); margin-top: 0 !important; }
body.is-catalog-view .content-wrapper { padding-top: 12px; }
.grid-section > .section-header {
  grid-template-columns: minmax(0,1fr) auto;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--content-line);
}
.grid-section > .section-header::before {
  content: 'CINEORA LIBRARY';
  position: absolute;
  top: -18px;
  color: #ff5268;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}
.grid-title-wrap { gap: 15px; }
.section-count {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  color: #8290a6;
  font-size: 9px;
}
.sub-filter-pills { gap: 6px; }
.sub-pill {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 9px;
  background: rgba(255,255,255,.03);
}
.movies-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.movies-grid .movie-card { max-width: none; }
.btn-load-more {
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(25,33,49,.94), rgba(14,20,31,.94));
  border-color: rgba(255,255,255,.1);
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  padding: 72px 32px 24px;
  background: linear-gradient(180deg, #080c13, #040609);
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-glow {
  position: absolute;
  width: 600px;
  height: 260px;
  left: -160px;
  top: -190px;
  border-radius: 50%;
  background: rgba(229,9,20,.16);
  filter: blur(80px);
  pointer-events: none;
}
.footer-container {
  width: var(--content-shell);
  max-width: none;
  grid-template-columns: 1.15fr 1.35fr 1.5fr;
  gap: clamp(34px, 5vw, 80px);
  padding-bottom: 45px;
  border-bottom-color: rgba(255,255,255,.07);
}
.footer-brand-lockup { display: flex; align-items: center; gap: 10px; }
.footer-brand .logo-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff3048, #c40018);
  box-shadow: 0 10px 30px rgba(229,9,20,.24);
}
.footer-brand h3 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.footer-brand p { margin-top: 18px; max-width: 310px; color: #78869d; font-size: 11px; line-height: 1.8; }
.footer-live {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  column-gap: 8px;
  margin-top: 24px;
  color: #dce5f2;
  font-size: 10px;
}
.footer-live > span { grid-row: 1/3; width: 7px; height: 7px; border-radius: 50%; background: #31d39c; box-shadow: 0 0 12px #31d39c; }
.footer-live strong { font-weight: 600; }
.footer-live small { color: #617089; font-size: 8px; }
.footer-column-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.footer-column-heading > span { color: #ff5066; font: 700 9px var(--font-body); }
.footer-column-heading h4 { margin: 0; color: #e9eef7; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.footer-links ul { gap: 6px; }
.footer-links a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 0 10px;
  border-radius: 8px;
  color: #7f8da3;
  background: rgba(255,255,255,.018);
  border: 1px solid transparent;
  font-size: 9px;
}
.footer-links a > span { color: #ff5b70; font-size: 8px; }
.footer-links a strong { font-weight: 500; }
.footer-links a i { opacity: 0; transition: opacity .2s, transform .2s; }
.footer-links a:hover { color: #fff; background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.06); }
.footer-links a:hover i { opacity: 1; transform: translate(2px,-2px); }
.footer-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.footer-stats { gap: 0; }
.stat-pill {
  min-height: 67px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.055);
  color: #8290a7;
}
.stat-pill i { font-size: 17px; color: #ff5066; }
.stat-pill > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-pill strong { overflow: hidden; color: #dce4f1; font-size: 9px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.stat-pill small { color: #617089; font-size: 8px; }
.footer-bottom {
  width: var(--content-shell);
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  color: #526078;
  font-size: 8px;
}
.footer-bottom a { display: inline-flex; align-items: center; gap: 6px; color: #8e9bb0; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 1100px) {
  :root { --content-shell: calc(100% - 44px); }
  .filters-container { grid-template-columns: minmax(0,1fr) auto; }
  .discovery-dock-copy { display: none; }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; display: grid; grid-template-columns: auto 1fr; column-gap: 24px; }
  .footer-brand-lockup, .footer-live { grid-column: 1; }
  .footer-brand p { grid-column: 2; grid-row: 1/3; margin: 0; align-self: center; }
}

@media (max-width: 760px) {
  :root { --content-shell: calc(100% - 28px); }
  .filters-container { margin-bottom: 38px; padding: 10px; gap: 10px; border-radius: 15px; }
  .categories-scroll { grid-column: 1/-1; order: 2; margin-right: -10px; padding-right: 10px; mask-image: none; }
  .filters-right { grid-column: 1/-1; width: 100%; }
  .custom-select { flex: 1; }
  .custom-select select { width: 100%; min-width: 0; }
  .chip { min-height: 33px; font-size: 10px; }
  .content-wrapper { padding-bottom: 46px; }
  .rail-section, .rail-section.anime-rail { padding: 30px 0 35px; }
  .rail-section:first-child { padding-top: 0; }
  .section-header { grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; margin-bottom: 15px; }
  .shelf-number { font-size: 19px; }
  .section-title, .anime-header .section-title { font-size: 18px; }
  .section-eyebrow { font-size: 7px; }
  .section-subtitle { font-size: 9px; }
  .section-subtitle span { display: none; }
  .section-view-all, .anime-view-all { width: 34px; padding: 0; font-size: 0; }
  .section-view-all i { font-size: 13px; }
  .section-view-all:hover, .anime-view-all:hover { transform: none; }
  .rail-carousel, .anime-carousel { grid-auto-columns: 148px; gap: 10px; margin-right: -14px; padding-right: 14px; }
  .rail-scroll-btn { display: none; }
  .card-info { min-height: 64px; padding: 9px 10px 11px; }
  .card-title { font-size: 11px; }
  .card-meta { font-size: 8px; }
  .card-overlay { display: none; }
  .movies-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
  .grid-section > .section-header { grid-template-columns: 1fr; align-items: start; }
  .section-count { justify-self: start; }
  .site-footer { margin-top: 20px; padding: 52px 14px 90px; }
  .footer-container { width: 100%; grid-template-columns: 1fr; gap: 38px; padding-bottom: 32px; }
  .footer-brand { grid-column: auto; display: block; }
  .footer-brand-lockup, .footer-live, .footer-brand p { grid-column: auto; grid-row: auto; }
  .footer-brand p { margin-top: 15px; }
  .footer-stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { width: 100%; flex-wrap: wrap; }
  .footer-bottom > span { order: 3; width: 100%; }
  .mobile-nav-drawer { position: absolute; top: 100%; left: 0; right: 0; width: 100%; max-width: 100vw; }
}

@media (max-width: 370px) {
  .rail-carousel, .anime-carousel { grid-auto-columns: 140px; }
  .section-title, .anime-header .section-title { font-size: 16px; }
  .footer-stat-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-section *, .site-footer * { transition: none !important; }
}
