:root{
    --bg-900: #050505;        /* page background */
    --bg-800: #0b0b0b;        /* panels */
    --panel-glass: rgba(12, 12, 12, 0.26);
    --glass-border: rgba(255,255,255,0.02);
    --muted: #9aa0a6;
    --accent: #c084fc;        /* modern teal accent \u2014 change this if you want amber/green */
    --glass-blur: 6px;
    --card-shadow: 0 20px 30px -10px rgba(0,0,0,0.6);
    --transition-fast: 0.22s;
    --transition-smooth: 0.35s;
    --radius: 12px;
    --txt: #e6eef3;
}

/* base */
body {
    background: linear-gradient(180deg, var(--bg-900) 0%, #080808 100%);
    color: var(--txt);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* glass panels */
.glass-effect {
    background: var(--panel-glass);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border: 1px solid var(--glass-border);
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.backdrop-gradient {
    background: linear-gradient(to bottom, rgba(8,8,8,0) 0%, rgba(10,10,10,1) 100%);
}

/* nav */
.nav-link {
    position: relative;
    transition: color var(--transition-smooth) ease, transform var(--transition-fast);
    padding: 0.5rem 0;
    color: var(#fff);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(90deg, #c084fc, #c084fc);
    transition: width var(--transition-smooth) ease, left var(--transition-smooth) ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-link:hover::after {
    width: 100%;
    left: 50%;
}

/* sections */
.section-header {
    cursor: pointer;
    user-select: none;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-content {
    transition: max-height var(--transition-smooth) ease, opacity var(--transition-smooth) ease, padding var(--transition-fast) ease;
    overflow: hidden;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.section-content.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* cards */
.card-hover {
    transition: transform 0.45s cubic-bezier(.2,.9,.3,1), box-shadow 0.45s cubic-bezier(.2,.9,.3,1);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(14,14,14,0.6), rgba(8,8,8,0.45));
    will-change: transform;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--card-shadow);
}

.card-overlay {
    opacity: 0;
    transition: opacity var(--transition-fast) ease;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.95) 0%,
        rgba(0,0,0,0.7) 45%,
        rgba(0,0,0,0.15) 100%
    );
    position: absolute;
    inset: 0;
    pointer-events: none;
}

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

.card-hover img {
    transition: filter 0.32s ease, transform 0.32s ease;
    display: block;
    width: 100%;
    height: auto;
}

.card-hover:hover img {
    filter: brightness(0.72) saturate(0.95);
    transform: scale(1.02);
}

/* subtle accent text (no frantic animation) */
.accent-text {
    color: var(--accent);
    text-shadow: 0 4px 14px var(--accent-weak);
    font-weight: 700;
}

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

.search-container::before {
    content: '';
    position: absolute;
    inset: -30% -30%;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--accent-weak) 0%,
        rgba(0,0,0,0.0) 30%
    );
    mix-blend-mode: screen;
    transition: opacity 0.4s ease;
    opacity: 0.7;
}

.search-input {
    background: rgba(20,20,20,0.6);
    border: 1px solid rgba(255,255,255,0.03);
    color: var(--txt);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.search-input:focus {
    box-shadow: 0 8px 30px var(--accent-weak);
    transform: translateY(-1px);
    background: rgba(18,18,18,0.92);
    outline: none;
}

/* small interactive icons */
.settings-icon {
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    color: var(--muted);
}

.settings-icon:hover {
    transform: rotate(180deg);
    color: var(--accent);
}

/* loading spin \u2014 subtle */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(180deg); }
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .card-hover, .nav-link, .section-content, .search-input, .settings-icon {
        transition: none !important;
        animation: none !important;
    }
}

.bg-gray-800 {
background-color: #101010 !important;
}

.bg-gray-600 {
    background-color: #151515 !important;
}

.bg-gray-700 {
    background-color: #151515 !important;
}

