/* ==========================================================================
   VibeFlix – main stylesheet
   Dark base theme; the selected mood recolors the page through --mood tokens.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;

  /* Neutrals (base theme) */
  --bg: #121212;
  --surface: #1c1c1c;
  --surface-raised: #242424;
  --surface-hover: #2c2c2c;
  --border: #333333;
  --text: #f5f5f5;
  --text-muted: #a7a7a7;
  --text-faint: #6f6f6f;

  /* Mood tokens – overwritten per mood below. Default = Energetic */
  --mood: #ff7043;          /* accent color */
  --mood-ink: #121212;      /* text color that sits ON the accent */
  --mood-glow: rgba(255, 112, 67, 0.35);

  /* Shape + depth */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.6);

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 150ms;
  --slow: 400ms;
}

/* ---------- Mood themes ----------
   app.js sets <body data-mood="..."> and the whole page follows.
   Any element with data-mood (a mood button, a profile tile) also gets
   that mood's own colors. */
[data-mood="energetic"]    { --mood: #ff7043; --mood-ink: #121212; --mood-glow: rgba(255, 112, 67, 0.35); }
[data-mood="chill"]        { --mood: #4fc3f7; --mood-ink: #121212; --mood-glow: rgba(79, 195, 247, 0.30); }
[data-mood="happy"]        { --mood: #ffd54f; --mood-ink: #121212; --mood-glow: rgba(255, 213, 79, 0.28); }
[data-mood="dark"]         { --mood: #424242; --mood-ink: #f5f5f5; --mood-glow: rgba(120, 120, 120, 0.30); }
[data-mood="romantic"]     { --mood: #e57373; --mood-ink: #121212; --mood-glow: rgba(229, 115, 115, 0.32); }
[data-mood="mindbending"]  { --mood: #7e57c2; --mood-ink: #ffffff; --mood-glow: rgba(126, 87, 194, 0.40); }

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  /* Mood gradient: a soft glow of the mood color fading into the base */
  background-image: radial-gradient(
    ellipse 90% 55% at 50% -10%,
    var(--mood-glow),
    transparent 70%
  );
  background-repeat: no-repeat;
  transition: background-image var(--slow) var(--ease);
  padding-inline: 16px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--mood);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.container {
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 24px 64px;
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--mood);
  color: var(--mood-ink);
  display: grid;
  place-items: center;
  transition: background-color var(--slow) var(--ease);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: color var(--fast), border-color var(--fast);
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ---------- Hero / controls ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  padding-top: 24px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.05;
}

.hero-subtitle {
  margin: -12px 0 0;
  color: var(--text-muted);
  font-size: 17px;
}

/* Large search bar */
.search {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 22px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: border-color var(--fast), box-shadow var(--fast);
}

.search:focus-within {
  border-color: var(--mood);
  box-shadow: 0 0 0 4px var(--mood-glow), var(--shadow-card);
}

.search-icon {
  flex: none;
  color: var(--text-faint);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
  padding-block: 12px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-faint);
}

.search-button {
  flex: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-weight: 700;
  background: var(--text);
  color: var(--bg);
  transition: transform var(--fast) var(--ease), background-color var(--fast);
}

.search-button:hover {
  transform: scale(1.04);
}

/* Movies the user has added */
.liked-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -12px 0 0;
  padding: 0;
  list-style: none;
}

.liked-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 14px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.liked-chip button {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  line-height: 1;
}

.liked-chip button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Emoji mood selector */
.mood-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 0;
  margin: 0;
  padding: 0;
}

.mood-picker legend {
  padding: 0;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mood-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 640px;
}

.mood-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: transform var(--fast) var(--ease), background-color var(--fast),
    border-color var(--fast);
}

.mood-button:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.mood-emoji {
  font-size: 30px;
  line-height: 1;
  transition: transform var(--fast) var(--ease);
}

.mood-button:hover .mood-emoji {
  transform: scale(1.15);
}

.mood-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Selected mood uses that mood's own color */
.mood-button[aria-pressed="true"] {
  background: var(--surface-raised);
  border-color: var(--mood);
  box-shadow: 0 0 20px var(--mood-glow);
}

.mood-button[aria-pressed="true"] .mood-label {
  color: var(--text);
}

