/* =====================================================
   CINEAI — Cinematic Dark Theme
   Color palette: near-black bg + amber/gold accents
   ===================================================== */

:root {
  /* Backgrounds */
  --bg-0: #07070c;
  --bg-1: #0d0c17;
  --bg-2: #131220;
  --bg-3: #1a192e;
  --bg-4: #22213b;

  /* Accent — Amber Gold */
  --gold:       #e8a030;
  --gold-lt:    #f5bf58;
  --gold-dim:   #a06a18;
  --gold-glow:  rgba(232, 160, 48, 0.18);
  --gold-ring:  rgba(232, 160, 48, 0.32);

  /* Secondary — Soft Indigo */
  --indigo:     #818cf8;
  --indigo-bg:  rgba(129, 140, 248, 0.12);
  --indigo-border: rgba(129, 140, 248, 0.22);

  /* Text */
  --text-1: #f2f0fa;
  --text-2: #9896b8;
  --text-3: #5a587a;

  /* Surfaces */
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-hover:  rgba(255, 255, 255, 0.07);
  --border:         rgba(255, 255, 255, 0.07);
  --border-bright:  rgba(255, 255, 255, 0.14);

  /* Semantic */
  --green: #34d399;
  --red:   #f87171;

  /* Radius */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  30px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms ease;
  --t-spring: 380ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Type scale */
  --text-xs:   clamp(0.72rem,  0.68rem + 0.2vw,  0.78rem);
  --text-sm:   clamp(0.86rem,  0.82rem + 0.2vw,  0.94rem);
  --text-base: clamp(1rem,     0.96rem + 0.2vw,  1.06rem);
  --text-lg:   clamp(1.12rem,  1.05rem + 0.35vw, 1.25rem);
  --text-xl:   clamp(1.35rem,  1.2rem  + 0.75vw, 1.65rem);
  --text-2xl:  clamp(1.75rem,  1.5rem  + 1.25vw, 2.4rem);
  --text-3xl:  clamp(2.2rem,   1.8rem  + 2vw,    3.2rem);
}

/* =====================================================
   RESET & BASE
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle ambient glow in background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 1400px 700px at 10% 5%,  rgba(232, 160, 48, 0.035) 0%, transparent 65%),
    radial-gradient(ellipse 1000px 900px at 90% 25%, rgba(129, 140, 248, 0.045) 0%, transparent 60%),
    radial-gradient(ellipse 1800px 400px at 50% 100%,rgba(129, 140, 248, 0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

/* =====================================================
   SITE HEADER
   ===================================================== */

.site-header {
  padding: clamp(52px, 8vw, 108px) 24px clamp(44px, 6vw, 80px);
  text-align: center;
  position: relative;
}

.header-inner {
  max-width: 680px;
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logo i {
  font-size: 1.5rem;
  color: var(--gold);
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.logo span {
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-1);
}

.tagline {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: 36px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* =====================================================
   SEARCH FORM
   ===================================================== */

.search-form {
  width: 100%;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.search-field:focus-within {
  border-color: rgba(232, 160, 48, 0.55);
  box-shadow: 0 0 0 3px var(--gold-glow), var(--shadow-md);
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-3);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color var(--t-base);
  z-index: 1;
}

.search-field:focus-within .search-icon {
  color: var(--gold);
}

#movieInput {
  flex: 1;
  padding: 18px 18px 18px 50px;
  font-size: var(--text-base);
  font-family: inherit;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  /* Prevents iOS from zooming in */
  font-size: max(16px, var(--text-base));
}

#movieInput::placeholder {
  color: var(--text-3);
}

/* AI mode toggle inside search field */
.ai-mode-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.ai-mode-btn:hover {
  background: var(--indigo-bg);
  border-color: var(--indigo-border);
  color: var(--indigo);
}

.ai-mode-btn.is-active {
  background: var(--gold-glow);
  border-color: var(--gold-ring);
  color: var(--gold);
}

/* Search field glows differently in AI mode */
.search-field.ai-active {
  border-color: rgba(129, 140, 248, 0.5);
}

.search-field.ai-active:focus-within {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-bg), var(--shadow-md);
}

.search-field.ai-active .search-icon {
  color: var(--indigo);
}

