﻿:root {
  --green: #ff3b52;
  --green-soft: #ffb3bd;
  --green-deep: #a80f24;
  --red: #ff2b3d;
  --red-deep: #8f0010;
  --ink: #f4f1e6;
  --muted: #bcacae;
  --paper: #f7f0e1;
  --paper-ink: #241a10;
  --line: rgba(255, 179, 189, 0.16);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #080b08;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.bg,
.scrim {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg {
  z-index: -3;
  background: url("/images/background-web.jpg") center / cover no-repeat;
  filter: brightness(0.84) saturate(0.92) contrast(1.03);
}

.scrim {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 10%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.14) 48%, rgba(3, 8, 5, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 10, 6, 0.2), rgba(4, 10, 6, 0.48));
}

.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;
}

/* ---------- Neon title ---------- */

.neon-title {
  position: relative;
  z-index: 0;
  margin: 0;
  font-family: "Righteous", "Bebas Neue", Impact, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 10vw, 7.5rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffeef2;
  text-shadow:
    0 0 3px #ffffff,
    0 0 9px #ff9aa7,
    0 0 20px #ff3550,
    0 0 44px #e01d35;
}

.neon-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: #3dff86;
  text-shadow:
    0 0 8px rgba(61, 255, 134, 0.95),
    0 0 22px rgba(61, 255, 134, 0.75),
    0 0 48px rgba(0, 232, 92, 0.5);
  transform: translate(0.055em, 0.07em);
  pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: clamp(2rem, 5vw, 4rem) 1rem 0;
  text-align: center;
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding: 0.38rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 8, 12, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.who-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.who-name {
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 14px rgba(255, 59, 82, 0.55);
}

/* ---------- Buttons ---------- */

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--green-soft);
  border: 1px solid var(--line);
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-neon {
  background: linear-gradient(180deg, #ff6b7f, #d61f3d);
  color: #2a0207;
  box-shadow:
    0 0 0 1px rgba(255, 59, 82, 0.6),
    0 8px 24px rgba(214, 31, 61, 0.35);
  white-space: nowrap;
}

.btn-neon:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px #ff9aa7,
    0 10px 30px rgba(255, 59, 82, 0.5);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

/* ---------- Board ---------- */

.board {
  position: relative;
  z-index: 1;
  width: min(1260px, 95vw);
  margin: clamp(2rem, 4vw, 3.2rem) auto 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
  align-items: start;
}

.board-status {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 3rem 0;
  padding: 1.2rem 1.6rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(20, 8, 12, 0.6);
  color: var(--green-soft);
  text-align: center;
  letter-spacing: 0.04em;
}

.board-status--error {
  border-color: rgba(255, 43, 61, 0.5);
  color: #ffd7da;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.board-status--error p {
  margin: 0;
}

/* ---------- Person card ---------- */

.card {
  --tilt: 0deg;
  --dx: 0px;
  --dy: 0px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1rem, 1.6vw, 1.25rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 24, 17, 0.97), rgba(14, 12, 9, 0.98));
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt)) translate(var(--dx), var(--dy));
  animation: card-in 0.5s ease both;
}

.card:nth-child(1) {
  --tilt: -1.3deg;
  --dx: -6px;
  --dy: 8px;
}

.card:nth-child(2) {
  --tilt: 1.1deg;
  --dx: 9px;
  --dy: 26px;
}

.card:nth-child(3) {
  --tilt: -0.6deg;
  --dx: -3px;
  --dy: 0px;
}

.card:nth-child(4) {
  --tilt: 1.4deg;
  --dx: 11px;
  --dy: 14px;
}

.card:nth-child(5) {
  --tilt: -1deg;
  --dx: -9px;
  --dy: 32px;
}

.card:nth-child(6) {
  --tilt: 0.7deg;
  --dx: 5px;
  --dy: 4px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: rotate(var(--tilt)) translate(var(--dx), calc(var(--dy) + 18px));
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt)) translate(var(--dx), var(--dy));
  }
}

.card.is-you {
  border-color: rgba(255, 59, 82, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 59, 82, 0.32),
    0 0 44px rgba(255, 59, 82, 0.1),
    var(--shadow);
}

.card.is-you::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255, 59, 82, 0.1), transparent 62%);
}

