:root {
  --bg: #0b1220;
  --panel: #121b2e;
  --text: #eef3ff;
  --accent: #ff9f1c;
  --danger: #e63946;
  --ok: #2ec4b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1d2d50 0%, var(--bg) 55%);
  color: var(--text);
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px;
}

.entry-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.entry-title {
  text-align: center;
  font-size: 3rem;
  line-height: 0.95;
  margin: 8px 0 16px;
  color: #f2f5ff;
}

.entry-card {
  background: linear-gradient(145deg, #081737, #0d234f);
}

.entry-primary {
  background: #0a1b44;
  border-radius: 14px;
  padding: 14px;
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
}

.entry-primary button {
  width: 100%;
}

.entry-create-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.entry-create-link {
  background: transparent;
  color: #e5ebff;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar.hidden {
  display: none;
}

#global-room-code {
  font-size: 0.8rem;
  opacity: 0.85;
}

.screen {
  display: none;
  animation: fade 0.2s ease;
}

.screen.active {
  display: block;
}

h1 {
  font-size: 1.3rem;
}

label {
  display: block;
  margin: 10px 0;
}

input {
  width: 100%;
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #202020;
}

.danger {
  background: var(--danger);
  color: #fff;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.full {
  width: 100%;
  margin-bottom: 8px;
}

.button-gap-double {
  height: 96px;
}

.panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.updates-panel {
  margin-top: 8px;
}

.updates-panel ul {
  margin: 0;
  padding-left: 18px;
  max-height: 120px;
  overflow-y: auto;
}

#active-rooms-list button {
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.house {
  background: var(--panel);
  border-radius: 12px;
  padding: 10px;
}

.house button {
  width: 100%;
  margin-top: 8px;
}

.house.dead {
  opacity: 0.45;
}

.hud {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.word {
  font-size: 1.5rem;
  letter-spacing: 0.15rem;
  font-weight: 800;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  background: #0f172a;
  padding: 10px 14px;
  border-radius: 9px;
  display: none;
}

.toast.show {
  display: block;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