/* Search card reason tag (AI search results only) */
.search-card-reason {
  font-size: var(--text-xs);
  color: var(--indigo);
  line-height: 1.35;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  margin: 6px;
  border-radius: var(--r-lg);
  background: var(--gold);
  color: #0a0808;
  font-size: var(--text-sm);
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.search-btn:hover {
  background: var(--gold-lt);
  box-shadow: 0 4px 16px rgba(232, 160, 48, 0.35);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: translateY(0);
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */

#main-content {
  padding-bottom: 80px;
}

.section {
  max-width: 1600px;
  margin-inline: auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

/* =====================================================
   LOADING / EMPTY STATES
   ===================================================== */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 24px;
  color: var(--text-3);
  font-size: var(--text-sm);
  text-align: center;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--border-bright);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  padding: 40px 24px;
  text-align: center;
  color: var(--red);
  font-size: var(--text-sm);
}

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    var(--bg-3) 50%,
    var(--bg-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================================================
   SEARCH RESULTS
   ===================================================== */

#searchResults {
  padding-top: 4px;
  padding-bottom: 44px;
}

.search-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.search-header-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.search-header-count {
  font-size: var(--text-sm);
  color: var(--text-3);
  font-weight: 500;
  white-space: nowrap;
}

.search-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}

.search-row::-webkit-scrollbar {
  height: 4px;
}

.search-row::-webkit-scrollbar-track {
  background: transparent;
}

.search-row::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 2px;
}

/* =====================================================
   SEARCH CARD
   ===================================================== */

.search-card {
  flex: 0 0 clamp(154px, 13vw, 196px);
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
  animation: fadeUp 0.4s ease both;
}

.search-card:nth-child(1)  { animation-delay:   0ms; }
.search-card:nth-child(2)  { animation-delay:  40ms; }
.search-card:nth-child(3)  { animation-delay:  80ms; }
.search-card:nth-child(4)  { animation-delay: 120ms; }
.search-card:nth-child(5)  { animation-delay: 160ms; }
.search-card:nth-child(n+6){ animation-delay: 200ms; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-card:hover {
  border-color: rgba(232, 160, 48, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(232, 160, 48, 0.25);
}

.search-card-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
}

.search-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.search-card:hover .search-card-poster img {
  transform: scale(1.05);
}

.search-card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 2rem;
}

.search-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(7, 7, 12, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Watchlist diagonal ribbon — shown on any card already in the watchlist */
.wl-ribbon {
  position: absolute;
  top: 18px;
  left: -32px;
  width: 120px;
  padding: 5px 0;
  background: var(--gold);
  color: #0d0d14;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  transform: rotate(-45deg);
  transform-origin: center center;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.wl-ribbon i {
  font-size: 10px;
  color: #0d0d14;
}

.search-card-info {
  padding: 10px 12px 13px;
}

.search-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-card-year {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 500;
}

/* =====================================================
   SELECTED MOVIE — HERO
   ===================================================== */

#selectedMovie {
  padding-bottom: 44px;
}

.movie-hero {
  position: relative;
  min-height: clamp(360px, 45vw, 580px);
  display: flex;
  align-items: flex-end;
  border-radius: var(--r-xl);
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.28);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(7, 7, 12, 0.97) 0%,  rgba(7, 7, 12, 0.82) 42%, rgba(7, 7, 12, 0.2) 100%),
    linear-gradient(to top,    rgba(7, 7, 12, 0.92) 0%,  transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(28px, 5vw, 52px) clamp(24px, 4vw, 52px);
  align-items: flex-start;
  width: 100%;
}

/* Poster */
.hero-poster {
  flex-shrink: 0;
  width: clamp(120px, 16vw, 210px);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-bright);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.hero-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 3rem;
}

/* Info */
.hero-info {
  flex: 1;
  min-width: 0;
  max-width: clamp(460px, 55%, 780px);
  padding-top: 6px;
}

.hero-title {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 12px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
}

.hero-meta-item {
  font-size: var(--text-sm);
  color: var(--text-2);
  font-weight: 500;
}