/* Primary call to action */
.cta {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
  box-shadow: 0 8px 28px var(--mood-glow);
  transition: transform var(--fast) var(--ease), background-color var(--slow),
    color var(--slow), box-shadow var(--slow);
}

.cta:hover {
  transform: scale(1.04);
}

.cta:active {
  transform: scale(0.98);
}

/* ---------- Results ---------- */
.results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
}

.section-meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* Top pick: large card with poster beside the details */
.top-pick {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 28px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.top-pick .poster {
  box-shadow: var(--shadow-card);
}

.top-pick-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mood);
  transition: color var(--slow);
}

body[data-mood="dark"] .eyebrow {
  color: var(--text-muted); /* #424242 is too dark to read as text */
}

.top-pick-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.1;
}

.movie-meta {
  font-size: 14px;
  color: var(--text-muted);
}

.ai-reason {
  margin: 0;
  font-size: 16px;
  color: var(--text);
  max-width: 52ch;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pill-match {
  background: var(--mood);
  color: var(--mood-ink);
  transition: background-color var(--slow), color var(--slow);
}

/* Like / dislike */
.rate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.rate-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  transition: transform var(--fast) var(--ease), border-color var(--fast),
    background-color var(--fast);
}

.rate-button:hover {
  border-color: var(--text-muted);
  transform: scale(1.04);
}

.rate-button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Posters (placeholder art until real S3 / TMDB images load) */
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-raised);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* Spotify-style tiles for the other matches */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  transition: transform var(--fast) var(--ease), background-color var(--fast),
    box-shadow var(--fast);
}

.movie-card:hover {
  transform: scale(1.03);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card-hover);
}

.movie-card .poster {
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  margin-top: -8px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-foot .pill {
  padding: 4px 10px;
  font-size: 12px;
}

.icon-actions {
  display: flex;
  gap: 4px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  transition: background-color var(--fast), color var(--fast),
    transform var(--fast) var(--ease);
}

.icon-button:hover {
  background: var(--surface-raised);
  color: var(--text);
  transform: scale(1.1);
}

.icon-button[aria-pressed="true"] {
  color: var(--mood);
}

body[data-mood="dark"] .icon-button[aria-pressed="true"] {
  color: var(--text);
}

/* Play-button style badge that appears on hover, like Spotify tiles */
.poster-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mood);
  color: var(--mood-ink);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--fast), transform var(--fast) var(--ease);
}

.movie-card:hover .poster-badge,
.movie-card:focus-within .poster-badge {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Taste profile page (profile.html)
   ========================================================================== */

/* Profile header */
.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
}

.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: radial-gradient(circle at 30% 25%, var(--mood), var(--surface-raised) 75%);
  box-shadow: 0 12px 40px var(--mood-glow);
}

.profile-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.profile-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  line-height: 1;
}

.profile-sub {
  color: var(--text-muted);
  font-size: 15px;
}

/* Summary numbers */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Two-column band: genres beside moods */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.panel-title {
  font-size: 20px;
  font-weight: 800;
}

.panel-note {
  margin-top: -12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Top genres: horizontal bars */
.genre-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.genre-row {
  display: grid;
  grid-template-columns: 96px 1fr 44px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.genre-name {
  font-weight: 600;
}

.genre-track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  overflow: hidden;
}

.genre-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--mood);
  transition: background-color var(--slow);
}

body[data-mood="dark"] .genre-fill {
  background: #9e9e9e; /* keep bars visible in the Dark mood */
}

.genre-pct {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Top moods: each tile wears its own mood color */
.mood-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mood-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--mood-glow), var(--surface-raised) 80%);
  border: 1px solid var(--border);
  transition: transform var(--fast) var(--ease);
}

.mood-tile:hover {
  transform: translateY(-2px);
}

.mood-tile:first-child {
  border-color: var(--mood);
}

.mood-tile .mood-emoji {
  font-size: 26px;
}

.mood-tile-name {
  font-size: 14px;
  font-weight: 700;
}

.mood-tile-count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Most-liked actors: round tiles, like Spotify artists */
.actor-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: background-color var(--fast), transform var(--fast) var(--ease);
}

.actor-card:hover {
  background: var(--surface);
  transform: scale(1.03);
}

