:root {
  --bg: #09080b;
  --panel: #151018;
  --panel-2: #21151e;
  --text: #efe8df;
  --muted: #a99699;
  --red: #9d1723;
  --red-bright: #d92735;
  --green: #1f8f4d;
  --gold: #d6a84f;
  --line: rgba(255,255,255,.12);
  --shadow: rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: radial-gradient(circle at center, #251019 0%, var(--bg) 55%, #030204 100%);
  color: var(--text);
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--red);
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 18px var(--shadow);
  transition: transform .15s ease, filter .15s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.15); }
button.secondary { background: #342332; }
button.danger { background: var(--red-bright); }
button.green { background: var(--green); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #0f0b12;
  color: var(--text);
  margin: 6px 0 12px;
}

label, .label {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; letter-spacing: .08em; }
h2 { color: var(--gold); font-size: 1.2rem; }
h3 { color: var(--text); font-size: 1rem; margin-bottom: 8px; }

.hidden { display: none !important; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(16px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.35);
}
.subtitle { color: var(--muted); margin: 0; }
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}
.layout { padding: 22px clamp(16px, 4vw, 46px); }
.panel {
  background: linear-gradient(180deg, rgba(33,21,30,.96), rgba(14,10,17,.96));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 18px 40px var(--shadow);
}
.auth-panel { max-width: 440px; margin: 40px auto; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { color: var(--muted); font-size: .9rem; }
.game-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.scoreboard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}
.scoreboard strong { font-size: 1.25rem; }
.table-wrap {
  min-height: 620px;
  position: relative;
  overflow: hidden;
}
.table-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, #3b1c20 0%, #160b0f 62%, transparent 63%);
  border: 2px solid rgba(214,168,79,.25);
  box-shadow: inset 0 0 80px rgba(0,0,0,.7), 0 0 50px rgba(157,23,35,.25);
}
.table-center {
  position: absolute;
  inset: 35% 30%;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 2;
}
.doctor {
  font-size: 4rem;
  filter: drop-shadow(0 0 12px var(--red));
  opacity: .85;
}
.table-title { color: var(--gold); font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; }
.table-subtitle { color: var(--muted); }
.player-ring {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.player-seat {
  position: absolute;
  width: 130px;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8,6,10,.88);
  text-align: center;
  transform: translate(-50%, -50%);
}
.player-seat.dead {
  opacity: .42;
  text-decoration: line-through;
}
.player-name { font-weight: bold; }
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}
.badge {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .72rem;
  background: #312131;
  color: var(--muted);
}
.badge.host { color: #111; background: var(--gold); }
.badge.shield { background: #34517a; color: white; }
.badge.dagger { background: #6e1018; color: white; }
.badge.me { background: #efe8df; color: #111; }
.right-column { display: grid; gap: 18px; }
.raven-message {
  min-height: 96px;
  padding: 14px;
  background: rgba(0,0,0,.28);
  border-left: 4px solid var(--red);
  color: #f4d9d9;
  line-height: 1.45;
}
.actions-panel button { width: 100%; margin-bottom: 8px; }
.log-panel { margin: 18px clamp(16px, 4vw, 46px) 40px; }
.public-log {
  max-height: 260px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-entry {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--muted);
}
.cinematic {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.88);
  z-index: 50;
  animation: pulseRed 1.4s infinite alternate;
}
.cinematic-card {
  max-width: 560px;
  padding: 34px;
  border: 1px solid rgba(214,168,79,.35);
  border-radius: 24px;
  background: #0c070a;
  text-align: center;
  box-shadow: 0 0 80px rgba(157,23,35,.45);
}
.cinematic-face { font-size: 7rem; color: var(--red-bright); }
@keyframes pulseRed {
  from { box-shadow: inset 0 0 80px rgba(157,23,35,.1); }
  to { box-shadow: inset 0 0 180px rgba(157,23,35,.35); }
}
.clock-danger { color: var(--red-bright); text-shadow: 0 0 12px var(--red); }
@media (max-width: 900px) {
  .game-shell { grid-template-columns: 1fr; }
  .scoreboard { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { min-height: 540px; }
  .player-seat { width: 112px; font-size: .86rem; }
}
#logoutBtn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: auto !important;
  min-width: 90px;
  white-space: nowrap;
  z-index: 9999;
}

.topbar {
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  margin-left: auto;
}
.chat-panel {
  display: grid;
  gap: 10px;
}

.chat-messages {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.28);
}

.chat-message {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 6px;
  color: var(--text);
  line-height: 1.35;
}

.chat-message strong {
  color: var(--gold);
}

.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-input-row input {
  margin: 0;
}

.chat-input-row button {
  white-space: nowrap;
}

.soft-line {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.dm-notice {
  width: 100%;
  background: #4b2030;
  border: 1px solid var(--gold);
  color: #fff4d6;
  animation: dmPulse 1.2s infinite alternate;
}

.dm-toast {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 99999;
  background: #110910;
  color: #fff4d6;
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 0 35px rgba(157,23,35,.45);
  font-weight: bold;
  max-width: 280px;
}

.death-banner {
  border: 1px solid var(--red-bright);
  background: rgba(80, 0, 10, .45);
  color: #fff;
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 0 30px rgba(157,23,35,.35);
}

.death-banner h2 {
  color: #ffccd1;
  margin-bottom: 6px;
}

@keyframes dmPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.35); }
}