.featured-nav-arrow {
  background: rgba(0,0,0,0.55);
  color: white;
  padding: 0.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease;
}
.featured-nav-arrow:hover { background: rgba(0,0,0,0.75); }
.featured-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  border: none;
}
.featured-nav-dot.active {
  background: white;
  transform: scale(1.15);
}
.hero-gradient {
  background: linear-gradient(180deg, rgba(5,5,5,0.05) 0%, rgba(5,5,5,0.75) 60%, rgba(5,5,5,1) 100%);
}
.featured-bottom-fade {
  background: linear-gradient(0deg, rgba(5,5,5,1), rgba(5,5,5,0));
}
.featured-title-image { max-width: 360px; margin-bottom: 1rem; object-fit: contain; }



/* RESULTS grid: large cinematic cards that wrap */
.results-grid {
  display: grid;
  gap: 28px;
  padding: 20px 40px;
  align-items: start;
  /* responsive columns: each card at least 520px, otherwise it fills available space */
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
}

/* card base: aspect ratio 16:9 ensures no squaring on fullscreen */
.result-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;         /* keep cinematic ratio at all widths */
  border-radius: 10px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  align-items: stretch;         /* allow bottom bar to sit at bottom */
}

/* subtle hover scale, not too aggressive */
.result-card:hover {
  transform: translateY(-8px) scale(1.02);
  z-index: 30;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* clickable full-card area (transparent) for keyboard users */
.card-click-area {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

/* The persistent bottom bar (always visible) */
.card-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-image: linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.85) 100%);
  pointer-events: none; /* allow children to control pointer events */
}

/* meta area holds title+excerpt */
.card-meta {
  pointer-events: auto;
  max-width: 72%;
}
.card-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub {
  color: #e5e7eb;
  font-size: 0.875rem;
  margin-top: 6px;
  opacity: 0.95;
  display: block;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* right side: rating + actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

/* rating/year block */
.rating-year {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-right: 6px;
  color: #fff;
}
.rating { display:flex; align-items:center; gap:6px; font-weight:700; color:#fff; }
.year { color: #d1d5db; font-size:0.9rem; }

/* action buttons grouped in bottom bar */
.action-buttons { display:flex; gap:8px; align-items:center; }

/* pill buttons — Play and Watchlist */
.play-btn, .watchlist-btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight:700;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
}
.play-btn:hover, .watchlist-btn:hover { transform: translateY(-3px); }
.play-btn .icon-play { display:block; }
.watchlist-btn { padding:8px 10px; }

/* watchlist active state */
.watchlist-added {
  background: #c084fc;
  box-shadow: 0 6px 18px rgba(99,102,241,0.15);
}

/* keyboard focus visible */
.result-card:focus-within { outline: 2px solid rgba(99,102,241,0.16); outline-offset: 4px; }

/* responsive: one card per row on small screens */
@media screen and (max-width: 1024px) {
  .results-grid { grid-template-columns: 1fr; padding: 12px 18px; gap: 18px; }
  .card-meta { max-width: 62%; }
  .card-title { font-size: 1.05rem; }
  .result-card { aspect-ratio: 16 / 9; min-height: 240px; }
  /* keep controls visible and tactile on mobile */
  .card-bottom { padding: 14px; }
  .card-sub { display: none; } /* hide overview on small to keep bottom bar compact */
}

/* very small phones - slightly taller */
@media screen and (max-width: 540px) {
  .result-card { min-height: 220px; aspect-ratio: 16 / 9; }
  .play-text { display:none; } /* minimal label */
}

/* Inline meta: year and rating on the same line */
.inline-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 6px;
  color: #d1d5db;           /* subtle text color */
  font-size: 0.95rem;
  white-space: nowrap;
}

.card-year {
  font-weight: 600;
  color: #ffffff;
}

.meta-sep {
  color: rgba(255,255,255,0.28);
  font-size: 0.9rem;
  line-height: 1;
}

/* rating inline style */
.card-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd54a;  /* star color — adjust if you want */
  font-weight: 700;
}

/* shrink star slightly on very small screens */
@media (max-width: 540px) {
  .card-rating-inline svg { width: 12px; height: 12px; }
  .inline-meta { font-size: 0.9rem; gap: 0.4rem; }
}