.actor-photo {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.actor-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.actor-count {
  margin-top: -6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Editable profile sections ---------- */

/* Show/hide parts depending on Edit vs Done */
[data-editing="false"] .edit-only,
[data-editing="true"] .view-only {
  display: none !important;
}

.edit-toggle {
  background: transparent;
  cursor: pointer;
}

[data-editing="true"] .edit-toggle {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

[data-editing="true"] {
  box-shadow: 0 0 0 1px var(--border), 0 0 24px var(--mood-glow);
}

.sub-title {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.empty-note {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  list-style: none;
}

.add-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Search box with suggestions dropdown */
.suggest {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 420px;
}

.suggest .text-field {
  max-width: none;
  padding: 12px 16px;
  font-size: 16px;
}

.suggest .text-field:disabled {
  opacity: 0.5;
}

.suggest-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  max-height: 360px;
  overflow-y: auto;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.suggest-item:hover,
.suggest-item[aria-selected="true"] {
  background: var(--surface-hover);
}

.suggest-thumb {
  flex: none;
  width: 36px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface);
}

.suggest-thumb.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.suggest-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 14px;
}

.suggest-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-text small {
  font-size: 12px;
  color: var(--text-muted);
}

.suggest-empty {
  padding: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Favorite movies grid */
.favorite-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.favorite-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.favorite-item .poster {
  box-shadow: var(--shadow-card);
}

.favorite-item .picked-rank {
  left: 8px;
  top: 8px;
}

.item-tools {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.item-tools .icon-button {
  font-size: 20px;
  font-weight: 700;
  background: var(--surface-raised);
}

.icon-button:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

/* Genre chips inside a panel */
.chip-grid.compact {
  gap: 8px;
}

.chip-grid.compact .chip {
  padding: 8px 14px;
  font-size: 14px;
}

span.chip:hover {
  transform: none;
  border-color: var(--border);
}

/* Actor photos: real images or initials */
.actor-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 120px;
}

img.actor-photo {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--surface-raised);
}

.actor-initials {
  background: linear-gradient(145deg, var(--surface-hover), var(--surface-raised));
}

.remove-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  background: var(--text);
  color: var(--bg);
  transition: transform var(--fast) var(--ease);
}

.remove-badge:hover {
  transform: scale(1.12);
}

/* Profile picture button */
.avatar-button {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: visible;
}

.avatar-button #avatar-display,
.avatar-preview {
  overflow: hidden;
}

.avatar-button #avatar-display {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.avatar-button img,
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-edit {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  border: 3px solid var(--bg);
  transition: transform var(--fast) var(--ease);
}

.avatar-button:hover .avatar-edit {
  transform: scale(1.1);
}

/* Dialog */
.modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card-hover);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 96px;
  height: 96px;
  font-size: 44px;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.upload-button {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  transition: transform var(--fast) var(--ease);
}

.upload-button:hover {
  transform: scale(1.04);
}

#avatar-file:focus-visible + .upload-button,
.avatar-upload:focus-within .upload-button {
  outline: 2px solid var(--mood);
  outline-offset: 3px;
}

#avatar-error {
  color: #ef9a9a;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.avatar-option {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid transparent;
  font-size: 28px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--mood), var(--surface-raised) 80%);
  transition: transform var(--fast) var(--ease), border-color var(--fast);
}

.avatar-option:hover {
  transform: scale(1.08);
}

.avatar-option[aria-pressed="true"] {
  border-color: var(--text);
}

@media (max-width: 760px) {
  .favorite-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .suggest {
    max-width: none;
  }
}

/* Watch history */
.history-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background-color var(--fast);
}

.history-row:hover {
  background: var(--surface);
}

.history-thumb {
  width: 44px;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
}

.history-title {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.history-mood {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  border: 1px solid var(--mood);
  white-space: nowrap;
}

.history-rating {
  width: 92px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.history-rating.liked {
  color: #81c784;
}

.history-rating.passed {
  color: var(--text-faint);
}

.history-date {
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .stat-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .actor-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .profile-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-avatar {
    width: 104px;
    height: 104px;
    font-size: 46px;
  }

  .history-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .history-mood {
    display: none;
  }

  .history-rating {
    width: auto;
  }

  .genre-row {
    grid-template-columns: 80px 1fr 40px;
  }
}

/* ==========================================================================
   Onboarding survey (onboarding.html)
   ========================================================================== */

.onboarding {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Progress bar */
.progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 16.66%;
  border-radius: inherit;
  background: var(--mood);
  transition: width var(--slow) var(--ease);
}

/* One step on screen at a time */
.step {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}

.step-lead {
  margin: -12px 0 0;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 60ch;
}

.text-field {
  width: 100%;
  max-width: 420px;
  padding: 16px 20px;
  font-size: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}

.text-field:focus {
  border-color: var(--mood);
  box-shadow: 0 0 0 4px var(--mood-glow);
}

.welcome-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.welcome-points li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-muted);
}

