/* ============================================
   MOVIE RANDOMIZER — Blockbuster Theme
   ============================================ */

/* --- Google Fonts --- */
@font-face {
  font-family: 'ITC Machine Std';
  src: url('fonts/itc-machine-std-bold.otf') format('opentype');
}

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #001A57;
  --bg-secondary: #002377;
  --bg-card: #00319C;
  --bg-card-hover: #0040CC;
  --bg-input: #001240;

  --cream: #FFFFFF;
  --cream-dim: rgba(255, 255, 255, 0.7);
  --cream-faint: rgba(255, 255, 255, 0.35);

  --harvest-gold: #FFCC00;
  --mustard: #FFD633;
  --burnt-orange: #FF9900;
  --rust: #FFCC00;
  --avocado: #33CC33;
  --avocado-dim: rgba(51, 204, 51, 0.3);
  --teal-retro: #00CCFF;
  --brown-light: #001240;
  --warm-red: #FF0000;
  --sunset-pink: #FF0000;

  --gradient-retro: linear-gradient(135deg, #FFCC00, #FFD633);
  --gradient-warm: linear-gradient(135deg, #FFCC00, #FF9900);
  --gradient-sunset: linear-gradient(135deg, #FF9900, #FF0000);
  --gradient-groovy: linear-gradient(135deg, #002377, #00319C);

  --text-primary: var(--cream);
  --text-secondary: var(--cream-dim);
  --text-tertiary: var(--cream-faint);
  --text-accent: var(--harvest-gold);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  --shadow-retro: 4px 4px 0px rgba(0, 0, 0, 0.6);
  --shadow-retro-lg: 6px 6px 0px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(255, 204, 0, 0.3);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);

  --border-retro: 2px solid rgba(255, 255, 255, 0.1);
  --border-gold: 2px solid rgba(255, 204, 0, 0.3);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 76px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  background: var(--bg-primary);
  overscroll-behavior: none;
}

body {
  font-family: 'Verdana', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--safe-top);
}

/* Warm grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Warm ambient light spots */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(218, 165, 32, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(204, 85, 0, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(183, 65, 14, 0.03) 0%, transparent 60%);
  animation: warmGlow 15s ease-in-out infinite alternate;
}

@keyframes warmGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, -2%) scale(1.03); }
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input, textarea {
  font-family: 'Verdana', sans-serif;
  color: var(--cream);
  background: var(--bg-input);
  border: var(--border-retro);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--harvest-gold);
  box-shadow: 0 8px 32px rgba(0, 26, 87, 0.4);
}

input::placeholder, textarea::placeholder {
  color: var(--cream-faint);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- App Shell --- */
.app-container {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  z-index: 1;
}

/* --- Views --- */
.view {
  display: none;
  padding: 16px 16px calc(var(--nav-height) + var(--safe-bottom) + 16px);
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  animation: viewFadeIn 0.35s ease;
}

.view.active {
  display: block;
}

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

/* --- Header --- */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 8px;
}

.view-title {
  font-family: 'Verdana', sans-serif;
  font-size: 30px;
  color: var(--harvest-gold);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

.view-subtitle {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  color: var(--cream-dim);
  margin-top: 4px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: var(--border-retro);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 18px;
  box-shadow: var(--shadow-retro);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px #0d0805;
}

.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-secondary);
  border-top: 3px solid #0040CC;
  padding: 6px 12px calc(var(--safe-bottom) + 6px);
  display: flex;
  justify-content: space-around;
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 7px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-width: 52px;
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform var(--transition-bounce);
}

.nav-item .nav-label {
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: var(--cream-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color var(--transition-fast);
}

.nav-item.active {
  background: rgba(218, 165, 32, 0.1);
}

.nav-item.active .nav-icon {
  transform: scale(1.2);
}

.nav-item.active .nav-label {
  color: var(--harvest-gold);
}

.nav-item:active {
  transform: scale(0.9);
}

/* --- Retro Card --- */
.glass-card {
  background: var(--bg-card);
  border: var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-retro);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-retro-lg);
}

/* --- Movie Grid --- */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.movie-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-card);
  border: 4px solid #0040CC;
  box-shadow: var(--shadow-retro);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  cursor: pointer;
}

.movie-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

.movie-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: transform var(--transition-slow);
  /* Warm vintage filter */
  filter: sepia(0.08) saturate(1.1);
}

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

.movie-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 8px 8px;
  background: linear-gradient(to top, rgba(26, 15, 7, 0.95) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 20;
}

.movie-card:hover .card-overlay,
.movie-card.show-overlay .card-overlay {
  opacity: 1;
}

.card-overlay .card-title {
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cream);
}

.card-overlay .card-year {
  font-size: 10px;
  color: var(--harvest-gold);
  font-weight: 600;
}

/* Placeholder poster */
.movie-card .poster-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--bg-card), #4a3020);
  padding: 8px;
  text-align: center;
  border-radius: 4px;
}