.hero-meta-item.is-rating {
  color: var(--gold);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-meta-item.is-rating i {
  font-size: 0.75em;
}

.hero-meta-dot {
  width: 3px;
  height: 3px;
  background: var(--text-3);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.genre-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--indigo-bg);
  color: var(--indigo);
  border: 1px solid var(--indigo-border);
  letter-spacing: 0.02em;
}

.hero-credits {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}

.hero-credit {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hero-credit-key {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  min-width: 68px;
  flex-shrink: 0;
}

.hero-credit-val {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.45;
}

.hero-overview {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* AI Analysis Box */
.ai-box {
  background: rgba(232, 160, 48, 0.055);
  border: 1px solid rgba(232, 160, 48, 0.2);
  border-radius: var(--r-md);
  padding: 16px 20px;
  max-width: 620px;
}

.ai-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold);
}

.ai-box-text {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.75;
  font-style: italic;
}

/* =====================================================
   AI RECOMMENDATIONS SECTION
   ===================================================== */

#aiSuggestions {
  padding-top: 8px;
  padding-bottom: 60px;
}

.recs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.recs-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gold-glow);
  border: 1px solid rgba(232, 160, 48, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.recs-header-title {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.03em;
}

.recs-header-sub {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: 2px;
}

/* =====================================================
   RECOMMENDATION ROW (carousel)
   ===================================================== */

.rec-row {
  margin-bottom: 44px;
  animation: fadeUp 0.5s ease both;
}

.rec-row-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.rec-row-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.025em;
}

.rec-row-sub {
  font-size: var(--text-sm);
  color: var(--gold);
  font-weight: 600;
}

.rec-row-sub::before {
  content: '·';
  margin-right: 8px;
  color: var(--text-3);
}

.rec-scroll {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
}

.rec-scroll::-webkit-scrollbar {
  display: none;
}

/* =====================================================
   RECOMMENDATION CARD
   ===================================================== */

.rec-card {
  flex: 1 1 0;
  min-width: 0;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
  animation: fadeUp 0.45s ease both;
}

.rec-card:hover {
  border-color: rgba(232, 160, 48, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.rec-card-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
}

.rec-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.rec-card:hover .rec-card-poster img {
  transform: scale(1.06);
}

.rec-card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 1.6rem;
}

.rec-card-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(7, 7, 12, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.rec-card-info {
  padding: 9px 10px 12px;
}

.rec-card-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-card-year {
  font-size: 0.68rem;
  color: var(--text-3);
  font-weight: 500;
}

/* Skeleton placeholder cards */
.rec-skeleton {
  flex: 1 1 0;
  min-width: 0;
  height: 305px;
  border-radius: var(--r-md);
}

/* =====================================================
   SITE FOOTER
   ===================================================== */

.site-footer {
  padding: 28px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: var(--text-xs);
  color: var(--text-3);
}

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-fast);
}

.site-footer a:hover {
  color: var(--gold);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 700px) {
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(20px, 5vw, 32px);
    gap: 18px;
  }

  .hero-poster {
    width: clamp(90px, 28vw, 130px);
  }

  .movie-hero {
    align-items: flex-start;
    min-height: unset;
  }

  .hero-overlay {
    background:
      linear-gradient(to bottom, rgba(7, 7, 12, 0.55) 0%, rgba(7, 7, 12, 0.97) 100%);
  }

  .hero-title {
    font-size: var(--text-xl);
  }

  .hero-overview {
    -webkit-line-clamp: 4;
  }
}

@media (max-width: 480px) {
  .search-btn span {
    display: none;
  }

  .search-field {
    border-radius: var(--r-lg);
  }

  .recs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  /* Search results: 2-column grid instead of single horizontal row */
  .search-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: unset;
    padding-bottom: 0;
    gap: 12px;
  }

  .search-card {
    flex: unset;
    width: 100%;
    scroll-snap-align: unset;
  }

  /* Recommendation rows: 2-column grid instead of single horizontal row */
  .rec-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: unset;
    padding-bottom: 0;
  }

  .rec-card {
    flex: unset;
    min-width: unset;
    scroll-snap-align: unset;
  }

  /* Larger, more readable card text */
  .search-card-title,
  .rec-card-title {
    font-size: var(--text-sm);
    -webkit-line-clamp: 2;
  }

  /* Slightly more padding on card info areas */
  .search-card-info,
  .rec-card-info {
    padding: 10px;
  }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =====================================================
   TRENDING SECTION
   ===================================================== */