.welcome-points strong {
  color: var(--text);
  font-size: 15px;
}

/* Streaming service tiles */
.service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.service-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--fast) var(--ease), border-color var(--fast),
    background-color var(--fast);
}

.service-tile:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.service-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.service-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.service-note {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
}

.service-tile[aria-pressed="true"] {
  border-color: var(--mood);
  background: var(--surface-raised);
}

.service-tile[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
}

/* On/off switch row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  font-weight: 600;
}

.toggle-text small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.switch {
  flex: none;
  position: relative;
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--border);
  transition: background-color var(--fast);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  transition: transform var(--fast) var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--mood);
}

.switch[aria-checked="true"]::after {
  transform: translateX(20px);
  background: var(--mood-ink);
}

/* Genre chips: neutral -> love -> skip */
.chip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: -8px;
  font-size: 13px;
  color: var(--text-muted);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--fast) var(--ease), background-color var(--fast),
    border-color var(--fast), color var(--fast);
}

.chip:hover {
  transform: scale(1.04);
  border-color: var(--text-muted);
}

.chip[data-state="love"] {
  background: var(--mood);
  border-color: var(--mood);
  color: var(--mood-ink);
}

.chip[data-state="love"]::before {
  content: "♥ ";
}

.chip[data-state="skip"] {
  color: var(--text-faint);
  border-style: dashed;
  text-decoration: line-through;
}

/* Favorite movie picker */
.pick-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.pick-tile {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  transition: transform var(--fast) var(--ease);
}

.pick-tile:hover {
  transform: scale(1.04);
}

.pick-tile .poster {
  border-radius: var(--radius-sm);
  outline: 3px solid transparent;
  outline-offset: -3px;
  transition: outline-color var(--fast);
}

.pick-tile .poster-placeholder {
  font-size: 12px;
  padding: 8px;
  text-align: left;
}

.pick-tile[aria-pressed="true"] .poster {
  outline-color: var(--mood);
}

.pick-tile[aria-pressed="true"]::after {
  content: attr(data-rank);
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
}

.pick-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.pick-caption {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
}

.pick-caption small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.poster-missing {
  background: linear-gradient(160deg, #3a3a3a, #1c1c1c);
}

/* Ranked strip of picked favorites */
.picked-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.picked-item {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 6px;
}

.picked-item .poster {
  border-radius: 6px;
}

.picked-item .poster-placeholder {
  font-size: 9px;
  padding: 4px;
}

.picked-rank {
  position: absolute;
  left: 4px;
  top: 4px;
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
}

.picked-remove {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity var(--fast);
}

.picked-item:hover .picked-remove,
.picked-item:focus-visible .picked-remove {
  opacity: 1;
}

@media (max-width: 520px) {
  .picked-strip {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Taste detail questions */
.question {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
}

.question legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background-color var(--fast), border-color var(--fast), color var(--fast);
}

.segment:hover {
  border-color: var(--text-muted);
}

.segment[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* Step 1: name + picture */
.question-label {
  font-size: 16px;
  font-weight: 700;
}

.optional {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.avatar-grid-10 {
  grid-template-columns: repeat(10, 1fr);
  max-width: 640px;
}

/* Big search box with dropdown on the survey */
.suggest-large {
  max-width: none;
}

.suggest-large .text-field {
  padding: 16px 20px;
  font-size: 18px;
}

.suggest-thumb.plus {
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--mood-ink);
  background: var(--mood);
}

.suggest-custom {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Step 5: actor picker */
.actor-pick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.actor-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  text-align: center;
  transition: background-color var(--fast), transform var(--fast) var(--ease);
}

.actor-pick:hover {
  background: var(--surface);
  transform: scale(1.03);
}

.actor-pick .actor-photo {
  outline: 3px solid transparent;
  outline-offset: -3px;
  transition: outline-color var(--fast);
}

.actor-pick[aria-pressed="true"] .actor-photo {
  outline-color: var(--mood);
}

.actor-check {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
  border: 2px solid var(--bg);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--fast), transform var(--fast) var(--ease);
}

.actor-pick[aria-pressed="true"] .actor-check {
  opacity: 1;
  transform: scale(1);
}

/* Step 7 heading with the chosen picture */
.done-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.done-head .avatar-preview {
  width: 80px;
  height: 80px;
  font-size: 38px;
}

@media (max-width: 760px) {
  .avatar-grid-10 {
    grid-template-columns: repeat(5, 1fr);
  }

  .actor-pick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Final step: AI taste summary */
.taste-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--mood-glow), var(--surface) 70%);
  border: 1px solid var(--border);
}