.poster-placeholder .placeholder-icon {
  font-size: 28px;
  opacity: 0.5;
}

.poster-placeholder .placeholder-title {
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--cream-dim);
  line-height: 1.3;
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-pill {
  flex: 1;
  background: var(--bg-card);
  border: var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-retro);
}

.stat-pill .stat-number {
  font-family: 'Verdana', sans-serif;
  font-size: 28px;
  color: var(--harvest-gold);
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

.stat-pill .stat-label {
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* --- Social / Friends --- */
.username-setup-overlay {
  z-index: 6500;
}

.social-error {
  margin: 0 0 12px;
  color: var(--warm-red);
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.social-search-card {
  padding: 14px;
  margin-bottom: 22px;
  border: var(--border-retro);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-retro);
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.social-list:empty {
  margin-top: 0;
}

.social-person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  background: rgba(0, 26, 87, 0.56);
  box-shadow: 2px 2px 0 #0d0805;
  text-align: left;
}

.social-person-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.social-person-avatar,
.social-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid var(--harvest-gold);
  border-radius: 50%;
  background: var(--gradient-retro);
  color: var(--bg-primary);
  font-family: 'Verdana', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #0d0805;
}

.social-person-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.social-person-copy {
  min-width: 0;
  flex: 1;
}

.social-person-name {
  display: block;
  overflow: hidden;
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-person-handle {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-follow-mini {
  flex-shrink: 0;
  padding: 8px 10px;
  border: 2px solid var(--harvest-gold);
  border-radius: var(--radius-full);
  background: var(--harvest-gold);
  color: var(--bg-primary);
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.social-follow-mini.is-following {
  border-color: #0040CC;
  background: transparent;
  color: #fff;
}

.social-list-message {
  padding: 22px 12px;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.social-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.social-list-header h2 {
  color: var(--harvest-gold);
  font-family: 'Verdana', sans-serif;
  font-size: 18px;
}

.social-list-header p {
  margin-top: 4px;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
}

.social-list-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 2px solid #0040CC;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.18);
}

.social-list-tabs button {
  padding: 7px 9px;
  border-radius: var(--radius-full);
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.social-list-tabs button.active {
  background: var(--harvest-gold);
  color: var(--bg-primary);
}

.social-overlay {
  position: fixed;
  inset: 0;
  z-index: 4300;
  display: none;
  overflow-y: auto;
  padding: max(18px, var(--safe-top)) 14px max(24px, var(--safe-bottom));
  background: rgba(0, 12, 36, 0.96);
}

.social-overlay.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.social-sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: calc(100dvh - 42px);
  margin: 0 auto;
  padding: 52px 18px 28px;
  border: 3px solid #0040CC;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-retro-lg);
  text-align: center;
}

.social-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid #0040CC;
  border-radius: 50%;
  background: var(--bg-card);
  color: #fff;
}

.social-close svg {
  width: 19px;
  height: 19px;
}

.social-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  font-size: 30px;
}

.social-sheet h2 {
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 25px;
}

.social-handle {
  margin-top: 5px;
  color: var(--harvest-gold);
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
}

.social-profile-follow {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.social-profile-follow .action-btn {
  width: auto;
  min-width: 132px;
  justify-content: center;
}

.social-bio {
  max-width: 380px;
  min-height: 18px;
  margin: 12px auto 0;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.social-counts {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 20px 0;
}

.social-counts button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 78px;
}

.social-counts strong {
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 19px;
}

.social-counts span {
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.social-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}

.social-stats-grid > div {
  padding: 14px 5px;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.social-stats-grid strong,
.social-stats-grid span {
  display: block;
  font-family: 'Verdana', sans-serif;
}

.social-stats-grid strong {
  color: var(--harvest-gold);
  font-size: 24px;
}

.social-stats-grid span {
  margin-top: 5px;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.social-profile-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 2px solid #0040CC;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.18);
}

.social-profile-tabs button {
  padding: 10px 8px;
  border-radius: var(--radius-full);
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.social-profile-tabs button.active {
  background: var(--harvest-gold);
  color: var(--bg-primary);
  box-shadow: 2px 2px 0 #0d0805;
}

.social-connection-panel,
.social-comparison-panel,
.social-watched-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid #0040CC;
  text-align: left;
}

.social-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--harvest-gold);
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
}

.social-panel-link {
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comparison-table {
  overflow: hidden;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(0, 64, 204, 0.65);
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  text-align: center;
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-row.header {
  background: rgba(0, 64, 204, 0.3);
  color: #fff;
  font-weight: 700;
}

.comparison-row span:first-child {
  text-align: left;
}

.shared-movies,
.profile-watched-movies {
  margin-top: 18px;
}

.shared-movies h4,
.profile-watched-movies h4 {
  margin: 14px 0 8px;
  color: var(--harvest-gold);
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
}

.profile-watched-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-artwork-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(0, 64, 204, 0.8);
  border-radius: var(--radius-md);
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
}

.profile-artwork-status .spinner {
  width: 17px;
  height: 17px;
}

.profile-movie-card {
  overflow: hidden;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 3px 3px 0 #0d0805;
}

.profile-movie-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-input);
}

.profile-movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-movie-poster-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: var(--cream-faint);
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  text-align: center;
}

