:root {
  --bg: #06130d;
  --panel: #101f15;
  --panel-2: #0a160f;
  --line: rgba(244, 240, 216, 0.13);
  --muted: rgba(255, 255, 255, 0.48);
  --white: #fffdf3;
  --gold: #f2c94c;
  --red: #ff3636;
  --green: #77d12b;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  direction: rtl;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 14%, rgba(242, 201, 76, 0.12), transparent 22%),
    linear-gradient(180deg, #06140d 0%, #07140e 56%, #06100b 100%);
  color: var(--white);
  font-family: Tahoma, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.start-app {
  width: min(390px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 26px 0;
}

.app-logo {
  width: 78px;
  height: 58px;
  margin-bottom: 4px;
  color: var(--gold);
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 22px rgba(242, 201, 76, 0.25));
}

.app-title {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: clamp(2.1rem, 8vw, 2.85rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28), 0 0 24px rgba(242, 201, 76, 0.18);
}

.room-strip,
.choice-card {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(34, 51, 39, 0.92), rgba(10, 22, 15, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.18);
}

.room-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 3px solid rgba(242, 201, 76, 0.44);
  padding: 0 26px;
}

.room-label {
  color: var(--muted);
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 900;
}

.room-code-val {
  direction: ltr;
  color: var(--gold);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 1.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}

.choice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  color: #d7dfd8;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  filter: brightness(1.16);
  transform: translateY(-1px);
  outline: none;
}

.choice-card:active {
  transform: translateY(0);
}

.choice-card span {
  min-width: 0;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 900;
  line-height: 1.15;
}

.presenter-card {
  border-top: 4px solid rgba(186, 197, 190, 0.84);
}

.teams-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  direction: ltr;
}

.teams-row .choice-card {
  direction: rtl;
  min-height: 70px;
  padding: 0 20px;
}

.green-card {
  border-top: 4px solid var(--green);
  color: var(--green);
}

.red-card {
  border-top: 4px solid var(--red);
  color: #ff6262;
}

.public-card {
  justify-content: center;
  border-top: 4px solid rgba(160, 171, 164, 0.62);
  color: #cfd8d1;
}

.qr-card-button {
  justify-content: center;
  border-top: 4px solid rgba(242, 201, 76, 0.42);
  color: var(--gold);
}

.card-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0.76;
}

.qr-mini-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.78;
}

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 5, 0.88);
  backdrop-filter: blur(6px);
}

.qr-overlay[hidden] {
  display: none;
}

.qr-modal {
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  border-radius: 14px;
  background: #fffdf3;
  color: #07130d;
  padding: 22px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
}

.qr-modal h2 {
  margin: 0;
  font-size: 1.1rem;
}

.qr-frame {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f4f4f4;
  overflow: hidden;
}

.qr-img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-room {
  margin: 0;
  color: #5a635c;
  font-size: 0.86rem;
}

.qr-room strong {
  color: #07130d;
  letter-spacing: 0.14em;
}

.qr-close {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #07130d;
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 420px) {
  .start-app {
    gap: 18px;
  }

  .teams-row {
    gap: 10px;
  }

  .choice-card {
    padding: 0 18px;
  }

  .teams-row .choice-card {
    padding: 0 14px;
  }

  .card-icon {
    width: 28px;
    height: 28px;
  }
}