#trendingSection {
  padding-top: 0;
  padding-bottom: 44px;
}

.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.trending-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.trending-title i {
  color: var(--gold);
  font-size: 1.1em;
}

.surprise-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-base);
}

.surprise-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

/* =====================================================
   RECENT SEARCHES
   ===================================================== */

.recent-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.recent-label {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.recent-pill {
  font-size: var(--text-xs);
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
}

.recent-pill:hover {
  border-color: rgba(232, 160, 48, 0.5);
  color: var(--gold);
  background: var(--gold-glow);
}

/* =====================================================
   HERO ACTION BUTTONS
   ===================================================== */

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-base);
  border: 1px solid transparent;
  white-space: nowrap;
}

.hero-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.hero-btn-primary {
  background: var(--gold);
  color: #0a0808;
}

.hero-btn-primary:hover:not(:disabled) {
  background: var(--gold-lt);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 160, 48, 0.35);
}

.hero-btn-secondary {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-bright);
}

.hero-btn-secondary:hover:not(:disabled) {
  border-color: rgba(232, 160, 48, 0.5);
  color: var(--gold);
  background: var(--gold-glow);
}

.hero-btn-secondary.is-saved {
  border-color: rgba(232, 160, 48, 0.5);
  color: var(--gold);
  background: var(--gold-glow);
}

/* =====================================================
   WATCH PROVIDERS
   ===================================================== */

.providers-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.providers-label {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.provider-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.provider-logo:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* =====================================================
   TRAILER MODAL
   ===================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.modal-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--border-bright);
  color: var(--text-1);
  transform: rotate(90deg);
}

.modal-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
}

.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* =====================================================
   PERSON FILMOGRAPHY SECTION
   ===================================================== */

#personSection {
  padding-bottom: 44px;
  animation: fadeUp 0.4s ease both;
}

/* Filmography grid — overrides the flex carousel used by rec rows */
#personSection .rec-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  overflow-x: unset;
  padding-bottom: 0;
}

#personSection .rec-card {
  flex: unset;
  min-width: unset;
}

.person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 14px;
}

.person-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.person-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  flex-shrink: 0;
}

.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 1.3rem;
}

.person-name {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.person-role {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: 4px;
}

.person-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
}

.person-close-btn:hover {
  border-color: var(--border-bright);
  color: var(--text-2);
}

/* Clickable person names in hero credits */
.person-link {
  cursor: pointer;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  padding-bottom: 1px;
}

.person-link:hover {
  color: var(--gold);
  border-bottom-color: rgba(232, 160, 48, 0.4);
}

/* =====================================================
   CAROUSEL KEYBOARD FOCUS RING
   ===================================================== */

.rec-scroll:focus,
.search-row:focus {
  outline: 2px solid rgba(232, 160, 48, 0.5);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

/* =====================================================
   UTILITY
   ===================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =====================================================
   AUTH TRIGGER + USER WIDGET (fixed top-right)
   ===================================================== */

/* Shared base for both fixed icon buttons */
.auth-trigger,
.wl-trigger {
  position: fixed;
  top: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  color: var(--text-2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  box-shadow: var(--shadow-sm);
  z-index: 200;
}

.auth-trigger {
  right: 72px; /* sits left of the watchlist button */
}

.auth-trigger:hover {
  background: var(--bg-4);
  color: var(--indigo);
  border-color: var(--indigo-border);
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.2);
}

/* When logged in, avatar replaces the icon */
.auth-trigger.is-logged-in {
  background: var(--indigo-bg);
  border-color: var(--indigo-border);
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-trigger.is-logged-in:hover {
  background: rgba(129, 140, 248, 0.2);
}

/* User dropdown */
.user-dropdown {
  position: fixed;
  top: 72px;
  right: 72px;
  z-index: 300;
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-md);
  padding: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.18s ease both;
}

.user-dropdown[hidden] { display: none; }

.user-dropdown-name {
  padding: 6px 10px 10px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  display: none; /* using border on name instead */
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}

/* =====================================================
   WATCHLIST TRIGGER (fixed top-right)
   ===================================================== */

.wl-trigger {
  right: 20px;
}

.wl-trigger:hover {
  background: var(--bg-4);
  color: var(--gold);
  border-color: var(--gold-dim);
  box-shadow: 0 4px 16px rgba(232, 160, 48, 0.2);
}

.wl-trigger.has-items {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.wl-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--gold);
  color: #07070c;
  font-size: 0.68rem;
  font-weight: 900;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* =====================================================
   WATCHLIST DRAWER
   ===================================================== */

.wl-drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
}