.profile-movie-poster-placeholder svg {
  width: 28px;
  height: 28px;
}

.profile-movie-info {
  padding: 9px;
}

.profile-movie-title {
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.profile-movie-meta,
.profile-movie-credits,
.profile-movie-date {
  margin-top: 4px;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 9px;
  line-height: 1.35;
}

.profile-movie-meta {
  color: var(--harvest-gold);
}

.profile-movie-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.profile-movie-ratings span {
  padding: 3px 5px;
  border-radius: var(--radius-full);
  background: rgba(0, 64, 204, 0.28);
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 8px;
}

.profile-movie-date {
  color: var(--cream-faint);
}

.shared-movie-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.shared-movie-chip {
  padding: 7px 9px;
  border: 1px solid #0040CC;
  border-radius: var(--radius-full);
  background: rgba(0, 64, 204, 0.2);
  color: #fff;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
}

.social-toggle-row {
  cursor: pointer;
}

.social-toggle-row input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--harvest-gold);
}

/* --- PICK A MOVIE Button --- */
.pick-btn-container {
  position: sticky;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  z-index: 100;
  padding: 0 4px;
  margin-top: 24px;
}

.pick-btn {
  width: 100%;
  padding: 20px 32px;
  font-family: 'Verdana', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--bg-primary);
  background: var(--gradient-retro);
  border: 4px solid #8b6914;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  box-shadow: 
    var(--shadow-retro-lg),
    0 0 30px rgba(218, 165, 32, 0.15);
  transition: all var(--transition-fast);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pick-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.pick-btn:hover::before {
  left: 140%;
}

.pick-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 
    2px 2px 0px #0d0805,
    0 0 20px rgba(218, 165, 32, 0.1);
}

.pick-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.pick-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pick-btn .dice-icon {
  font-size: 26px;
  animation: diceWobble 2.5s ease-in-out infinite;
}

@keyframes diceWobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-12deg) scale(1.1); }
  40% { transform: rotate(10deg) scale(1); }
  60% { transform: rotate(-6deg) scale(1.05); }
  80% { transform: rotate(4deg) scale(1); }
}

/* --- Slot Machine Overlay --- */
.spin-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(26, 15, 7, 0.95);
}

.spin-overlay.active {
  display: flex;
}

.spin-container {
  width: 200px;
  height: 300px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  position: relative;
  border: 4px solid var(--harvest-gold);
  box-shadow: 
    var(--shadow-retro-lg),
    0 0 40px rgba(218, 165, 32, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.spin-container::before,
.spin-container::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  z-index: 10;
  pointer-events: none;
}

.spin-container::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(26, 15, 7, 0.9), transparent);
}

.spin-container::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(26, 15, 7, 0.9), transparent);
}

.spin-track {
  display: flex;
  flex-direction: column;
  transition: transform 3.5s cubic-bezier(0.15, 0.85, 0.25, 1);
}

.spin-track.is-loading {
  animation: spinLoading 1.4s linear infinite;
  transition: none;
}

@keyframes spinLoading {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--loading-spin-distance))); }
}

.spin-card {
  width: 200px;
  height: 300px;
  flex-shrink: 0;
  overflow: hidden;
}

.spin-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.08) saturate(1.1);
}

.spin-card .poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card), #4a3020);
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream-dim);
  text-align: center;
  padding: 20px;
}

.spin-label {
  margin-top: 32px;
  font-family: 'ITC Machine Std', sans-serif;
  font-size: 22px;
  text-align: center;
  color: var(--harvest-gold);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  line-height: 1.2;
  animation: pulseText 0.8s ease-in-out infinite alternate;
}

@keyframes pulseText {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* --- Result Screen --- */
.result-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  display: none;
  background: var(--bg-primary);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.result-overlay.active {
  display: block;
  animation: resultSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resultSlideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.result-content {
  max-width: 430px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 16px) 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  width: 100%;
}

.result-poster-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.result-poster {
  width: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-retro-lg), var(--shadow-glow);
  border: 4px solid #0040CC;
  aspect-ratio: 2/3;
  background: var(--bg-card);
}

.result-poster.is-clickable {
  cursor: zoom-in;
}

.result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.05) saturate(1.1);
}

.result-title {
  font-family: 'ITC Machine Std', sans-serif;
  font-size: 24px;
  text-align: center;
  color: var(--cream);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
  text-transform: uppercase;
  line-height: 1.2;
}

