/* ========== Basis ========== */
:root {
  --bg: #0b0c12;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4f8;
  --muted: #9a9cb0;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 120%);
  --radius: 22px;
  --nav-height: 72px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Zachte kleurvlekken op de achtergrond */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 110% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(30rem 25rem at -20% 30%, rgba(236, 72, 153, 0.16), transparent 60%),
    radial-gradient(30rem 25rem at 50% 120%, rgba(14, 165, 233, 0.14), transparent 60%);
}

h1, h2, h3 { letter-spacing: -0.02em; }

a { color: inherit; }

/* ========== Layout ========== */
.board-wrapper {
  display: flex;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(var(--nav-height) + 40px + env(safe-area-inset-bottom));
}

.board {
  width: 100%;
  max-width: 480px;
  animation: fade-up 0.4s ease-out both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ========== Header ========== */
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 24px;
}

.mascot {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mascot img {
  width: 46px;
  height: auto;
}

.app-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff 30%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-title {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 800;
}

.section-label {
  margin: 28px 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ========== Kaarten ========== */
.agenda-card,
.stack-card,
.rule-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.agenda-card {
  padding: 18px;
  margin-bottom: 12px;
}

.agenda-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.agenda-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 15px;
}

.agenda-line .icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
}

/* Uitgelichte kaart op home: eerstvolgende activiteit */
.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: none;
  background: var(--gradient);
  box-shadow: 0 20px 40px -18px rgba(139, 92, 246, 0.7);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.hero-card .agenda-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin: 0;
}

.hero-card h2 {
  margin: 10px 0 14px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
}

.hero-card .agenda-line { color: rgba(255, 255, 255, 0.92); }

