* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 204, 77, 0.3), transparent 34%),
    radial-gradient(circle at 86% 0%, rgba(229, 75, 75, 0.22), transparent 32%),
    #08192d;
  color: #f9f4e8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: 14px;
}

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

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  height: 46px;
  width: 46px;
}

.brand h1 {
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
}

.roomCode {
  background: rgba(255, 250, 240, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  padding: 8px 10px;
}

.hero {
  border-radius: 8px;
  max-height: 240px;
  overflow: hidden;
}

.heroImage {
  display: block;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  width: 100%;
}

.surface,
.panel,
.status {
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  color: #142033;
}

.surface,
.panel {
  padding: 14px;
}

.modeGrid,
.joinRow,
.hostGrid {
  display: grid;
  gap: 12px;
}

.modeGrid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hostGrid {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.modeButton,
.primaryButton {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 46px;
}

.modeButton {
  background: linear-gradient(180deg, #ffcc4d, #e49b22);
  color: #102033;
  font-weight: 800;
  padding: 16px;
  text-align: left;
}

.modeButton strong {
  display: block;
  font-size: 18px;
}

.modeButton span {
  color: rgba(16, 32, 51, 0.72);
  display: block;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.field span,
.muted,
.finePrint {
  color: #5a687a;
  font-size: 13px;
}

input,
textarea {
  background: #fffdf7;
  border: 1px solid #cfc1aa;
  border-radius: 8px;
  color: #142033;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.primaryButton {
  background: linear-gradient(180deg, #35b779, #237a57);
  color: #ffffff;
  font-weight: 800;
  padding: 0 14px;
}

.status {
  color: #445367;
  padding: 10px 12px;
}

.chipList,
.winnerList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.chip,
.winnerList li {
  background: #eef4fb;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  color: #142033;
  padding: 8px 10px;
}

.muted {
  margin: 0 0 10px;
}

h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

@media (max-width: 760px) {
  .app {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hostGrid {
    grid-template-columns: 1fr;
  }
}