.result-year {
  text-align: center;
  color: var(--harvest-gold);
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-tag {
  background: var(--bg-card);
  border: 2px solid #0040CC;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--cream-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 2px 2px 0px #0d0805;
}

.meta-tag .meta-icon {
  font-size: 13px;
}

/* Ratings */
.result-ratings {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.rating-item {
  text-align: center;
  background: var(--bg-card);
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-retro);
}

.rating-value {
  font-family: 'Verdana', sans-serif;
  font-size: 18px;
}

.rating-value.imdb { color: var(--harvest-gold); }
.rating-value.rt { color: var(--burnt-orange); }
.rating-value.meta { color: var(--teal-retro); }

.rating-label {
  font-family: 'Verdana', sans-serif;
  font-size: 9px;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Synopsis */
.result-synopsis {
  background: var(--bg-card);
  border: var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-retro);
}

.result-synopsis h3 {
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--harvest-gold);
  margin-bottom: 8px;
}

.result-synopsis p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream-dim);
}

/* Action Buttons */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.action-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
}

.action-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

.action-btn.primary {
  background: var(--gradient-retro);
  color: var(--bg-primary);
  border: 3px solid #CCAA00;
  text-shadow: none;
}

.action-btn.secondary {
  background: var(--bg-card);
  border: var(--border-retro);
  color: var(--cream);
}

.action-btn.tertiary {
  background: var(--avocado-dim);
  border: 2px solid var(--avocado);
  color: var(--avocado);
}

.action-btn .btn-icon {
  font-size: 18px;
}

/* --- Add Movies View --- */
.add-section {
  margin-bottom: 28px;
}

.add-section .section-title {
  font-family: 'Verdana', sans-serif;
  font-size: 17px;
  color: var(--harvest-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  padding-left: 44px;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--cream-faint);
}

.watchlist-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.watchlist-search {
  flex: 1 1 auto;
  min-width: 0;
}

.watchlist-search input {
  height: 44px;
  border: 3px solid #0040CC;
  box-shadow: var(--shadow-retro);
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 44px;
}

.watchlist-search input:focus {
  border-color: var(--harvest-gold);
}

.watchlist-filters {
  flex: 0 0 44px;
  display: flex;
}

#viewWatchlist .movie-grid {
  margin-top: 8px;
}

.genre-filter-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--cream-dim);
  box-shadow: var(--shadow-retro);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.genre-filter-control > svg {
  width: 20px;
  height: 20px;
  color: var(--harvest-gold);
  flex: 0 0 auto;
}

.genre-filter-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.genre-filter-control select:focus {
  outline: none;
}

.genre-filter-control:has(select:focus-visible) {
  outline: 2px solid var(--harvest-gold);
  outline-offset: 2px;
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border-radius: var(--radius-full);
  background: rgba(255, 204, 0, 0.14);
  color: var(--harvest-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.search-clear-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.watchlist-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-item .sr-click-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.search-result-item img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid #0040CC;
  flex-shrink: 0;
}

.search-result-item .sr-info {
  flex: 1;
  min-width: 0;
}

.search-result-item .sr-title {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .sr-year {
  font-size: 12px;
  color: var(--harvest-gold);
  font-weight: 500;
}

.sr-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.search-result-item .sr-add {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(218, 165, 32, 0.15);
  border: 2px solid var(--harvest-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--harvest-gold);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-result-item .sr-add:hover {
  background: var(--harvest-gold);
  color: var(--bg-primary);
}

.search-result-item .sr-add.sr-watched {
  background: rgba(100, 180, 255, 0.12);
  border-color: var(--link-blue, #64b4ff);
  color: var(--link-blue, #64b4ff);
  font-size: 15px;
  font-weight: 400;
}

.search-result-item .sr-add.sr-watched:hover {
  background: var(--link-blue, #64b4ff);
  color: var(--bg-primary);
}

/* Daily recommendations */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row .section-title {
  margin-bottom: 0;
}

.mini-icon-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: var(--harvest-gold);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.recommendation-card {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 7px;
  border: 2px solid #0040CC;
  background: var(--bg-input);
  cursor: pointer;
  box-shadow: var(--shadow-retro);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.recommendation-card:hover {
  border-color: var(--harvest-gold);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.65);
}

.recommendation-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

.recommendation-card.is-added {
  cursor: default;
  opacity: 0.72;
}

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

.recommendation-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.08));
  mix-blend-mode: screen;
}

.recommendation-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 6px 7px;
  background: linear-gradient(to top, rgba(0, 18, 64, 0.96), rgba(0, 18, 64, 0));
}

.recommendation-title {
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommendation-year {
  font-size: 10px;
  color: var(--harvest-gold);
  font-weight: 700;
  margin-top: 2px;
}

.recommendation-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.recommendation-add {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--harvest-gold);
  border: 3px solid #001240;
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.recommendation-add:hover {
  transform: scale(1.12);
}

.recommendation-add.is-added {
  background: var(--avocado);
  color: #fff;
}

.recommendation-add.sr-watched {
  background: var(--link-blue, #64b4ff);
  font-size: 14px;
  font-weight: 400;
}

.recommendation-add.sr-watched:hover {
  background: #8ccfff;
}

.recommendations-loading,
.recommendations-message {
  grid-column: 1 / -1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--cream-dim);
  font-size: 13px;
  text-align: center;
}

/* File upload area */
.upload-area {
  border: 3px dashed #0040CC;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-card);
}

.upload-area:hover {
  border-color: var(--harvest-gold);
  background: var(--bg-card-hover);
}

.upload-area .upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.upload-area .upload-text {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  color: var(--cream-dim);
  font-weight: 500;
}

.upload-area .upload-hint {
  font-size: 12px;
  color: var(--cream-faint);
  margin-top: 4px;
}

/* Text paste */
.paste-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.small-btn {
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
}

.small-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

.small-btn.primary {
  background: var(--gradient-retro);
  color: var(--bg-primary);
  border: 2px solid #8b6914;
}

.small-btn.ghost {
  background: var(--bg-card);
  border: var(--border-retro);
  color: var(--cream);
}

/* --- Settings View --- */
.settings-group {
  margin-bottom: 28px;
}

.settings-group .group-title {
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--harvest-gold);
  margin-bottom: 12px;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: var(--border-retro);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-retro);
}

.setting-item .setting-label {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}

.setting-item .setting-desc {
  font-size: 12px;
  color: var(--cream-dim);
  margin-top: 2px;
}

.setting-item input[type="text"] {
  max-width: 200px;
  padding: 8px 12px;
  font-size: 13px;
}

.danger-btn {
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: rgba(192, 57, 43, 0.15);
  border: 3px solid var(--warm-red);
  color: var(--warm-red);
  width: 100%;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
}

.danger-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
  background: rgba(192, 57, 43, 0.25);
}

