:root {
  --bg: #070b11;
  --bg-elevated: rgba(14, 21, 31, 0.92);
  --bg-panel: rgba(10, 15, 23, 0.82);
  --line: rgba(213, 179, 95, 0.28);
  --text: #f4efe3;
  --muted: #b7ad96;
  --accent: #d6a43e;
  --accent-2: #8ab8ff;
  --danger: #c96e58;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(214, 164, 62, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(138, 184, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #04070d, #0d121b 48%, #111822);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero,
.stack,
.panel,
.header-bar {
  backdrop-filter: blur(16px);
}

.hero {
  padding: 72px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(17, 22, 31, 0.92), rgba(11, 15, 22, 0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='rgba(214,164,62,0.10)'%3E%3Cpath d='M0 40h240M0 120h240M0 200h240'/%3E%3Cpath d='M40 0v240M120 0v240M200 0v240'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: var(--shadow);
}

.eyebrow,
.panel-kicker {
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.lede,
.panel p,
.stack p,
.roadmap-item p,
.empty-state,
.meta-line {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.hero .lede {
  max-width: 58ch;
  margin: 24px 0 0;
  font-size: 1.15rem;
}

.hero-actions,
.badge-group,
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #f3c765, #d6942c);
  color: #231707;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.header-actions,
.form-actions,
.inline-cta,
.player-actions,
.control-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.panel-grid,
.setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary {
  margin-top: 18px;
}

.panel,
.stack,
.header-bar {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.panel,
.stack {
  padding: 28px;
}

.stack {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.stack-chip,
.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.92rem;
}

.badge-hot {
  background: linear-gradient(135deg, rgba(243, 199, 101, 0.24), rgba(214, 148, 44, 0.14));
  border-color: rgba(243, 199, 101, 0.3);
}

.header-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 28px;
  margin-bottom: 18px;
}

.error-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  color: #fff4f2;
  background: rgba(201, 110, 88, 0.18);
  border: 1px solid rgba(201, 110, 88, 0.36);
}

.success-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  color: #effff5;
  background: rgba(67, 138, 103, 0.22);
  border: 1px solid rgba(97, 194, 143, 0.36);
}

.source-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.source-form label {
  display: grid;
  gap: 8px;
}

.source-form span {
  font-size: 0.94rem;
  color: var(--muted);
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(214, 164, 62, 0.36);
  outline-offset: 2px;
}

input:disabled,
button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.preview-panel,
.roadmap-panel {
  min-height: 520px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.media-list,
.roadmap-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.media-list {
  display: grid;
  gap: 14px;
}

.media-row,
.roadmap-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.media-row:first-child,
.roadmap-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.muted {
  color: var(--muted);
}

.notes {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notes p {
  margin: 0 0 10px;
  color: var(--muted);
}

.compact {
  max-width: 60ch;
}

.room-summary-panel,
.join-panel,
.player-panel {
  min-height: 320px;
}

.compact-form {
  margin-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.single-row {
  margin-top: 16px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card strong {
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.stat-card span,
.join-card-label,
.mini-ranking-label,
.player-budget small {
  color: var(--muted);
  font-size: 0.92rem;
}

.join-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(214, 164, 62, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(214, 164, 62, 0.22);
}

.simple-list,
.ranked-list,
.bid-list,
.quote-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.simple-row,
.ranked-row,
.bid-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.simple-row:first-child,
.ranked-row:first-child,
.bid-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.ranked-main,
.bid-copy {
  display: flex;
  gap: 14px;
  align-items: center;
}

.rank-badge,
.score-puck,
.player-budget {
  display: grid;
  place-items: center;
  min-width: 56px;
  min-height: 56px;
  padding: 10px;
  border-radius: 18px;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ranked-row-hot .rank-badge,
.ranked-row-hot .score-puck,
.player-budget {
  background: linear-gradient(135deg, rgba(243, 199, 101, 0.24), rgba(214, 148, 44, 0.16));
  border-color: rgba(243, 199, 101, 0.28);
}

.bid-input {
  display: grid;
  gap: 8px;
  min-width: 102px;
}

.bid-input span {
  color: var(--muted);
  font-size: 0.9rem;
}

.quote-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 14px;
}

.quote-card:first-child {
  margin-top: 0;
}

.quote-card-header {
  display: flex;
  gap: 14px;
  align-items: start;
}

.frame-preview {
  display: block;
  width: min(100%, 360px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.option-group,
.choice-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.choice-stack {
  display: grid;
}

.choice-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.choice-row input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.answer-field {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.answer-field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.answer-field textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.answer-field textarea:focus {
  outline: 2px solid rgba(214, 164, 62, 0.36);
  outline-offset: 2px;
}

.reveal-copy {
  margin-top: 14px;
  color: var(--muted);
}

.frame-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.choice-row-frame {
  align-items: start;
}

.choice-row-correct {
  border-color: rgba(243, 199, 101, 0.45);
  background: rgba(243, 199, 101, 0.1);
}

.frame-choice-copy {
  display: grid;
  gap: 10px;
  width: 100%;
}

.frame-choice-image {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.quote-form {
  margin-top: 18px;
}

.join-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.player-shell {
  width: min(100%, 980px);
  margin: 0 auto;
}

.player-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.player-budget {
  justify-items: center;
  min-width: 148px;
}

.player-budget span {
  font-size: 1.6rem;
}

.mini-ranking {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-ranking-label {
  margin-bottom: 10px;
}

.bid-form {
  margin-top: 18px;
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100% - 28px, 1180px);
    padding: 20px 0 48px;
  }

  .hero,
  .panel,
  .stack,
  .header-bar {
    padding: 22px;
  }

  .panel-grid,
  .setup-grid,
  .stack,
  .stats-grid,
  .join-layout {
    grid-template-columns: 1fr;
  }

  .header-bar,
  .preview-header,
  .media-row,
  .join-card,
  .simple-row,
  .ranked-row,
  .bid-row,
  .player-topline {
    flex-direction: column;
    align-items: start;
  }
}