.tape {
  position: absolute;
  top: -10px;
  left: 1.7rem;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  z-index: 6;
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #d01f33 55%, #6d0000);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.65),
    inset -2px -2px 4px rgba(0, 0, 0, 0.35),
    inset 2px 2px 3px rgba(255, 255, 255, 0.4);
}

.card:nth-child(3n + 2) .tape {
  left: auto;
  right: 1.8rem;
  background: radial-gradient(circle at 35% 30%, #ffb3bd, #e02434 55%, #7a0010);
}

.card:nth-child(3n + 3) .tape {
  left: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #d6a51a 55%, #6b5000);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.polaroid {
  margin: 0;
  flex: 0 0 auto;
  padding: 0.38rem 0.38rem 0.85rem;
  background: #fbf7ee;
  border-radius: 3px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--rot, -1deg));
  transition: transform 0.25s ease;
}

.card:hover .polaroid {
  transform: rotate(calc(var(--rot, -1deg) * 0.4)) scale(1.02);
}

.polaroid img {
  display: block;
  width: 94px;
  height: 94px;
  object-fit: cover;
  background: linear-gradient(135deg, #5f1f2a, #2a0a10);
  filter: saturate(0.95) contrast(1.03);
}

.card:nth-child(2) .polaroid img {
  width: 104px;
  height: 92px;
}

.card:nth-child(4) .polaroid img {
  width: 88px;
  height: 100px;
}

.card:nth-child(5) .polaroid img {
  width: 100px;
  height: 100px;
}

.name-plate {
  min-width: 0;
}

.name-plate h2 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fdf8ec;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.card.is-you .name-plate h2 {
  color: var(--green);
  text-shadow: 0 0 18px rgba(255, 59, 82, 0.5);
}

.meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.you-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #2a0207;
  background: var(--green);
  box-shadow: 0 0 14px rgba(255, 59, 82, 0.65);
}

.count {
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- Big stamp on your own card ---------- */

.own-stamp {
  position: absolute;
  top: 0.9rem;
  right: 0.8rem;
  z-index: 5;
  transform: rotate(-9deg);
  font-family: "Special Elite", "Courier New", monospace;
  font-size: clamp(1rem, 1.9vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #3dff86;
  border: 4px double #3dff86;
  border-radius: 3px;
  padding: 0.1rem 0.5rem 0.1rem 0.65rem;
  background: rgba(0, 20, 6, 0.35);
  text-shadow: 0 0 10px rgba(61, 255, 134, 0.85);
  box-shadow: 0 0 20px rgba(61, 255, 134, 0.25);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0.95;
}

/* ---------- Gift list ---------- */

.gift-list {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.1rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gift-list::-webkit-scrollbar {
  width: 8px;
}

.gift-list::-webkit-scrollbar-thumb {
  background: rgba(255, 59, 82, 0.28);
  border-radius: 999px;
}

.gift {
  position: relative;
  padding: 0.62rem 0.72rem;
  border-radius: 6px;
  background: var(--paper);
  color: var(--paper-ink);
  font-size: 0.94rem;
  line-height: 1.35;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.28),
    0 8px 16px rgba(0, 0, 0, 0.24);
  overflow-wrap: anywhere;
}

.gift:nth-child(3n + 1) {
  transform: rotate(-0.5deg);
}

.gift:nth-child(3n + 2) {
  transform: rotate(0.45deg);
}

.gift:nth-child(3n + 3) {
  transform: rotate(-0.2deg);
}

.gift p {
  margin: 0;
}

.gift.gift--mine {
  background: linear-gradient(180deg, #ffeef1, #ffdbe2);
  box-shadow:
    inset 4px 0 0 #d61f3d,
    0 2px 0 rgba(0, 0, 0, 0.22),
    0 8px 16px rgba(0, 0, 0, 0.24);
  padding-right: 1.8rem;
}

.gift-delete {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #b31b28;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.gift-delete:hover {
  background: #e02434;
  transform: scale(1.08);
}

.gift-delete:disabled {
  opacity: 0.5;
  cursor: progress;
}

.gift-empty {
  padding: 0.9rem 0.7rem;
  border: 1px dashed rgba(255, 179, 189, 0.28);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
  text-align: center;
}

/* ---------- Redacted evidence ---------- */

.gift.gift--redacted {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(61, 255, 134, 0.06) 0 10px,
      rgba(0, 0, 0, 0) 10px 20px
    ),
    #0b0b0b;
  border: 1px solid rgba(61, 255, 134, 0.45);
  color: #d7ffe0;
  box-shadow:
    inset 0 0 24px rgba(15, 122, 61, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.4);
  padding: 0.65rem 0.75rem;
  overflow: hidden;
}

.redacted-bars {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
  opacity: 0.7;
}

.redacted-bars span {
  height: 0.42rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #1f3a2a, #2c4a37, #1b3325);
}

.redacted-bars span:nth-child(1) {
  width: 88%;
}

.redacted-bars span:nth-child(2) {
  width: 64%;
}

.redacted-bars span:nth-child(3) {
  width: 76%;
}

.redacted-stamp {
  display: inline-block;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #3dff86;
  border: 3px double #3dff86;
  border-radius: 3px;
  padding: 0.12rem 0.5rem 0.12rem 0.65rem;
  transform: rotate(-2.2deg);
  text-shadow: 0 0 8px rgba(61, 255, 134, 0.6);
  box-shadow: 0 0 14px rgba(61, 255, 134, 0.25);
}

.redacted-note {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #91b9a1;
}

.inline-redacted {
  font-family: "Special Elite", "Courier New", monospace;
  color: #3dff86;
  letter-spacing: 0.18em;
  border-bottom: 2px solid rgba(61, 255, 134, 0.6);
}

/* ---------- Add form ---------- */

.add-form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.add-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 179, 189, 0.22);
  background: #13090b;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.add-form input::placeholder {
  color: #857074;
}