.settings-delete-account-btn {
  margin-top: 2px;
}

.tmdb-attribution {
  display: inline-flex;
  max-width: 120px;
  margin: 2px 0 10px;
}

.tmdb-attribution img {
  width: 100%;
  height: auto;
}

.attribution-copy {
  margin: 0 0 10px;
  color: var(--cream-dim);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

.attribution-copy a,
.settings-policy-link {
  color: var(--link-blue, #64b4ff);
}

.settings-policy-link {
  display: inline-flex;
  margin-top: 3px;
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.settings-privacy-footer {
  margin: 4px 0 28px;
  padding: 20px 18px;
  border: 2px solid rgba(100, 180, 255, 0.45);
  border-radius: var(--radius-md);
  background: rgba(100, 180, 255, 0.08);
  color: var(--cream-dim);
  text-align: center;
}

.settings-privacy-footer > svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: var(--link-blue, #64b4ff);
}

.settings-privacy-footer p {
  margin: 0 auto 16px;
  max-width: 520px;
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.privacy-policy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

.privacy-policy-button svg {
  width: 14px;
  height: 14px;
}

.delete-account-content {
  max-width: 460px;
}

.danger-icon {
  color: var(--warm-red);
}

.delete-account-error {
  margin: 14px 0 0;
  color: #ff8c80;
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.delete-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.delete-account-actions > button {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

@media (max-width: 390px) {
  .delete-account-actions { grid-template-columns: 1fr; }
}

/* --- Install App Prompt --- */
.install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--nav-height) + 12px);
  z-index: 4200;
  width: min(calc(100% - 24px), 406px);
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 3px solid var(--harvest-gold);
  box-shadow: var(--shadow-retro-lg), 0 0 26px rgba(255, 204, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease, visibility 0.18s ease;
}

.install-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.install-banner-close {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 2px solid var(--harvest-gold);
  color: var(--cream);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.install-banner-close svg {
  width: 14px;
  height: 14px;
}

.install-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-retro);
  color: var(--bg-primary);
  border: 2px solid #8b6914;
}

.install-banner-title {
  font-family: 'Verdana', sans-serif;
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
}

.install-banner-desc {
  color: var(--cream-dim);
  font-size: 12px;
  line-height: 1.3;
}

.install-banner-btn {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--gradient-retro);
  border: 2px solid #8b6914;
  color: var(--bg-primary);
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 6100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 18px);
  background: rgba(0, 8, 34, 0.78);
  backdrop-filter: blur(8px);
}

.install-modal.active {
  display: flex;
}

.install-sheet {
  position: relative;
  width: min(100%, 390px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 26px 20px 20px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(0, 64, 204, 0.2), transparent 34%),
    var(--bg-secondary);
  border: 3px solid var(--harvest-gold);
  box-shadow: var(--shadow-retro-lg), 0 0 34px rgba(255, 204, 0, 0.18);
}

.install-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background: var(--bg-input);
  border: 2px solid #0040CC;
}

.install-modal-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--bg-primary);
  background: var(--gradient-retro);
  border: 3px solid #8b6914;
  box-shadow: var(--shadow-retro);
}

.install-modal h2 {
  font-family: 'Verdana', sans-serif;
  font-size: 24px;
  color: var(--harvest-gold);
  margin-bottom: 8px;
}

