/* ==================================================================
   COMPONENTS — step 1 only: avatar button, login card, sign-in
   modal, toast, account page.

   NEXT STEPS will append to this same file:
   - poster cards (movies/shows) + sport thumbs + competition posters
   - the popup frame used to open any movie/show/event/competition
   - stars, filter chips, rating blocks
   ================================================================== */

.icon-btn{ background: none; border:none; cursor:pointer; font-size: 18px; line-height:1; padding:6px; }

/* ---------- Round account button (always visible, top-right) ---------- */
.avatar-btn{
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  background: var(--gold-bright); color: #2a1610; border: none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size: 15px; font-weight: 700;
}

.empty-state{ text-align:center; padding: 46px 20px; color: var(--ink-soft); font-size: 14px; }
.empty-state .big-emoji{ font-size: 36px; display:block; margin-bottom:12px; opacity:.7; }

/* ---------- Login screen ---------- */
.login-screen .logo{ font-size:44px; margin-bottom:8px; }
.login-screen h1{ font-size: 38px; margin: 0 0 4px; font-family:'Bodoni Moda',serif; font-weight:600; color: var(--marquee-ink); letter-spacing:0.01em; }
.login-card{
  width:100%; max-width: 340px; background: var(--bg-elevated); border: 1px solid var(--divider);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
}
.magic-input{
  width:100%; padding: 11px 12px; border-radius:8px; border:1px solid var(--divider);
  background: var(--bg); color:var(--ink); margin-bottom:10px;
}
.magic-btn{
  width:100%; background: var(--velvet); color:#fdf6ea; border:none;
  border-radius:8px; padding:12px; font-weight:700; font-size:15px; cursor:pointer;
}
.magic-btn[disabled]{ opacity:.6; cursor:not-allowed; }
.auth-note, .auth-hint{ font-size:12.5px; color: var(--ink-soft); margin-top:12px; min-height: 18px; line-height:1.5; }
.auth-error{ color:#c0392b; }

/* ---------- Sign-in modal (used to require sign-in mid-app, e.g. from Sport) ---------- */
#authOverlay{
  position: fixed; inset: 0; background: rgba(21,13,12,0.55); backdrop-filter: blur(3px);
  display:flex; align-items:flex-end; justify-content:center; z-index: 80;
}
#authOverlay[hidden]{ display:none; }
.auth-sheet{
  background: var(--bg-elevated); width:100%; max-width: 420px; border-radius: 20px 20px 0 0;
  border: 1px solid var(--divider); border-bottom:none; padding: 24px 22px calc(28px + env(safe-area-inset-bottom));
  position:relative; box-shadow: var(--shadow);
}
@media (min-width: 520px){
  #authOverlay{ align-items:center; }
  .auth-sheet{ border-radius: 20px; border-bottom: 1px solid var(--divider); }
}
.auth-close{
  position:absolute; top:14px; right:14px; width:32px; height:32px; border-radius:50%;
  border:1px solid var(--divider); background: var(--bg); color: var(--ink); font-size:14px; cursor:pointer;
}
.auth-logo{ font-size:22px; margin-bottom:14px; color: var(--ink); }
.auth-reason{ font-size:14px; color: var(--ink-soft); margin: 0 0 18px; line-height:1.5; }
.auth-input-row input{
  width:100%; padding:12px; border-radius:10px; border:1px solid var(--divider);
  background: var(--bg); color:var(--ink); margin-bottom:10px;
}
.auth-btn{ width:100%; padding:13px; border-radius:10px; font-weight:700; font-size:14px; border:none; cursor:pointer; }
.auth-btn.primary{ background: var(--velvet); color:#fdf6ea; }
.auth-btn.google{ background: var(--bg); border:1px solid var(--divider); color: var(--ink); margin-top:10px; }
.auth-or{ display:flex; align-items:center; gap:10px; margin:14px 0; color: var(--ink-soft); font-size:12px; }
.auth-or::before, .auth-or::after{ content:""; flex:1; height:1px; background: var(--divider); }

/* ---------- Account page ---------- */
.account-card{
  background: var(--bg-elevated); border: 1px solid var(--divider); border-radius: 16px;
  padding: 20px; text-align:center; margin-top: 10px;
}
.account-avatar{
  width:64px; height:64px; border-radius:50%; background: var(--gold-bright); color:#2a1610;
  display:flex; align-items:center; justify-content:center; font-size: 26px; font-weight:700;
  margin: 0 auto 14px;
}
.account-email{ font-size:14px; color: var(--ink-soft); margin-bottom: 20px; word-break: break-all; }
.signout-btn{
  width:100%; background: none; border: 1px solid var(--velvet); color: var(--velvet);
  border-radius:10px; padding:12px; font-weight:700; font-size:14px; cursor:pointer;
}
.app-version{ text-align:center; font-size:11px; color: var(--ink-soft); opacity:.6; margin-top: 18px; font-family:'IBM Plex Mono',monospace; }

/* ---------- Toast ---------- */
.toast{
  position: fixed; left:50%; bottom: 84px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 24px; font-size:13px; font-weight:600;
  opacity:0; pointer-events:none; transition: all .25s ease; z-index: 50; box-shadow: var(--shadow); max-width: 90%; text-align:center;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* ==================================================================
   STEP 2 additions — posters, show rows, rating widgets, popup frame.
   ================================================================== */

.order-toggle{
  background: var(--bg-elevated); border: 1px solid var(--divider); color: var(--ink-soft);
  border-radius: 20px; padding: 6px 13px; font-size: 12px; font-weight:600; cursor:pointer;
}

/* ---------- Posters — 3 per row, everywhere ---------- */
.poster-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.poster{
  position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; cursor:pointer;
  box-shadow: var(--shadow); color:#fdfdfb; display:flex; align-items:flex-end;
  background: var(--p-color, var(--poster-1));
  border: 1px solid rgba(201,162,39,0.55);
  transition: transform .15s ease;
}
.poster:active{ transform: scale(0.97); }
.poster::after{
  content:""; position:absolute; inset:0; opacity:.5; mix-blend-mode: overlay; pointer-events:none;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 3px 3px;
}
.poster-bottom{
  width:100%; position:relative; z-index:1;
  padding: 8px 6px 9px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 20%, transparent 100%);
  display:flex; flex-direction:column; align-items:center; gap:4px;
}
.poster-stars-row{ display:flex; gap:3px; font-size:16px; }
.poster-stars-row span{ color: rgba(255,255,255,0.3); text-shadow:0 1px 3px rgba(0,0,0,0.8); }
.poster-stars-row span.filled{ color: var(--gold-bright); }
.poster-year{ font-family:'IBM Plex Mono',monospace; font-weight:600; font-size:11px; color:#fdfdfb; text-shadow:0 1px 3px rgba(0,0,0,0.8); }
.poster-badge{ position:absolute; top:8px; right:8px; z-index:1; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); border-radius: 8px; padding: 3px 6px; font-size: 12px; }
.poster-release{
  position:absolute; top:8px; left:8px; z-index:1; background: var(--bg-elevated); color: var(--ink);
  font-family:'IBM Plex Mono', monospace; font-weight:600; font-size: 10.5px; padding: 3px 6px; border-radius: 7px;
}
.poster-progress{ width:100%; max-width:56px; height:2px; border-radius:2px; background: rgba(255,255,255,0.25); overflow:hidden; margin-top:3px; }
.poster-progress-fill{ height:100%; background:#3ba55d; border-radius:2px; }
.poster-progress-fill.complete{ background:#7c3aed; }

/* ---------- Show rows (Shows tab list) ---------- */
.show-row{
  display:flex; gap: 14px; padding: 12px; margin-bottom: 10px;
  background: var(--bg-elevated); border: 1px solid var(--divider); border-radius: 16px; align-items: stretch;
}
.show-row .poster{ width: 60px; flex: 0 0 60px; aspect-ratio: 2/3; border-radius: 10px; box-shadow:none; }
.show-info{ flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; cursor:pointer; gap:3px; }
.show-info h3{ margin:0; font-size:16px; font-family:'Bodoni Moda',serif; font-weight:600; letter-spacing:-0.005em; }
.show-info .ep-line{ font-size: 12px; color: var(--ink-soft); font-family:'IBM Plex Mono',monospace; }
.show-watch-btn{
  align-self:center; background: var(--ink); color: var(--bg); border:none;
  border-radius: 20px; padding: 9px 14px; font-size: 12px; font-weight:700; cursor:pointer; white-space:nowrap;
}
.show-watch-btn[disabled]{ opacity:.35; background: var(--divider); color: var(--ink-soft); }
.ep-comment{ font-style: italic; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.skip-btn{ background:none; border:none; color:var(--ink-soft); font-size:11.5px; cursor:pointer; text-decoration:underline; padding:4px 6px; }
.rate-actions:has(.skip-btn){ justify-content:space-between; }

/* ---------- Inline episode rate panel ---------- */
.rate-panel{ flex:1; background: var(--bg); border-radius: 10px; padding: 10px; display:flex; flex-direction:column; gap:7px; animation: fade-in .15s ease; }
.rate-panel .ep-title{ font-size:12.5px; font-weight:700; font-family:'Bodoni Moda',serif; }
.rate-panel textarea, .ep-rate-active textarea{
  width:100%; resize:none; border-radius:8px; border: 1px solid var(--divider);
  background: var(--bg-elevated); color: var(--ink); font-family:'Inter',sans-serif; padding: 7px 9px;
}
.char-count{ font-size:10.5px; color:var(--ink-soft); text-align:right; font-family:'IBM Plex Mono',monospace; }
.rate-actions{ display:flex; justify-content:flex-end; gap:8px; }
.confirm-btn{ background: var(--velvet); color:#fff; border:none; border-radius:50%; width:34px; height:34px; font-size:15px; cursor:pointer; }

/* ---------- Stars (rating widget, shared by movies/shows/episodes) ---------- */
.stars{ display:flex; gap:4px; font-size: 20px; color: var(--divider); cursor:pointer; }
.stars.small{ font-size:16px; }
.stars span.filled{ color: var(--gold-bright); }

/* Favourite shimmer — a soft light sweeps across the filled stars,
   once every 3 seconds, when the item is marked favourite. */
.stars.shimmer span.filled,
.poster-stars-row.shimmer span.filled{ animation: star-shimmer 3s ease-in-out infinite; }
.stars.shimmer span.filled:nth-child(2), .poster-stars-row.shimmer span.filled:nth-child(2){ animation-delay: .1s; }
.stars.shimmer span.filled:nth-child(3), .poster-stars-row.shimmer span.filled:nth-child(3){ animation-delay: .2s; }
.stars.shimmer span.filled:nth-child(4), .poster-stars-row.shimmer span.filled:nth-child(4){ animation-delay: .3s; }
.stars.shimmer span.filled:nth-child(5), .poster-stars-row.shimmer span.filled:nth-child(5){ animation-delay: .4s; }
@keyframes star-shimmer{
  0%, 88%, 100% { filter: brightness(1); text-shadow: none; }
  92% { filter: brightness(1.8); text-shadow: 0 0 5px var(--gold-bright); }
}

/* ---------- Popup content (movie / show / later: event / competition) ---------- */
.fullview-hero{
  height: 220px; border-radius: 20px 20px 0 0; display:flex; align-items:flex-end; color:#fdfdfb;
  position:relative; background: var(--p-color, var(--poster-1)); overflow:hidden;
}
.fullview-hero::after{
  content:""; position:absolute; inset:0; opacity:.4; mix-blend-mode: overlay; pointer-events:none;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px); background-size: 3px 3px;
}
.fullview-hero .hero-label{ position:relative; z-index:1; padding: 18px; background: linear-gradient(0deg, rgba(0,0,0,0.7) 15%, transparent 95%); width:100%; }
.fullview-hero h1{ margin:0; font-size:28px; font-family:'Bodoni Moda',serif; font-weight:600; letter-spacing:-0.01em; }
.meta-row{ display:flex; flex-wrap:wrap; gap:8px 10px; margin: 16px 18px; color: var(--ink-soft); font-size: 13px; align-items:center; }
.meta-row b{ color: var(--ink); font-family:'Bodoni Moda',serif; font-size:15px; }
.pill{
  display:inline-block; background: var(--bg-elevated); border:1px solid var(--divider); border-radius: 20px;
  padding: 5px 11px; font-size: 12px; font-family:'IBM Plex Mono',monospace;
}
.action-row{ display:flex; gap:10px; margin: 16px 18px; }
.btn{ border:none; border-radius: 12px; padding: 13px 16px; font-weight:700; font-size:14px; cursor:pointer; }
.btn-primary{ background: var(--velvet); color:#fff; flex:1; }
.btn[disabled]{ opacity:.5; }
.btn-secondary{ background: var(--bg-elevated); color: var(--velvet); border:1px solid var(--velvet); flex:1; }
.btn-danger-outline{ background:none; border:1px solid #c0392b; color:#c0392b; border-radius:12px; padding:13px 16px; font-weight:700; font-size:14px; cursor:pointer; margin: 0 18px; width: calc(100% - 36px); }
.btn-danger-outline[disabled]{ opacity:.5; }

.rating-block{ background: var(--bg-elevated); border: 1px solid var(--divider); border-radius:16px; padding:16px; margin: 16px 18px; }
.rating-block h4{ margin:0 0 9px; font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--ink-soft); font-family:'IBM Plex Mono',monospace; font-weight:500; }
.rating-block select{
  padding: 8px 10px; border-radius:8px; border:1px solid var(--divider);
  background: var(--bg); color:var(--ink); font-family:'Inter',sans-serif; font-size:14px;
}
.rating-row{ display:flex; align-items:center; gap:12px; }
.heart-btn{ background:none; border:none; cursor:pointer; font-size: 21px; line-height:1; padding: 2px; }

.section-label{ margin: 20px 18px 12px; }

.season-block{ border: 1px solid var(--divider); border-radius: 14px; margin: 0 18px 10px; overflow:hidden; }
.season-head{ display:flex; align-items:center; justify-content:space-between; padding: 13px; cursor:pointer; background: var(--bg-elevated); }
.season-head h4{ margin:0; font-size:14px; font-family:'Bodoni Moda',serif; font-weight:600; }
.season-progress{ font-size:11px; color: var(--ink-soft); font-family:'IBM Plex Mono',monospace; }
.season-episodes{ display:none; padding: 4px 13px 12px; }
.season-episodes.open{ display:block; }
.ep-item{ display:flex; flex-direction:column; gap:3px; padding: 9px 2px; border-top: 1px solid var(--divider); font-size: 13px; }
.ep-item:first-child{ border-top:none; }
.ep-item.watched{ opacity:.55; }
.ep-main-row{ display:flex; align-items:center; gap:10px; }
.ep-row-main{ flex:1; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ep-row-main .ep-name{ flex:1; min-width:0; }
.ep-row-right{ display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.ep-item .ep-rating{ color: var(--gold-bright); font-size:12px; letter-spacing:1px; font-family:'IBM Plex Mono',monospace; }
.ep-upcoming{ font-size:10.5px; color: var(--ink-soft); font-family:'IBM Plex Mono',monospace; }
.ep-toggle-btn{
  flex: 0 0 26px; width:26px; height:26px; border-radius:50%; border: 1.5px solid var(--velvet);
  background: none; color: var(--velvet); font-size: 13px; font-weight:700; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
}
.ep-toggle-btn.watched{ background: var(--velvet); color:#fff; }
.ep-rewatch-btn{ background:none; border:none; font-size: 13px; cursor:pointer; padding:2px 4px; opacity:.6; line-height:1; }
.ep-rewatch-badge{ color: var(--gold-bright); font-size:11px; font-weight:700; }
.season-rewatch-btn{
  background:none; border:1px solid var(--divider); color: var(--ink-soft);
  border-radius:50%; width:28px; height:28px; font-size:12px; cursor:pointer; flex:0 0 auto;
}
.season-mark-btn{ font-size:11px; font-weight:700; background:none; border:1px solid var(--velvet); color:var(--velvet); border-radius:20px; padding:5px 10px; cursor:pointer; }
.season-mark-btn.done{ background: var(--velvet); color:#fff; }
.ep-toggle-btn.rewatch-cursor{ box-shadow: 0 0 0 2px var(--gold-bright); }
.ep-toggle-btn.rewatched{ background:#2f6fed; border-color:#2f6fed; color:#fff; }
.ep-toggle-btn[disabled]{ opacity:.4; cursor:not-allowed; }
.season-mark-btn[disabled]{ opacity:.4; cursor:not-allowed; }

/* ---------- The popup frame itself ---------- */
.popup-overlay{
  position: fixed; inset: 0; background: rgba(21,13,12,0.6); backdrop-filter: blur(3px);
  display:flex; align-items:flex-end; justify-content:center; z-index: 70;
}
.popup-overlay[hidden]{ display:none; }
.popup-sheet{
  background: var(--bg); width:100%; max-width: 480px; max-height: 90vh; overflow-y:auto;
  border-radius: 20px 20px 0 0; border: 1px solid var(--divider); border-bottom:none;
  position:relative; animation: popup-up .2s ease;
}
@keyframes popup-up{ from{ transform: translateY(40px); opacity:.4; } to{ transform:none; opacity:1; } }
@media (min-width: 560px){
  .popup-overlay{ align-items:center; padding: 20px; }
  .popup-sheet{ border-radius: 20px; border-bottom: 1px solid var(--divider); }
}
.popup-close{
  position:absolute; top:14px; right:14px; z-index:2; width:34px; height:34px; border-radius:50%;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px); color:#fff; border:none; font-size:14px; cursor:pointer;
}

/* ==================================================================
   STEP 3 additions — sport thumbs, filter chips, competition poster,
   All Competitions banner, event rating form.
   ================================================================== */

/* ---------- Thumbs — 2 per row, 16:9, Watch Temple visual language ---------- */
.thumb-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.thumb{
  position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; cursor:pointer;
  box-shadow: var(--shadow); color:#fdfdfb;
  background: var(--poster-1);
  border: 1px solid rgba(201,162,39,0.55);
  transition: transform .15s ease;
}
.thumb:active{ transform: scale(0.97); }
.thumb-img{ position:absolute; inset:0; background-size:cover; background-position:center; }
.thumb-fallback{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:30px; background: var(--poster-2); opacity:.9; }
.thumb-bottom{
  position:absolute; left:0; right:0; bottom:0; z-index:1; padding: 8px 9px 9px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 25%, transparent 100%);
  display:flex; flex-direction:column; align-items:center; gap:3px;
}
.thumb-time{ font-family:'IBM Plex Mono',monospace; font-weight:600; font-size:10.5px; color:#fdfdfb; text-shadow:0 1px 3px rgba(0,0,0,0.8); }
.thumb-badge{ position:absolute; top:8px; right:8px; z-index:1; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); border-radius: 8px; padding: 3px 6px; font-size: 12px; }
/* Gold background = "this match is in your watchlist" — the one
   glance-able signal that doesn't depend on which tab/filter you're
   looking at (All, a competition, a club, search…). */
.thumb-badge-watchlisted{ background: var(--gold-bright); box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
/* Lets the badge hold several emojis side by side (comment, emotion, place). */
.thumb-badge{ display:flex; align-items:center; gap:4px; }

/* The only two non-neutral signals left on a thumb: live (red,
   pulsing border) and "needs confirmation" (a plain blue dot,
   top-left — no emoji, no colored border). */
.thumb.thumb-live{ border-color: var(--live-red); animation: thumb-live-glow 1.6s ease-in-out infinite; }
@keyframes thumb-live-glow{
  0%,100%{ box-shadow: 0 0 0 1px rgba(192,57,43,0.35), var(--shadow); }
  50%{ box-shadow: 0 0 0 3px rgba(192,57,43,0.55), var(--shadow); }
}
.thumb-live-tag{
  position:absolute; top:8px; left:8px; z-index:1; background: var(--live-red); color:#fff;
  font-size:10px; font-weight:800; letter-spacing:.5px; padding:3px 7px; border-radius:99px;
  display:flex; align-items:center; gap:4px;
}
.thumb-live-tag i{ width:5px; height:5px; border-radius:50%; background:#fff; animation: dot-pulse 1.1s ease-in-out infinite; }
@keyframes dot-pulse{ 50%{ opacity:.3; transform: scale(.7); } }
.thumb.thumb-needs-confirm{ border-color:#3e74d0; animation: thumb-confirm-glow 1.6s ease-in-out infinite; }
@keyframes thumb-confirm-glow{
  0%,100%{ box-shadow: 0 0 0 1px rgba(62,116,208,0.35), var(--shadow); }
  50%{ box-shadow: 0 0 0 3px rgba(62,116,208,0.55), var(--shadow); }
}

/* ---------- Competition poster (same size/grid as movie/show posters) ---------- */
.poster-competition{ background-color: var(--marquee-top); }
.poster-fav-dot{
  position:absolute; top:8px; left:8px; z-index:1; color: var(--gold-bright); font-size:16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.comp-crest-compact{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:90%; max-height:70%; object-fit:contain;
}
.poster-fallback-icon{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:34px; opacity:.85;
}

/* ---------- All Competitions banner (top of the Events view) ---------- */
.allcomps-banner{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  background: linear-gradient(90deg, var(--velvet), var(--velvet-soft));
  color:#fdf6ea; border:none; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; cursor:pointer;
}
.allcomps-banner b{ font-size: 14px; font-family:'Bodoni Moda',serif; }
.allcomps-banner span{ font-size: 18px; }

/* ---------- Filter chips (Coming / Live / Ended / scope — Sport tab) ---------- */
.filter-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin: 0 0 14px; }
.filter-chip{
  border: 1px solid var(--divider); border-radius: 99px; padding: 7px 13px; font-size: 12.5px;
  font-weight:600; color: var(--ink-soft); background: var(--bg-elevated); cursor:pointer;
}
.filter-chip.active{ background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-chip.live{ display:flex; align-items:center; gap:6px; border-color: var(--live-red); color: var(--live-red); }
.filter-chip.live i{ width:7px; height:7px; border-radius:50%; background: var(--live-red); animation: dot-pulse 1.1s ease-in-out infinite; }
.filter-chip.live.active{ background: var(--live-red); color:#fff; border-color: var(--live-red); }
.filter-chip.live.active i{ background:#fff; }

/* ---------- Event rating form (inside the event popup) ---------- */
.rate-group{ margin: 14px 18px; }
.rate-group h4{ margin:0 0 8px; font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--ink-soft); font-family:'IBM Plex Mono',monospace; font-weight:500; }
.chips{ display:flex; flex-wrap:wrap; gap:7px; }
.pick-chip{ border:1px solid var(--divider); border-radius:99px; padding:7px 12px; font-size:12.5px; font-weight:500; background: var(--bg-elevated); color: var(--ink); cursor:pointer; }
.pick-chip.active{ background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rating-row{ display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:600; }

.rating-group-label{
  grid-column: 1/-1;
  font-family:'IBM Plex Mono',monospace; color: var(--gold-bright); font-size:13px; letter-spacing:2px;
  margin: 14px 0 8px; font-weight:700;
}
.rating-group-label:first-child{ margin-top:0; }

/* ---------- Club link (clickable team name inside the event popup) ---------- */
.fullview-hero .club-link{
  cursor: pointer; text-decoration: underline; text-decoration-color: rgba(253,253,251,0.45);
  text-underline-offset: 3px;
}
.pill.comp-link{ cursor:pointer; text-decoration: underline; text-decoration-color: var(--divider); text-underline-offset: 3px; }
.fullview-hero .club-link:active{ opacity: .7; }

/* Tighter gap between the scope row and the Live row underneath it
   in the Sport (Events) view — they read as one control group. */
/* My Events (left) / Ended (slides inside its own zone) / All (right).
   The zone between My Events and All takes all the free space. Ended
   sits at the left of that zone, or at its right when .scope-all is set,
   and slides between the two with a transition. */
#ev-scope-row{ margin-bottom: 8px; flex-wrap: nowrap; }
#ev-scope-row .ev-ended-track{ flex: 1; min-width: 0; }
#ev-scope-row .ev-ended-track .filter-chip{
  position: relative; left: 0; transform: translateX(0);
  white-space: nowrap;
  transition: left .3s ease, transform .3s ease;
}
#ev-scope-row.scope-all .ev-ended-track .filter-chip{
  left: 100%; transform: translateX(-100%);
}
@media (prefers-reduced-motion: reduce){
  #ev-scope-row .ev-ended-track .filter-chip{ transition: none; }
}

/* ---------- Movie popup: watch dates and edit form ---------- */
.watch-dates{
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--divider);
  display: flex; flex-direction: column; gap: 6px;
}
.watch-date-row{
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace;
}
.rate-group select{
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--divider);
  background: var(--bg); color: var(--ink); font-family: 'Inter', sans-serif; font-size: 14px;
}

/* ---------- IMDb rating pill (movie / show popup) ---------- */
.imdb-pill{ display:inline-flex; align-items:baseline; gap:6px; }
.imdb-votes{ font-size:9.5px; color: var(--ink-soft); }
#imdb-slot:empty{ display:none; }

/* Pushes a chip to the far right of its filter row (Display / Hide ★). */
.filter-chip.push-right{ margin-left:auto; }

/* ---------- Account page: "My Account and Data" section ---------- */
.data-section{ margin-top: 28px; }
.data-section h2{
  margin: 0 0 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; font-weight: 600;
}
.data-list{
  background: var(--bg-elevated); border: 1px solid var(--divider);
  border-radius: 16px; overflow: hidden;
}
.data-link{
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 16px; background: none; border: none; border-top: 1px solid var(--divider);
  color: var(--ink); font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
}
.data-list .data-link:first-child{ border-top: none; }
.data-link span:last-child{ color: var(--ink-soft); }
.data-link.danger{ color: #c0392b; }
.data-hint{ font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin: 10px 4px 0; }

/* ---------- Legal popup ---------- */
.legal-body{ padding: 22px 18px 28px; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.legal-body h1{ font-size: 22px; margin: 0 0 4px; }
.legal-body h2{ font-size: 15px; margin: 22px 0 6px; font-family: 'Bodoni Moda', serif; }
.legal-body p, .legal-body ul{ margin: 0 0 8px; }
.legal-body ul{ padding-left: 18px; }
.legal-body a{ color: var(--velvet); }
.legal-updated{ color: var(--ink-soft); font-size: 12px; }

/* ---------- Popup: breathing room below the last element ---------- */
#popup-body{ padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }


/* ---------- Sport > Events scope row: "All" stays on the right;
   "Ended" sits next to My Events, or next to All once All is selected. ---------- */
#ev-scope-row [data-val="all"]{ margin-left:auto; }
#ev-scope-row.scope-all [data-val="ended"]{ margin-left:auto; }
#ev-scope-row.scope-all [data-val="all"]{ margin-left:0; }

/* ---------- TMDB overview (movie / show popup) ---------- */
.overview{
  margin: 0 18px 16px; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft);
}