.countdown {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.countdown:empty { display: none; }

/* ========== Knoppen ========== */
button {
  font: inherit;
  cursor: pointer;
}

.hero-card a { text-decoration: none; }

.hero-card button {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #2e1065;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease;
}

button:active,
.stack-card:active { transform: scale(0.97); }

/* ========== Agenda-lijst ========== */
.agenda-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.date-tile {
  flex: none;
  width: 56px;
  height: 60px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.date-tile .day {
  font-size: 22px;
  font-weight: 800;
}

.date-tile .month {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-2);
}

.agenda-item.is-birthday .date-tile {
  background: var(--gradient);
  border: none;
}

.agenda-item.is-birthday .date-tile .month { color: rgba(255, 255, 255, 0.9); }

.agenda-item-body { min-width: 0; }

.agenda-item .agenda-card-title {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.agenda-month {
  margin: 22px 4px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.agenda-month:first-child { margin-top: 0; }

/* ========== Tegels (Games / Agenda) ========== */
.stacks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease;
}

.stack-card:hover { background: var(--surface-strong); }

.stack-card-icon {
  order: -1;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(139, 92, 246, 0.18);
}

.stack-agenda .stack-card-icon { background: rgba(14, 165, 233, 0.18); }
.stack-soon .stack-card-icon   { background: rgba(245, 158, 11, 0.16); }
.stack-soon { opacity: 0.6; pointer-events: none; }

.stack-card-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}

.stack-card::after {
  content: "›";
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
}

.stack-soon::after { content: none; }

/* ========== Onderste navigatie ========== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 360px);
  height: var(--nav-height);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  border-radius: 24px;
  background: rgba(22, 23, 32, 0.75);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  z-index: 100;
}

.nav-cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.nav-cap::after {
  content: attr(data-label);
  font-size: 11px;
  font-weight: 600;
}

.nav-cap[aria-current="page"] {
  background: rgba(139, 92, 246, 0.22);
  color: var(--text);
}

/* ========== Menu ========== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 999;
}

.menu-box {
  width: 100%;
  max-width: 480px;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  background: #171823;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-box::before {
  content: "";
  display: block;
  width: 40px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.menu-box.slide-in { transform: translateY(0); }

.menu-box h3 {
  margin: 0 0 12px 4px;
  font-size: 20px;
}

.menu-box a {
  display: block;
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.menu-box a:active { background: var(--surface-strong); }

#menu-close {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

/* ========== Spelregels (Exploding Aces) ========== */
.rule-section {
  padding: 18px;
  margin-bottom: 16px;
}

.rule-section h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

details {
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

details[open] { background: var(--surface-strong); }

summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-size: 20px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

details[open] summary::after { transform: rotate(45deg); }

details p {
  margin: 0 16px 12px;
  color: #c9cad6;
  line-height: 1.55;
  font-size: 15px;
}

details p:last-child { margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== Meldingen ========== */
.notify-card { margin-bottom: 24px; }
.notify-card.is-busy { opacity: 0.6; }

.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notify-head .agenda-card-title { margin-bottom: 2px; }

.notify-status {
  font-size: 14px;
  color: var(--muted);
}

.notify-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.notify-time-row[hidden], .notify-hint[hidden] { display: none; }

.notify-time-row label {
  flex: 1;
  font-weight: 600;
}

.notify-time-row input[type="time"] {
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
}

.ghost-button {
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.notify-hint {
  margin: 12px 0 0;
  font-size: 14px;
  color: #fbcfe8;
}

/* Schakelaar */
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track { background: var(--gradient); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:disabled + .switch-track { opacity: 0.5; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ========== Dobbelstenen ========== */
.stack-dice .stack-card-icon { background: rgba(236, 72, 153, 0.18); }

.dice-panel { --die: 76px; }

.dice-stage {
  position: relative;
  min-height: 250px;
  padding: 44px 12px 64px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(139, 92, 246, 0.25), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dice-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 30px;
  perspective: 700px;
}

.dice-tray[data-count="1"] { --die: 110px; }
.dice-tray[data-count="2"] { --die: 92px; }
.dice-tray[data-count="5"],
.dice-tray[data-count="6"] { --die: 64px; gap: 22px 26px; }

.die-wrap {
  position: relative;
  width: var(--die);
  height: var(--die);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.die {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.18, 0.75, 0.25, 1.04);
}

.die-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 14%;
  border-radius: 20%;
  background: linear-gradient(145deg, #ffffff 0%, #ece9f8 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), inset 0 -6px 12px rgba(91, 33, 182, 0.12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.die-face span { display: grid; place-items: center; }

.die-face .pip::before {
  content: "";
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4c1d95, #1e1b2e 70%);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.4);
}

/* De 1 krijgt een grote roze stip */
.die-face.front .pip::before {
  width: 100%;
  background: radial-gradient(circle at 35% 30%, #f472b6, #be185d 75%);
}

.die-face.front  { transform: translateZ(calc(var(--die) / 2)); }
.die-face.back   { transform: rotateY(180deg) translateZ(calc(var(--die) / 2)); }
.die-face.right  { transform: rotateY(90deg) translateZ(calc(var(--die) / 2)); }
.die-face.left   { transform: rotateY(-90deg) translateZ(calc(var(--die) / 2)); }
.die-face.top    { transform: rotateX(90deg) translateZ(calc(var(--die) / 2)); }
.die-face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--die) / 2)); }

.die-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -22px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

/* Stuiteren tijdens het gooien */
.die-wrap.is-rolling { animation: die-hop 1.1s cubic-bezier(0.3, 0.6, 0.4, 1) var(--hop-delay, 0ms) both; }
.die-wrap.is-rolling .die-shadow { animation: die-shadow 1.1s cubic-bezier(0.3, 0.6, 0.4, 1) var(--hop-delay, 0ms) both; }

@keyframes die-hop {
  0%   { transform: translateY(0) scale(1); }
  8%   { transform: translateY(6px) scale(1.06, 0.94); }
  30%  { transform: translateY(-80px) scale(0.98, 1.02); }
  55%  { transform: translateY(0) scale(1.05, 0.95); }
  70%  { transform: translateY(-28px) scale(1); }
  84%  { transform: translateY(0) scale(1.03, 0.97); }
  92%  { transform: translateY(-6px); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes die-shadow {
  0%, 55%, 84%, 100% { transform: scale(1); opacity: 1; }
  30% { transform: scale(0.45); opacity: 0.35; }
  70% { transform: scale(0.8); opacity: 0.75; }
}

/* Vastgehouden steen */
.die-wrap.is-held { transform: translateY(-6px); }
.die-wrap.is-held .die-face {
  background: linear-gradient(145deg, #fde68a 0%, #f59e0b 100%);
}
.die-wrap.is-held::after {
  content: "VAST";
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-3);
  color: #1c1203;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Totaal */
.dice-total {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.dice-total.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.total-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.total-value {
  font-size: 24px;
  font-weight: 800;
}

/* Knoppen */
.roll-button {
  width: 100%;
  margin-top: 16px;
  padding: 18px;
  border: none;
  border-radius: 18px;
  background: var(--gradient);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 16px 32px -14px rgba(236, 72, 153, 0.8);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.roll-button:disabled { opacity: 0.6; }

.dice-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.dice-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.dice-stepper strong { color: var(--text); font-size: 18px; }

.dice-stepper button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

.dice-stepper button:disabled { opacity: 0.35; }

#shake-button[hidden] { display: none; }
#shake-button.is-on {
  background: rgba(139, 92, 246, 0.22);
  border-color: transparent;
}

.dice-tip {
  margin: 14px 4px 0;
  font-size: 13px;
  color: var(--muted);
}

.dice-history[hidden] { display: none; }

.dice-history ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.history-chip.is-latest {
  color: var(--text);
  border-color: rgba(236, 72, 153, 0.5);
}

/* ========== Hitster ========== */
.stack-hitster .stack-card-icon { background: rgba(30, 215, 96, 0.16); }

.hitster-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.hitster-text code {
  font-size: 0.9em;
  color: var(--text);
}

.hitster-connect { text-align: center; padding: 28px 20px; }
.hitster-connect-icon { font-size: 44px; margin-bottom: 8px; }
.hitster-connect .agenda-card-title { font-size: 20px; }

.spotify-button {
  background: #1ed760;
  color: #08140c;
  box-shadow: 0 16px 32px -14px rgba(30, 215, 96, 0.7);
}

.hitster-game.is-busy .roll-button { opacity: 0.6; }

.hitster-progress {
  margin: -6px 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hitster-stage {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(236, 72, 153, 0.22), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  perspective: 900px;
}

/* Grammofoonplaat */
.record {
  --size: 190px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 35%),
    repeating-radial-gradient(circle, #121218 0 2px, #1c1c25 2px 4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8), inset 0 0 0 6px #0c0c10;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.record.is-spinning { animation: record-spin 2.2s linear infinite; }

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

.record-label {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gradient);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.record.is-revealed {
  transform: scale(0.55) translateY(-130px);
  opacity: 0.35;
}

/* Onthulde kaart */
.song-card {
  position: absolute;
  inset: 22px 22px auto;
  top: 50%;
  translate: 0 -50%;
  padding: 22px 18px;
  border-radius: 22px;
  text-align: center;
  background: var(--gradient);
  box-shadow: 0 24px 48px -16px rgba(236, 72, 153, 0.7);
  animation: card-flip 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.song-card[hidden] { display: none; }

@keyframes card-flip {
  from { transform: rotateY(90deg) scale(0.9); opacity: 0; }
  to   { transform: rotateY(0) scale(1); opacity: 1; }
}

.song-card-artist {
  font-size: 17px;
  font-weight: 700;
  opacity: 0.92;
}

.song-card-year {
  margin: 4px 0;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.song-card-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hitster-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hitster-status[hidden],
.hitster-status [hidden],
.hitster-controls [hidden] { display: none; }

.hitster-status p { margin: 0; line-height: 1.45; }

.hitster-status-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.hitster-status-actions:not(:has(:not([hidden]))) { display: none; }

a.ghost-button { text-decoration: none; display: inline-block; }

.hitster-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hitster-controls .ghost-button { flex: 1; padding: 12px; }

.hitster-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
}

.link-button {
  padding: 6px 2px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