.install-modal p {
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.install-steps li {
  counter-increment: install-step;
  position: relative;
  min-height: 42px;
  padding: 11px 12px 11px 48px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 2px solid #0040CC;
  color: var(--cream);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: 11px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--harvest-gold);
  color: var(--bg-primary);
  font-weight: 800;
}

.install-hint {
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 204, 0, 0.1);
  border: 2px solid rgba(255, 204, 0, 0.28);
  color: var(--cream-dim);
  font-size: 12px;
  line-height: 1.45;
}

.install-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Setup Screen --- */
.setup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 3000;
  display: none;
  background: var(--bg-primary);
  overflow-y: auto;
}

.setup-overlay.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.setup-content {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.setup-icon {
  margin-bottom: 12px;
  animation: setupBounce 2s ease-in-out infinite;
  display: flex;
  justify-content: center;
}

.lucide-hero {
  width: 96px;
  height: 96px;
  stroke-width: 1.5;
  color: var(--harvest-gold);
}

@keyframes setupBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(-3deg); }
  75% { transform: translateY(-4px) rotate(3deg); }
}

.setup-title {
  font-family: 'Verdana', sans-serif;
  font-size: 36px;
  color: var(--harvest-gold);
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
}

.setup-desc {
  font-family: 'Verdana', sans-serif;
  font-size: 15px;
  color: var(--cream-dim);
  margin-bottom: 36px;
  line-height: 1.6;
}

.setup-field {
  text-align: left;
  margin-bottom: 20px;
}

.setup-field label {
  display: block;
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--cream-dim);
}

.setup-field .field-hint {
  font-size: 12px;
  color: var(--cream-faint);
  margin-top: 8px;
  line-height: 1.5;
}

.setup-field .field-hint a {
  color: var(--harvest-gold);
  text-decoration: none;
  border-bottom: 1px dashed var(--harvest-gold);
}

.setup-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 2px solid #0040CC;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  font-family: 'Verdana', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--cream-dim);
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--harvest-gold);
  border-color: var(--harvest-gold);
  box-shadow: 2px 2px 0px #0d0805;
}


.setup-btn {
  padding: 18px;
  border-radius: var(--radius-lg);
  font-family: 'Verdana', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  background: var(--gradient-retro);
  color: var(--bg-primary);
  border: 3px solid #8b6914;
  box-shadow: var(--shadow-retro-lg);
  transition: all var(--transition-fast);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.setup-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0px #0d0805;
}

.setup-skip {
  padding: 14px;
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  color: var(--cream-faint);
  transition: color var(--transition-fast);
}

.setup-skip:hover {
  color: var(--cream);
}

/* --- First-time Onboarding --- */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: max(24px, var(--safe-top)) 20px max(24px, var(--safe-bottom));
  background:
    radial-gradient(circle at 50% 8%, rgba(0, 204, 255, 0.18), transparent 35%),
    var(--bg-primary);
}

.onboarding-overlay.active {
  display: flex;
  animation: onboardingFadeIn 0.3s ease both;
}

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

.onboarding-content {
  width: min(100%, 430px);
  padding: 30px 24px 26px;
  text-align: center;
  background: var(--bg-secondary);
  border: 3px solid #0040CC;
  border-radius: var(--radius-xl);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.55);
}

.onboarding-kicker {
  margin-bottom: 14px;
  color: var(--teal-retro);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.onboarding-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--harvest-gold);
}

.onboarding-icon svg {
  width: 64px;
  height: 64px;
  stroke-width: 1.7;
}

.onboarding-content > h1 {
  margin-bottom: 8px;
  color: var(--harvest-gold);
  font-family: 'ITC Machine Std', sans-serif;
  font-size: clamp(30px, 9vw, 40px);
  line-height: 1;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.onboarding-intro {
  max-width: 340px;
  margin: 0 auto 24px;
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.55;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: rgba(0, 18, 64, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.onboarding-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--harvest-gold);
  background: var(--bg-card);
  border-radius: 50%;
}

.onboarding-step-icon svg {
  width: 22px;
  height: 22px;
}

.onboarding-step h2 {
  margin-bottom: 2px;
  color: var(--cream);
  font-size: 14px;
}

.onboarding-step p {
  color: var(--cream-dim);
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 17px 20px;
  color: var(--bg-primary);
  background: var(--gradient-retro);
  border: 3px solid #8b6914;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-retro-lg);
  font-family: 'ITC Machine Std', sans-serif;
  font-size: 17px;
  letter-spacing: 0.4px;
}

.onboarding-button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #0d0805;
}

.onboarding-button svg {
  width: 19px;
  height: 19px;
}

@media (max-height: 700px) {
  .onboarding-overlay {
    align-items: flex-start;
  }

  .onboarding-content {
    padding-top: 22px;
  }

  .onboarding-icon svg {
    width: 48px;
    height: 48px;
  }
}

/* --- Watched Search Section --- */
.watched-search-section {
  margin-bottom: 20px;
  padding: 0 16px;
}