.wl-drawer[hidden] {
  display: none;
}

.wl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wl-panel {
  position: relative;
  z-index: 1;
  width: clamp(300px, 90vw, 420px);
  height: 100%;
  background: var(--bg-1);
  border-left: 1px solid var(--border-bright);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  overflow: hidden;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0);    opacity: 1; }
}

.wl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.wl-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}

.wl-panel-title-wrap i {
  font-size: 1rem;
}

.wl-panel-title-wrap h2 {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.wl-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}

.wl-panel-close:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}

.wl-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}

.wl-panel-body::-webkit-scrollbar {
  width: 4px;
}

.wl-panel-body::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 2px;
}

/* Empty state */
.wl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 220px;
  color: var(--text-3);
  text-align: center;
  padding: 32px 24px;
}

.wl-empty i {
  font-size: 2.5rem;
  color: var(--bg-4);
}

.wl-empty p {
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Watchlist movie card */
.wl-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  animation: fadeUp 0.3s ease both;
}

.wl-card:hover {
  border-color: rgba(232, 160, 48, 0.4);
  background: var(--bg-3);
}

.wl-card-poster {
  flex-shrink: 0;
  width: 52px;
  height: 78px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-3);
}

.wl-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 1.1rem;
}

.wl-card-info {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.wl-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-card-year {
  font-size: var(--text-xs);
  color: var(--text-3);
}

.wl-card-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  margin-top: 2px;
}

.wl-card-remove:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--red);
}

.wl-clear-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.wl-clear-btn:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: var(--red);
}

.wl-foryou-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--r-sm);
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.wl-foryou-btn:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.wl-foryou-btn.loading {
  opacity: 0.65;
  pointer-events: none;
}

/* =====================================================
   AUTH MODAL
   ===================================================== */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-overlay[hidden] { display: none; }

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 40px);
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}

.auth-close:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1px solid var(--gold-ring);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 0 auto 16px;
}

.auth-title {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: var(--text-xs);
  color: var(--text-3);
  text-align: center;
  margin-bottom: 24px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: calc(var(--r-sm) - 2px);
  background: transparent;
  color: var(--text-3);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.auth-tab.is-active {
  background: var(--bg-4);
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}

/* Error banner */
.auth-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--r-sm);
  color: var(--red);
  font-size: var(--text-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: center;
}

.auth-error[hidden] { display: none; }

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-size: var(--text-sm);
  font-family: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.auth-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.auth-input::placeholder {
  color: var(--text-3);
}

.auth-hint {
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* Input + generate button row */
.auth-input-row {
  display: flex;
  gap: 8px;
}

.auth-input-row .auth-input {
  flex: 1;
  min-width: 0;
}

.auth-generate-btn {
  flex-shrink: 0;
  padding: 0 14px;
  background: var(--bg-4);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.auth-generate-btn:hover {
  background: var(--indigo-bg);
  border-color: var(--indigo-border);
  color: var(--indigo);
}

.auth-passphrase-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: var(--text-xs);
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-ring);
  border-radius: var(--r-xs);
  padding: 8px 11px;
  line-height: 1.4;
}

.auth-passphrase-hint[hidden] { display: none; }

.auth-passphrase-hint i {
  margin-top: 1px;
  flex-shrink: 0;
}

/* Submit button */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--gold);
  border: none;
  border-radius: var(--r-sm);
  color: #07070c;
  font-size: var(--text-sm);
  font-weight: 800;
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: var(--gold-lt);
  box-shadow: 0 4px 18px rgba(232, 160, 48, 0.4);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
