/* ===== Hallmark Movie Night — shared styles ===== */

:root {
  --cranberry: #9d2235;
  --cranberry-dark: #7a1a29;
  --evergreen: #1f3d2b;
  --evergreen-soft: #2e5740;
  --cream: #fdf7ef;
  --parchment: #f6ebdc;
  --gold: #c08a2e;
  --ink: #2b231f;
  --ink-soft: #6c5f57;
  --snow: #ffffff;
  --shadow: 0 10px 30px rgba(43, 35, 31, 0.13);
  --shadow-lift: 0 18px 44px rgba(43, 35, 31, 0.2);
  --radius: 18px;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(157, 34, 53, 0.1), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, rgba(31, 61, 43, 0.12), transparent 62%),
    var(--cream);
  -webkit-text-size-adjust: 100%;
}

/* snowfall */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9), transparent),
    radial-gradient(2px 2px at 70% 15%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.5px 1.5px at 45% 70%, rgba(255,255,255,.8), transparent),
    radial-gradient(2px 2px at 85% 60%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 10% 85%, rgba(255,255,255,.8), transparent);
  background-size: 420px 420px;
  animation: drift 26s linear infinite;
  opacity: .8;
}
@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 420px, 0 420px, 0 420px, 0 420px, 0 420px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

/* ===== header ===== */

.site-head {
  position: relative;          /* the mobile menu hangs off this */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--evergreen);
}
.brand .mark { font-size: 1.5rem; line-height: 1; }
.brand h1 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav a {
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--evergreen);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 61, 43, .2);
  background: rgba(255,255,255,.72);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.nav a:hover { background: var(--snow); border-color: var(--evergreen-soft); transform: translateY(-1px); }
.nav a[aria-current="page"] { background: var(--evergreen); border-color: var(--evergreen); color: var(--parchment); }

/* The two games read as the point of the site, so they carry the cranberry;
   the two admin pages are chores and deliberately recede. */
.nav a.nav-game { color: var(--cranberry); border-color: rgba(157, 34, 53, .28); }
.nav a.nav-game:hover { border-color: var(--cranberry); background: var(--snow); }
.nav a.nav-game[aria-current="page"] {
  background: var(--cranberry); border-color: var(--cranberry); color: #fff;
}

.nav a.nav-admin {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
  font-weight: 600;
}
.nav a.nav-admin:hover {
  color: var(--evergreen);
  background: rgba(255,255,255,.8);
  border-color: rgba(31, 61, 43, .18);
}
.nav a.nav-admin[aria-current="page"] {
  background: var(--evergreen); border-color: var(--evergreen); color: var(--parchment);
}

/* Hairline between the two groups — desktop only. */
.nav-rule {
  width: 1px;
  align-self: stretch;
  min-height: 20px;
  margin: 0 3px;
  background: rgba(43, 35, 31, .16);
}

/* Group captions replace the hairline once the menu stacks. */
.nav-heading { display: none; }

/* ---- the hamburger ---- */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
  border: 1px solid rgba(31, 61, 43, .22);
  background: rgba(255,255,255,.8);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--snow); border-color: var(--evergreen-soft); }
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  position: absolute;
  left: 50%;
  width: 19px;
  height: 2px;
  margin-left: -9.5px;
  border-radius: 2px;
  background: var(--evergreen);
  transition: transform .22s ease, opacity .15s ease;
}
.nav-toggle .bars { top: 50%; margin-top: -1px; }
.nav-toggle .bars::before { content: ""; margin-left: 0; left: 0; top: -6px; }
.nav-toggle .bars::after  { content: ""; margin-left: 0; left: 0; top: 6px; }

/* open: the three bars fold into a cross */
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .nav-toggle .bars,
  .nav-toggle .bars::before,
  .nav-toggle .bars::after { transition: none; }
}