.watched-search-section .search-results {
  margin-top: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.watched-search-section .sr-add.is-added {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--avocado);
  color: var(--avocado);
}

/* --- Watched Movie Card --- */
.watched-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-card);
  border: var(--border-retro);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-retro);
  transition: all var(--transition-fast);
}

.watched-card:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px #0d0805;
}

.watched-card .wc-poster {
  width: 50px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 2px solid #0040CC;
}

.watched-card .wc-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.05);
}

.watched-card .wc-info {
  flex: 1;
  min-width: 0;
}

.watched-card .wc-title {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cream);
}

.watched-card .wc-year {
  font-size: 12px;
  color: var(--harvest-gold);
  font-weight: 500;
}

.watched-card .wc-date {
  font-size: 11px;
  color: var(--cream-faint);
  margin-top: 3px;
}

.watched-card .wc-actions {
  display: flex;
  gap: 6px;
}

.watched-card .wc-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 2px solid #0040CC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition-fast);
  box-shadow: 2px 2px 0px #0d0805;
}

.watched-card .wc-action-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0px #0d0805;
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  z-index: 5000;
  background: var(--bg-card);
  border: 3px solid var(--harvest-gold);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-retro-lg), var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
  max-width: calc(100% - 32px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}

.toast .toast-icon {
  font-size: 18px;
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(218, 165, 32, 0.2);
  border-top-color: var(--harvest-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .empty-icon {
  font-size: 60px;
  margin-bottom: 16px;
  animation: setupBounce 3s ease-in-out infinite;
}

.empty-state .empty-title {
  font-family: 'Verdana', sans-serif;
  font-size: 22px;
  color: var(--harvest-gold);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
}

.empty-state .empty-desc {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  color: var(--cream-dim);
  line-height: 1.6;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #0040CC;
  border-radius: 3px;
}

/* --- Movie Detail Bottom Sheet --- */
.detail-sheet {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1500;
  display: none;
}

.detail-sheet.active {
  display: block;
}

.detail-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

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

.detail-panel {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  max-height: 80vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 3px solid #0040CC;
  border-bottom: none;
  overflow-y: auto;
  animation: sheetSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 8px 20px 32px;
}

@keyframes sheetSlideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

.detail-handle {
  width: 40px;
  height: 5px;
  background: #0040CC;
  border-radius: 3px;
  margin: 8px auto 20px;
}

.detail-header {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-poster-sm {
  width: 80px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 3px solid #0040CC;
  box-shadow: var(--shadow-retro);
}

.detail-poster-sm.is-clickable {
  cursor: zoom-in;
}

.detail-poster-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h2 {
  font-family: 'Verdana', sans-serif;
  font-size: 20px;
  color: var(--cream);
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}

.detail-info .di-meta {
  font-family: 'Verdana', sans-serif;
  font-size: 13px;
  color: var(--cream-dim);
  line-height: 1.6;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.detail-actions .action-btn {
  flex: 1;
  padding: 12px;
  font-size: 13px;
}

/* --- Utility --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* --- Poster Zoom --- */
.poster-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 18px);
  background: rgba(0, 12, 36, 0.92);
}

.poster-zoom-overlay.active {
  display: flex;
  animation: fadeIn 0.18s ease;
}

.poster-zoom-overlay img {
  max-width: min(92vw, 430px);
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 56px);
  border-radius: var(--radius-lg);
  border: 4px solid #0040CC;
  box-shadow: var(--shadow-retro-lg), var(--shadow-glow);
  object-fit: contain;
}

.poster-zoom-close {
  position: fixed;
  top: calc(var(--safe-top) + 14px);
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: var(--border-retro);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-retro);
  z-index: 7001;
}

/* --- Loading screen --- */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 32px;
  background: var(--bg-primary);
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay.fade-out {
  animation: fadeOut 0.6s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* ---- Film Projector SVG ---- */
.projector-svg {
  width: 260px;
  height: auto;
  opacity: 0.85;
}

.reel-spin {
  animation: reelSpin 2.5s linear infinite;
}

@keyframes reelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Loading text */
.loading-overlay .loading-text {
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
  color: var(--cream-dim);
  text-align: center;
  letter-spacing: 0.5px;
  max-width: 260px;
  line-height: 1.5;
}

/* ---- Profile / Welcome styles ---- */
.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
}

.radio-option:has(input:checked) {
  border-color: var(--harvest-gold);
  background: rgba(218, 165, 32, 0.08);
}

.radio-option input[type="radio"] {
  accent-color: var(--harvest-gold);
  width: 18px;
  height: 18px;
}

.radio-label {
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  color: var(--cream);
  font-weight: 500;
}

.existing-profiles {
  margin-top: 24px;
}

.profiles-divider {
  text-align: center;
  position: relative;
  margin-bottom: 16px;
}

.profiles-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #0040CC;
}

