:root {
  --bg: #050811;
  --bg-elevated: #0b1020;
  --bg-elevated-soft: #11172a;
  --accent: #ffb347;
  --accent-soft: rgba(255, 179, 71, 0.18);
  --accent-strong: #ff8a00;
  --text-main: #f5f7ff;
  --text-muted: #a5acc7;
  --border-subtle: #252b3d;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.10), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255,138,0,0.18), transparent 55%),
    #02030a;
  color: var(--text-main);
  min-height: 100vh;
}

/* HERO */

header.hero {
  position: relative;
  padding: 3.2rem 1.2rem 2.4rem;
  color: #fff;
  overflow: hidden;
}

header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0,0,0,0.85), rgba(0,0,0,0.5)),
    url("movies-hero.jpg") center/cover no-repeat;
  filter: saturate(1.2);
  opacity: 0.9;
}

header.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -80px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(5,8,17,1));
}

header.hero > * {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: center;
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .movie-grid {
    gap: 0.7rem;
  }
  .movie-card {
    padding: 0.7rem 0.75rem 0.7rem;
  }
}
@media (max-width: 600px) {
  .controls {
    border-radius: 18px;
    align-items: flex-start;
  }
  .controls label {
    width: 100%;
    justify-content: flex-start;
  }
  .controls button {
    width: 100%;
    justify-content: center;
  }
}


.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  margin: 0 0 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.hero-subtitle {
  max-width: 40rem;
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-pill {
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255,179,71,0.9);
}

.hero-side-card {
  justify-self: flex-end;
  min-width: 240px;
  max-width: 320px;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top, rgba(255,179,71,0.18), transparent 60%),
              rgba(5, 9, 24, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-side-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.hero-side-stat {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.hero-side-highlight {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.hero-side-progress {
  margin-top: 0.4rem;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(10, 14, 32, 0.9);
  overflow: hidden;
}

.hero-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), #ffcf67);
  transition: width 0.35s ease-out;
}

.btn-full {
  margin-top: 0.8rem;
  width: 100%;
  justify-content: center;
}

.tonights-info {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-main);
  padding: 0.4rem 0.5rem;
  border-radius: 0.6rem;
  background: rgba(3, 7, 25, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 2.2rem;
}

/* DASHBOARD */

.dashboard {
  max-width: 1200px;
  margin: 0 auto 0.8rem;
  padding: 0.7rem 1.2rem 0.9rem;
  border-radius: 14px;
  background: rgba(5, 9, 24, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 32px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

.dash-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.dash-value {
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-progress {
  margin-top: 0.1rem;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #151a2b;
  overflow: hidden;
}

.dash-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), #ffcf67);
  transition: width 0.35s ease-out;
}

.dash-tags {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dash-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(3, 7, 25, 0.95);
}

/* LAYOUT */

main {
  padding: 1.2rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

/* CONTROLS / GLASS CONSOLE */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.6rem auto 1.1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 55%),
              rgba(8, 12, 32, 0.86);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(18px);
}

.controls label {
  font-size: 0.8rem;
  opacity: 0.9;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.controls input[type="search"],
.controls select {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #30364e;
  background: #050714;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.9);
}

.controls input[type="search"]:focus,
.controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.controls button {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-strong), #ffcf67);
  color: #1b1000;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(0,0,0,0.6);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.controls button.secondary {
  background: rgba(12,18,40,0.95);
  color: var(--text-muted);
  border: 1px solid #2a3147;
  box-shadow: none;
}

.controls button:hover {
  filter: brightness(1.05);
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mode-toggle input[type="checkbox"] {
  accent-color: var(--accent-strong);
}

/* MOVIE GRID */

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.movie-card {
  position: relative;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgba(255,179,71,0.09), transparent 50%),
              var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 0.85rem 0.95rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 16px 30px rgba(0,0,0,0.65);
  overflow: hidden;
}

.movie-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at top right, rgba(255,179,71,0.15), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

.movie-card:hover::before {
  opacity: 1;
}

.movie-card.highlight-pick {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(255,179,71,0.6), 0 18px 40px rgba(0,0,0,0.9);
}

.movie-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.movie-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
}

.movie-title:hover {
  color: var(--accent);
}

.movie-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.movie-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.movie-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.star-rating {
  display: inline-flex;
  gap: 0.1rem;
  cursor: pointer;
  padding: 0.05rem 0.25rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.3);
}

.star {
  font-size: 1rem;
  color: #555b78;
  transition: transform 0.12s ease-out, color 0.12s ease-out;
}

.star.filled {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255,179,71,0.9);
}

.star-rating:hover .star {
  transform: translateY(-1px);
}

.watched-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(11,17,40,0.95);
  border: 1px solid #313858;
}

.watched-toggle input[type="checkbox"] {
  accent-color: var(--accent-strong);
}

.movie-comment {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid #272f49;
  background: #050714;
  color: var(--text-main);
  font-size: 0.78rem;
  min-height: 2.1rem;
  resize: vertical;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.7);
}

.movie-comment:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  outline: none;
}

/* PILLS & FOOTER */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  background: rgba(3,7,25,0.9);
}

.pill.genre {
  border-color: rgba(144,194,255,0.8);
  color: #a7c9ff;
}

.pill.classification {
  border-color: rgba(211,179,255,0.9);
  color: #e2caff;
}

.footer-note {
  margin-top: 1.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: none;
  background: rgba(8, 12, 32, 0.95);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:not(.visible) {
  transform: translateY(10px);
}

@media (max-width: 600px) {
  .back-to-top {
    right: 0.8rem;
    bottom: 0.9rem;
    padding: 0.35rem 0.7rem;
  }
}