.taste-summary blockquote {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Back / Skip / Continue */
.step-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.step-nav .spacer {
  flex: 1;
}

.ghost-button {
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  transition: color var(--fast), background-color var(--fast);
}

.ghost-button:hover {
  color: var(--text);
  background: var(--surface);
}

.step-nav .cta {
  padding: 14px 32px;
  font-size: 16px;
}

/* Profile: streaming services section */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.service-badge.off {
  color: var(--text-faint);
  border-style: dashed;
  font-weight: 600;
}

@media (max-width: 760px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .welcome-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Sign in / Sign out ---------- */
html.signing-in body {
  visibility: hidden; /* back from Cognito: wait until we know which page to show */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-button {
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
}

.auth-notice {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid #ef9a9a;
  border-radius: var(--radius-md);
  background: #3a1f1f;
  color: #ef9a9a;
}

/* ==========================================================================
   Landing page (index.html)
   ========================================================================== */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cta-secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text-muted);
}

.cta-secondary::after {
  display: none;
}

.hero-note {
  margin: -12px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* The demo: a small working VibeFlix in a window */
.demo {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 16px;
}

.demo-window {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(18, 18, 18, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 60px var(--mood-glow);
  overflow: hidden;
}

.demo-window .mood-bar {
  max-width: none;
}

.demo-window .mood-button {
  animation: none;
}

.demo-results {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 14px;
}

.demo-results .top-pick {
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.demo-results .top-pick-body {
  gap: 10px;
}

.demo-results .top-pick-title {
  font-size: clamp(22px, 3vw, 28px);
}

.demo-results .ai-reason {
  min-height: 3em;
  font-size: 15px;
}

.demo-more {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.demo-more-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.demo-tile.movie-card {
  flex: 1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px;
  min-width: 0;
}

.demo-tile .poster {
  flex: none;
  width: 52px;
  border-radius: 6px;
}

.demo-tile-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.demo-tile .card-title {
  max-width: 100%;
  font-size: 14px;
}

.demo-tile .pill {
  padding: 2px 8px;
  font-size: 12px;
}

.demo-tile .icon-button {
  flex: none;
}

.demo-cursor {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  transition: transform 720ms cubic-bezier(0.45, 0.05, 0.2, 1), opacity 300ms;
}

.demo-cursor.is-on {
  opacity: 1;
}

/* How it works and the closing prompt */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.how-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  background: var(--mood);
  color: var(--mood-ink);
}

.how-title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
}

.how-step p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 20px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--mood-glow), var(--surface) 75%);
}

.closing-title {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
}

@media (max-width: 760px) {
  .demo-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  /* Keep the row list a list instead of the swipeable row used on the main page */
  .demo-tile.movie-card {
    flex: 0 0 auto;
    scroll-snap-align: none;
  }

  .demo-results .ai-reason {
    min-height: 4.5em;
  }
}

@media (max-width: 520px) {
  .demo-window {
    padding: 12px;
  }

  .demo-results .top-pick {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .demo-results .top-pick .poster {
    margin: 0;
    max-width: none;
  }

  .demo-results .stat-row {
    display: none;
  }

  .hero-actions .cta {
    width: 100%;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .top-pick {
    grid-template-columns: 1fr;
  }

  .top-pick .poster {
    max-width: 240px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .mood-bar {
    grid-template-columns: repeat(3, 1fr);
  }

  .search {
    padding-left: 16px;
  }

  .search-input {
    font-size: 16px;
  }

  .search-button {
    padding: 12px 16px;
  }

  .card-grid {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