.profiles-divider span {
  background: var(--bg-card);
  padding: 0 16px;
  position: relative;
  font-family: 'Verdana', sans-serif;
  font-size: 12px;
  color: var(--cream-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid #0040CC;
  border-radius: var(--radius-md);
  font-family: 'Verdana', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-retro);
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-btn:hover {
  border-color: var(--harvest-gold);
  background: var(--bg-card-hover);
}

.profile-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0d0805;
}

.profile-btn .profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-retro);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bg-primary);
  font-weight: 700;
  flex-shrink: 0;
}

.profile-btn .profile-meta {
  font-size: 11px;
  color: var(--cream-faint);
  font-weight: 400;
}

/* --- Desktop Layout --- */
@media (min-width: 900px) {
  :root {
    --nav-height: 0px;
  }

  body {
    padding-top: 0;
  }

  .app-container {
    max-width: 1180px;
    padding-left: 184px;
  }

  .view {
    padding: 48px 32px;
  }

  #viewWatchlist,
  #viewWatched,
  #viewAdd,
  #viewSocial {
    max-width: 960px;
    margin: 0 auto;
  }

  #viewSettings {
    max-width: 760px;
    margin: 0 auto;
  }

  .view-header {
    padding-top: 0;
    margin-bottom: 28px;
  }

  .view-title {
    font-size: 36px;
  }

  .view-subtitle {
    font-size: 15px;
  }

  .bottom-nav {
    top: 48px;
    bottom: auto;
    left: max(24px, calc((100vw - 1180px) / 2 + 24px));
    transform: none;
    width: 148px;
    max-width: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px;
    border: 3px solid #0040CC;
    border-radius: var(--radius-lg);
    background: rgba(0, 35, 119, 0.94);
    box-shadow: var(--shadow-retro-lg);
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .nav-item .nav-icon {
    display: flex;
    font-size: 20px;
  }

  .nav-item.active .nav-icon {
    transform: scale(1.08);
  }

  .nav-item .nav-label {
    font-size: 11px;
  }

  .stats-bar {
    max-width: 760px;
    gap: 16px;
    margin-bottom: 24px;
  }

  .stat-pill {
    padding: 18px;
  }

  .stat-pill .stat-number {
    font-size: 34px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 18px;
  }

  .pick-btn-container {
    bottom: 24px;
    max-width: 560px;
    margin: 32px auto 0;
    padding: 0;
  }

  .pick-btn {
    padding: 18px 28px;
  }

  #watchedList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .watched-card {
    margin-bottom: 0;
  }

  #viewAdd .add-section {
    max-width: 760px;
  }

  #viewAdd .recommendations-section {
    max-width: 900px;
  }

  .recommendations-grid {
    gap: 12px;
  }

  .recommendation-title {
    font-size: 12px;
  }

  .recommendation-year {
    font-size: 11px;
  }

  .recommendation-add {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .settings-group {
    margin-bottom: 34px;
  }

  .setting-item {
    padding: 16px 18px;
  }

  .setting-item input[type="text"] {
    max-width: 320px;
  }

  .result-content {
    max-width: 760px;
    padding: 48px 32px;
  }

  .result-poster {
    width: 230px;
  }

  .detail-panel {
    bottom: 48px;
    max-width: 560px;
    max-height: calc(100vh - 96px);
    border-radius: var(--radius-xl);
    border-bottom: 3px solid #0040CC;
  }

  .poster-zoom-overlay img {
    max-width: min(82vw, 560px);
  }

  .install-banner {
    left: auto;
    right: 32px;
    bottom: 24px;
    width: 380px;
    transform: translateY(140%);
  }

  .install-banner.show {
    transform: translateY(0);
  }
}

@media (min-width: 1300px) {
  .app-container {
    max-width: 1320px;
    padding-left: 210px;
  }

  .bottom-nav {
    left: max(32px, calc((100vw - 1320px) / 2 + 32px));
    width: 164px;
  }

  #viewWatchlist,
  #viewWatched,
  #viewAdd,
  #viewSocial {
    max-width: 1080px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* --- Retro decorative star burst (on pick button) --- */
@keyframes starBurst {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  100% { transform: scale(2) rotate(180deg); opacity: 0; }
}


/* --- Typography Overrides --- */
.view-title,
.stat-number,
.result-title,
.rating-value,
.result-synopsis h3,
.add-section .section-title,
.settings-group .group-title,
.setup-title,
.empty-state .empty-title,
.detail-info h2,
.loading-overlay .loading-text,
.pick-btn,
.action-btn {
  font-family: 'ITC Machine Std', sans-serif !important;
}


/* --- Unreleased Overlay --- */
.unreleased-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 19, 37, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  overflow: hidden;
  border-radius: inherit;
}

.unreleased-overlay span {
  font-family: 'ITC Machine Std', sans-serif !important;
  color: var(--harvest-gold);
  font-size: 23px;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-10deg);
  white-space: nowrap;
  opacity: 0.95;
  max-width: calc(100% - 16px);
  text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}