@media (max-width: 700px) {
  .dm-toast {
    top: 72px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .chat-input-row {
    grid-template-columns: 1fr;
  }
}

.designer-subtitle {
  margin: -8px 0 4px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #b8a36a;
  opacity: 0.85;
}
/* ================= LANDING PAGE ================= */

.landing-page {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  overflow-y: auto;
  padding: 18px 14px 90px;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(157,23,35,.20), transparent 34%),
    radial-gradient(circle at bottom, rgba(214,168,79,.08), transparent 38%),
    radial-gradient(circle at center, #251019 0%, #09080b 55%, #030204 100%);
}

.landing-shade {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.62)),
    radial-gradient(circle at center, transparent 0%, rgba(0,0,0,.42) 100%);
  pointer-events: none;
}

.landing-content {
  position: relative;
  width: min(700px, 94vw);
  text-align: center;
  padding: 24px 22px;
  margin-top: 12px;
  border: 1px solid rgba(214,168,79,.24);
  border-radius: 24px;
  background: rgba(8,6,10,.72);
  backdrop-filter: blur(3px);
  box-shadow: 0 0 70px rgba(0,0,0,.68);
}

.landing-title {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 4.7rem);
  letter-spacing: .12em;
  color: #f3e7d7;
  text-shadow: 0 0 22px rgba(157,23,35,.45);
}

.landing-tagline {
  margin: 6px 0 16px;
  color: var(--gold);
  font-size: clamp(1rem, 2.3vw, 1.3rem);
  letter-spacing: .08em;
}

.landing-description {
  max-width: 620px;
  margin: 0 auto 22px;
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  line-height: 1.38;
  color: #efe8df;
}

.landing-description p {
  margin-bottom: 10px;
}

.landing-description strong {
  color: var(--gold);
}

.prove-it {
  color: var(--gold);
  font-size: 1.12em;
  letter-spacing: .08em;
}

.fate-button {
  position: relative;
  z-index: 5;
  width: min(340px, 92%);
  padding: 15px 18px;
  border: 1px solid rgba(214,168,79,.68);
  border-radius: 16px;
  background: linear-gradient(180deg, #9d1723, #4b0a12);
  color: #fff4df;
  font-size: 1rem;
  letter-spacing: .12em;
  box-shadow:
    0 0 26px rgba(157,23,35,.55),
    inset 0 0 18px rgba(255,255,255,.06);
  cursor: pointer;
}

.fate-button:hover {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.16);
  box-shadow:
    0 0 42px rgba(217,39,53,.72),
    inset 0 0 18px rgba(255,255,255,.10);
}

.landing-hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .landing-page {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 110px;
  }

  .landing-content {
    padding: 18px 16px;
    margin-top: 6px;
  }

  .landing-description {
    line-height: 1.32;
  }

  .landing-description p {
    margin-bottom: 8px;
  }
}