/* ---- stacked menu on small screens ---- */
@media (max-width: 720px) {
  .site-head { flex-wrap: nowrap; }
  .brand h1 { font-size: 1.15rem; }

  .nav-toggle { display: inline-flex; }
  .nav-rule { display: none; }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    min-width: 212px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(43, 35, 31, .1);
    background: var(--snow);
    box-shadow: var(--shadow-lift);
  }
  .nav:not(.open) { display: none; }

  /* Stacked, the captions already group these, so the outlines that carry the
     distinction on one line would just read as clutter. Colour alone does it. */
  .nav a,
  .nav a.nav-game,
  .nav a.nav-admin {
    border-radius: 11px;
    padding: 10px 12px;
    background: transparent;
    border-color: transparent;
    font-size: .92rem;
  }
  .nav a:hover { transform: none; background: var(--parchment); }
  .nav a.nav-game:hover { background: rgba(157, 34, 53, .08); }

  .nav-heading {
    display: block;
    margin: 10px 12px 3px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--cranberry);
  }
  .nav-heading:first-of-type { margin-top: 6px; }
}

/* ===== type ===== */

.page-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  margin: 0 0 8px;
  color: var(--evergreen);
  letter-spacing: -0.015em;
}
.lede { margin: 0 0 26px; color: var(--ink-soft); font-size: 1.02rem; max-width: 56ch; line-height: 1.6; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--cranberry);
  margin: 0 0 10px;
}

/* ===== panels & buttons ===== */

.panel {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(43,35,31,.09);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(6px);
}

.btn {
  font: inherit;
  font-weight: 650;
  font-size: .95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  background: var(--cranberry);
  color: #fff;
  box-shadow: 0 6px 16px rgba(157,34,53,.26);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, opacity .12s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}
.btn:hover { background: var(--cranberry-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(157,34,53,.3); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-green { background: var(--evergreen); box-shadow: 0 6px 16px rgba(31,61,43,.24); }
.btn-green:hover { background: var(--evergreen-soft); box-shadow: 0 10px 22px rgba(31,61,43,.28); }

.btn-ghost {
  background: rgba(255,255,255,.8);
  color: var(--evergreen);
  border-color: rgba(31,61,43,.25);
  box-shadow: none;
}
.btn-ghost:hover { background: #fff; border-color: var(--evergreen-soft); box-shadow: 0 6px 14px rgba(43,35,31,.1); }

.btn-tiny {
  min-height: 34px;
  padding: 7px 14px;
  font-size: .8rem;
}

.btn-danger { background: #fff; color: var(--cranberry); border-color: rgba(157,34,53,.3); box-shadow: none; }
.btn-danger:hover { background: var(--cranberry); color: #fff; border-color: var(--cranberry); }

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

/* ===== forms ===== */

label { display: block; font-weight: 650; font-size: .84rem; letter-spacing: .02em; margin-bottom: 6px; color: var(--evergreen); }
.field { margin-bottom: 16px; }
.hint { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.45; }

input[type="text"], textarea, select {
  font: inherit;
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(43,35,31,.2);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, textarea:focus, select:focus {
  border-color: var(--evergreen-soft);
  box-shadow: 0 0 0 3px rgba(31,61,43,.12);
  outline: none;
}

/* ===== misc ===== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  /* Must clear the toast's own height *and* the 24px offset. A percentage
     alone is measured against the height, so an empty toast — which is only
     as tall as its padding — was left peeking above the bottom edge. */
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  background: var(--evergreen);
  color: var(--parchment);
  padding: 13px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  font-weight: 600;
  font-size: .92rem;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    opacity .2s ease,
    visibility 0s linear .28s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    opacity .18s ease,
    visibility 0s;
}
.toast.error { background: var(--cranberry); }

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--ink-soft);
}
.empty .big { font-size: 2.4rem; margin-bottom: 10px; }

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

.footer-note {
  margin-top: 40px;
  text-align: center;
  font-size: .8rem;
  color: var(--ink-soft);
}