.add-form input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 59, 82, 0.16);
}

/* ---------- Identity overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  overflow-y: auto;
  background: rgba(3, 8, 5, 0.82);
  backdrop-filter: blur(7px);
  animation: fade-in 0.25s ease both;
}

.overlay[hidden] {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.overlay-card {
  position: relative;
  width: min(880px, 100%);
  padding: clamp(1.3rem, 3vw, 2.5rem);
  border: 1px solid rgba(255, 179, 189, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 59, 82, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(20, 16, 11, 0.98), rgba(9, 13, 9, 0.99));
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  text-align: center;
}

.overlay-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.overlay-title {
  font-size: clamp(2.1rem, 8vw, 5rem);
}

.overlay-sub {
  margin: 0.6rem 0 1.4rem;
  color: var(--ink);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.muted {
  color: var(--muted);
  font-size: 0.85em;
}

.overlay-hint {
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.overlay-error {
  grid-column: 1 / -1;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed rgba(255, 43, 61, 0.5);
  border-radius: 12px;
  color: #ffd7da;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.identity-grid[hidden],
.identity-confirm[hidden] {
  display: none;
}

.identity-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.55rem 0.75rem;
  border: 1px solid rgba(255, 179, 189, 0.18);
  border-radius: 16px;
  background: rgba(24, 11, 15, 0.85);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.identity-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #5f1f2a, #2a0a10);
}

.identity-option span {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.identity-option:hover,
.identity-option:focus-visible {
  outline: none;
  transform: translateY(-4px) rotate(-0.6deg);
  border-color: var(--green);
  box-shadow:
    0 0 0 1px var(--green),
    0 16px 30px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(255, 59, 82, 0.18);
}

.identity-confirm {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1.6rem 1.2rem;
  border: 1px dashed rgba(255, 43, 61, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.confirm-question {
  margin: 0;
  font-family: "Righteous", "Bebas Neue", sans-serif;
  font-weight: 400;
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  color: #fdf8ec;
}

.confirm-question strong {
  color: var(--green);
  text-shadow: 0 0 16px rgba(255, 59, 82, 0.5);
}

.confirm-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 80;
  transform: translateX(-50%);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 82, 0.55);
  background: rgba(22, 6, 12, 0.96);
  color: var(--green-soft);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.22s ease both;
}

.toast[hidden] {
  display: none;
}

.toast.toast--error {
  border-color: rgba(255, 43, 61, 0.65);
  color: #ffd7da;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 680px) {
  .identity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .board {
    width: min(560px, 94vw);
    grid-template-columns: 1fr;
  }

  .board .card {
    --tilt: 0deg;
    --dx: 0px;
    --dy: 0px;
  }

  .own-stamp {
    top: 0.7rem;
    right: 0.6rem;
    font-size: clamp(0.95rem, 4vw, 1.25rem);
  }

  .who {
    gap: 0.45rem;
  }

  .add-form {
    flex-wrap: wrap;
  }

  .add-form .btn-neon {
    flex: 1 0 auto;
  }
}

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