/* All decorative photos are shipped with the site, never requested remotely. */
:root {
  --nature-red: url('/images/nature-red-v1.webp');
  --nature-blue: url('/images/nature-blue-v1.webp');
  --nature-forest: url('/images/nature-forest-v1.webp');
  --nature-night: url('/images/nature-night-v1.webp');
  --card-neutral: url('/images/card-neutral-cotton-v1.webp');
  --card-danger: url('/images/card-danger-underwater-v1.webp');
}

/* A cinematic setting made from our own local nature photograph. */
body {
  background: #080e1b;
  isolation: isolate;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 95% 15%, #971c3338, transparent 52%),
    radial-gradient(ellipse at 0% 35%, #155fba45, transparent 55%),
    linear-gradient(#080e1be3, #080e1bf5), var(--nature-night);
  background-size: cover;
  background-position: center;
}
.topbar { border-color: #a8c9ff20; }
.brand-mark { box-shadow: 0 0 28px #a6f3cb20; }
.home h1 { text-shadow: 0 5px 35px #0008; }
.home h1 span { text-shadow: 0 0 30px #a6f3cb25; }
.play-panel, .team-panel, .turn-panel, .clue-form {
  background: linear-gradient(145deg, #27344bbf, #101a2ae8);
  border-color: #aacaff35;
  box-shadow: inset 0 1px 0 #ffffff0b, 0 18px 55px #0005;
  backdrop-filter: blur(16px);
}
.play-panel { animation: scene-enter .45s ease-out both; }
.primary { box-shadow: 0 5px 22px #a6f3cb1c; }
.team-preview {
  box-shadow: inset 0 1px 0 #ffffff30, 0 14px 30px #0005;
  transition: transform .2s ease, box-shadow .2s ease;
}
.team-preview.red { box-shadow: inset 0 1px 0 #ffffff30, 0 10px 35px #be294b20; }
.team-preview.blue { box-shadow: inset 0 1px 0 #ffffff30, 0 10px 35px #287ae42b; }
.score.red.active { box-shadow: 0 0 0 1px #ff6c7970, 0 0 26px #ff6c791c; }
.score.blue.active { box-shadow: 0 0 0 1px #70aaff70, 0 0 26px #70aaff26; }
.card, .mini-card {
  box-shadow: 0 4px 0 #030810, 0 8px 18px #0006, inset 0 1px 0 #ffffff40;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card.revealed { animation: card-reveal .32s ease-out both; }
@media (hover: hover) and (pointer: fine) {
  .team-preview:hover { transform: translateY(-3px); }
  .card.can-guess:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 0 #030810, 0 12px 26px #0007, 0 0 0 2px #a6f3cb66;
  }
}
@keyframes scene-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes card-reveal {
  from { transform: scale(.96); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.team-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 25px 0 0;
}
.team-preview {
  display: flex;
  align-items: flex-end;
  min-height: 142px;
  padding: 17px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 25px #0003;
}
.team-preview.red {
  border-color: #ff8a9066;
  background-image: linear-gradient(180deg, #19090e05 10%, #250910e8 100%), var(--nature-red);
}
.team-preview.blue {
  border-color: #8dbbff66;
  background-image: linear-gradient(180deg, #09132305 10%, #08162ce8 100%), var(--nature-blue);
}
.team-preview span {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 2px 4px #0009;
}
.team-tags { margin: 12px 0 22px; }

/* The room's team cards keep their player lists on a quiet, solid surface. */
.team-panel { overflow: hidden; }
.team-title {
  min-height: 122px;
  margin: -22px -22px 12px;
  padding: 22px;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  color: #fff;
  text-shadow: 0 2px 4px #0009;
}
.team-red { border-color: #ff6c7955; }
.team-blue { border-color: #70aaff55; }
.team-red .team-title {
  background-image: linear-gradient(180deg, #23070e10, #23070eeb), var(--nature-red);
}
.team-blue .team-title {
  background-image: linear-gradient(180deg, #07152a10, #07152aeb), var(--nature-blue);
}
.team-title > span:last-child {
  min-width: 32px;
  padding: 2px 8px;
  text-align: center;
  background: #091323b3;
  border: 1px solid #ffffff44;
  border-radius: 9px;
  font-size: 17px;
}
.score {
  background-size: cover;
  background-position: center;
}
.score.red, .score.red.active {
  background-image: linear-gradient(90deg, #220813e8, #161626e0), var(--nature-red);
}
.score.blue, .score.blue.active {
  background-image: linear-gradient(90deg, #091d38e8, #131d31e0), var(--nature-blue);
}
.score .label, .score strong { text-shadow: 0 2px 4px #0008; }
.score small { color: #e4eaf3; }

/* An unrevealed card always has this same forest background for every role.
   Only the public color supplied by the server selects a team photograph. */
.card, .mini-card {
  background-color: #213b2d;
  background-image: linear-gradient(#0b23162e, #0a21133d), var(--nature-forest);
  background-size: cover;
  background-position: center;
  color: #fff;
  border-color: #718573;
}
.card.red, .mini-card.red {
  background-image: linear-gradient(#65132833, #6c102946), var(--nature-red);
  border-color: #ffa1a9;
  color: #fff;
}
.card.blue, .mini-card.blue {
  background-image: linear-gradient(#072d6233, #10396d46), var(--nature-blue);
  border-color: #afd0ff;
  color: #fff;
}
.card.neutral {
  background-image: linear-gradient(#634c1410, #634c141a), var(--card-neutral);
  border-color: #f0e4c7;
  color: #40341c;
}
.card.danger {
  background-image: linear-gradient(#070d1610, #070d162b), var(--card-danger);
  border-color: #64718b;
  color: #fff;
}
.mini-card.mint {
  background-image: linear-gradient(#0b23162e, #0a21133d), var(--nature-forest);
  color: #fff;
  border-color: #a6f3cb;
}
.card.red, .card.blue, .card.neutral, .card.danger,
.mini-card.red, .mini-card.blue, .mini-card.mint,
.score.red, .score.blue, .score.red.active, .score.blue.active {
  background-size: cover;
  background-position: center;
}
.card-label, .card .symbol-label {
  display: block;
  max-width: calc(100% - 10px);
  background: #dbe8d5;
  color: #172333;
  border-radius: 7px;
  padding: 4px 9px;
  box-shadow: 0 2px 7px #0002;
  text-shadow: none;
}
.card.red .card-label, .card.red .symbol-label { background: var(--red); color: #4b1224; }
.card.blue .card-label, .card.blue .symbol-label { background: var(--blue); color: #102a4d; }
.card.neutral .card-label, .card.neutral .symbol-label { background: var(--neutral); color: #40341c; }
.card.danger .card-label, .card.danger .symbol-label { background: #10151f; color: #fff; }
.card.danger .card-label { position: absolute; bottom: 8px; }
.card.revealed { opacity: 1; box-shadow: inset 0 0 0 2px #ffffff40; }
.card.revealed::after {
  background: #091323d9;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
}
.mini-card { text-shadow: 0 1px 4px #000, 0 0 8px #000; }

@media (max-width: 620px) {
  .team-previews { margin-top: 18px; gap: 10px; }
  .team-preview { min-height: 112px; border-radius: 12px; padding: 13px; }
  .team-preview span { font-size: 15px; }
  .team-tags { margin: 10px 0 0; }
  .team-title { margin: -18px -18px 10px; padding: 18px; min-height: 115px; }
  .card { font-size: 14px; }
  .card-label, .card .symbol-label { max-width: calc(100% - 4px); border-radius: 4px; padding: 3px 4px; }
  .card .symbol-label { font-size: 12px; }
  .card.danger .card-label { bottom: 4px; }
  .board.symbols .card { aspect-ratio: .75; }
  .card.revealed::after { width: 16px; height: 16px; top: 2px; left: 3px; }
}
