:root {
  --bg: #050713;
  --panel: rgba(12, 18, 34, 0.78);
  --line: rgba(92, 128, 255, 0.26);
  --green: #35ff98;
  --cyan: #51e8ff;
  --purple: #9d6bff;
  --red: #ff5f7a;
  --text: #f0f7ff;
  --muted: rgba(224, 238, 255, 0.62);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 12%, rgba(57, 255, 159, 0.2), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(109, 95, 255, 0.3), transparent 32%),
    linear-gradient(135deg, #03040b 0%, #091329 52%, #050713 100%);
}

.screen {
  width: 100vw;
  min-height: 100vh;
  padding: 3vh 3vw;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2.4vh;
}

.topbar,
.card,
.control-card,
.login-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 36px rgba(81, 232, 255, 0.08), inset 0 0 30px rgba(53, 255, 152, 0.03);
  backdrop-filter: blur(14px);
}

.topbar {
  min-height: 104px;
  border-radius: 28px;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  font-size: clamp(32px, 3.6vw, 64px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 22px rgba(81, 232, 255, 0.5);
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 24px);
}

.status-pill {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(53, 255, 152, 0.35);
  color: var(--green);
  font-weight: 900;
  font-size: clamp(18px, 1.5vw, 28px);
  background: rgba(53, 255, 152, 0.08);
}

.screen-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2vw;
}

.main-card {
  border-radius: 34px;
  padding: 3vh 3vw;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 2.2vh;
}

.level-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.level {
  font-size: clamp(52px, 6vw, 116px);
  font-weight: 1000;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(81, 232, 255, 0.5);
}

.phase {
  color: var(--muted);
  font-size: clamp(22px, 2vw, 38px);
  font-weight: 900;
}

.timer {
  text-align: center;
  font-size: clamp(110px, 15vw, 260px);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 0 42px rgba(53, 255, 152, 0.5);
}

.paused-banner {
  display: none;
  text-align: center;
  color: var(--red);
  font-size: clamp(30px, 3vw, 62px);
  font-weight: 1000;
  text-shadow: 0 0 24px rgba(255, 95, 122, 0.45);
}

.show-banner .paused-banner {
  display: block;
}

.blind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2vw;
}

.blind-box,
.info-box {
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(81, 232, 255, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.blind-label,
.info-label {
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 20px);
  font-weight: 800;
}

.blind-value {
  margin-top: 10px;
  color: var(--green);
  font-size: clamp(34px, 3.5vw, 76px);
  font-weight: 1000;
}

.side {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 2vh;
}

.side-card {
  border-radius: 28px;
  padding: 24px;
}

.next-blinds {
  color: var(--cyan);
  font-size: clamp(30px, 2.8vw, 58px);
  font-weight: 1000;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-value {
  margin-top: 8px;
  font-size: clamp(22px, 2vw, 38px);
  font-weight: 1000;
}

.qr {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.qr img {
  width: 180px;
  height: 180px;
  padding: 10px;
  border-radius: 22px;
  background: #fff;
}

.qr-title {
  color: var(--green);
  font-size: 26px;
  font-weight: 1000;
}

.qr-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.login-page,
.control-page {
  min-height: 100vh;
  padding: 22px;
}

.login-page {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  border-radius: 28px;
  padding: 28px;
}

.login-title {
  font-size: 30px;
  font-weight: 1000;
}

.field {
  margin-top: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(81, 232, 255, 0.2);
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.control-page {
  max-width: 780px;
  margin: 0 auto;
}

html.control-html,
html.control-html body.control-page-body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.control-page-body {
  -webkit-overflow-scrolling: touch;
}

body.control-page-body .control-page {
  min-height: 100vh;
  padding-bottom: 28px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.control-title {
  font-size: 28px;
  font-weight: 1000;
}

.control-card {
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 14px;
}

.control-timer {
  font-size: 64px;
  line-height: 1;
  font-weight: 1000;
  color: var(--green);
}

.control-meta {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  color: #041015;
  background: linear-gradient(90deg, var(--green), #9fffd1);
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: rgba(81, 232, 255, 0.12);
  border: 1px solid rgba(81, 232, 255, 0.22);
}

button.warning {
  color: #fff;
  background: rgba(255, 95, 122, 0.72);
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.error-text {
  min-height: 20px;
  margin-top: 12px;
  color: #ff9a9a;
}

@media (max-width: 900px) {
  .screen-grid {
    grid-template-columns: 1fr;
  }
  .timer {
    font-size: 28vw;
  }
  .qr {
    grid-template-columns: 120px 1fr;
  }
  .qr img {
    width: 120px;
    height: 120px;
  }
}

/* Tournament TV screen */
.tournament-screen {
  position: relative;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 1.45vh 1.55vw 1.9vh;
  grid-template-rows: 58px 1fr 122px;
  gap: 1.25vh;
  background: #020612;
}

.tournament-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(0, 210, 255, 0.13), transparent 45%),
    linear-gradient(
      180deg,
      rgba(2, 6, 18, 0.52) 0%,
      rgba(2, 6, 18, 0.36) 45%,
      rgba(2, 6, 18, 0.60) 100%
    );
}

.tournament-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.34) 100%);
}

.screen-felt {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: scale(1.02);
  background-image: url("/tournament/assets/screen-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.78) saturate(1) blur(0.8px);
}

.tournament-topbar {
  position: relative;
  z-index: 2;
  min-height: 0;
  border-radius: 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr 0.8fr;
  align-items: center;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.tournament-topbar .brand {
  width: max-content;
  padding: 10px 18px;
  border: 1px solid rgba(65, 220, 255, 0.28);
  border-radius: 16px;
  background: rgba(5, 10, 25, 0.48);
  backdrop-filter: blur(10px);
  font-size: clamp(28px, 3vw, 50px);
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fbff;
  text-shadow:
    0 0 14px rgba(80, 220, 255, 0.24),
    0 0 28px rgba(0, 180, 255, 0.12);
}

.clock-title {
  text-align: center;
  font-size: clamp(18px, 1.65vw, 30px);
  font-weight: 1000;
  letter-spacing: 0.04em;
  color: #f7fbff;
  text-shadow:
    0 0 12px rgba(80, 220, 255, 0.22),
    0 0 22px rgba(0, 180, 255, 0.1);
}

.clock-title span,
.beijing-time span,
.metric-card small,
.center-blinds span,
.footer-info span {
  display: block;
  color: rgba(226, 239, 255, 0.66);
  font-size: clamp(11px, 0.9vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.beijing-time {
  justify-self: end;
  text-align: right;
}

.beijing-time strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: clamp(28px, 3vw, 52px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-shadow:
    0 0 12px rgba(67, 243, 255, 0.25),
    0 0 24px rgba(53, 255, 152, 0.18);
}

.tournament-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(560px, 2.05fr) minmax(190px, 0.72fr);
  gap: 1.35vw;
  min-height: 0;
}

.board-column {
  display: grid;
  gap: 1.1vh;
}

.metric-card {
  border: 1px solid rgba(65, 220, 255, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(5, 10, 25, 0.42);
  box-shadow:
    inset 0 0 28px rgba(0, 180, 255, 0.06),
    0 0 20px rgba(0, 150, 255, 0.08);
  backdrop-filter: blur(10px);
}

.metric-card span {
  display: block;
  color: rgba(248, 251, 255, 0.84);
  font-size: clamp(14px, 1.15vw, 22px);
  font-weight: 850;
  letter-spacing: 0.03em;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  color: #43f3ff;
  font-size: clamp(42px, 4.1vw, 86px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 12px rgba(67, 243, 255, 0.22),
    0 0 24px rgba(0, 180, 255, 0.12);
}

.metric-card.tall strong {
  color: var(--green);
  font-size: clamp(76px, 7.5vw, 150px);
}

.tournament-clock-card {
  min-height: 0;
  position: relative;
  border-radius: 18px;
  padding: 1.35vh 1.55vw;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(53, 255, 152, 0.12), transparent 42%),
    rgba(5, 8, 28, 0.58);
  border-color: rgba(65, 220, 255, 0.36);
  box-shadow:
    inset 0 0 28px rgba(0, 180, 255, 0.06),
    0 0 20px rgba(0, 150, 255, 0.08);
  backdrop-filter: blur(10px);
}

.tournament-clock-card .level {
  text-align: center;
  color: #45ecff;
  max-width: 90%;
  margin: 0 auto;
  font-size: clamp(34px, 3.75vw, 66px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow:
    0 0 14px rgba(69, 236, 255, 0.28),
    0 0 30px rgba(0, 180, 255, 0.14);
}

.tournament-title span {
  display: block;
  white-space: nowrap;
}

.tournament-title span + span {
  margin-top: 4px;
}

.tournament-clock-card .timer {
  font-family: "Arial Black", Impact, "DIN Alternate", "Avenir Next Condensed", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(126px, 17vw, 310px);
  color: #f8fbff;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.22),
    0 0 18px rgba(0, 255, 220, 0.2),
    0 0 40px rgba(0, 220, 255, 0.14);
}

.center-blinds {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr 1.2fr;
  gap: 10px;
  margin-top: 6px;
}

.center-blinds div {
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(5, 10, 25, 0.38);
  border: 1px solid rgba(65, 220, 255, 0.28);
  backdrop-filter: blur(10px);
}

.center-blinds strong {
  display: block;
  margin-top: 6px;
  color: #44ffb0;
  font-size: clamp(30px, 3vw, 62px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 10px rgba(68, 255, 176, 0.22),
    0 0 22px rgba(0, 220, 255, 0.1);
}

.status-row {
  margin-top: 14px;
  text-align: center;
  color: rgba(226, 239, 255, 0.68);
  font-size: clamp(22px, 1.8vw, 36px);
  font-weight: 900;
  letter-spacing: 0.03em;
}

.status-row span {
  color: #fff;
}

.screen-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 1vw;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid rgba(80, 220, 255, 0.18);
  border-radius: 16px;
  padding: 10px 10px 12px;
  background-color: rgba(5, 10, 25, 0.34);
  box-shadow:
    inset 0 0 28px rgba(0, 180, 255, 0.06),
    0 0 20px rgba(0, 150, 255, 0.08);
  backdrop-filter: blur(10px);
}

.screen-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(2, 8, 24, 0.1);
  pointer-events: none;
}

.screen-footer > * {
  position: relative;
  z-index: 2;
}

.footer-info {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 0.8fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.footer-stat {
  min-height: 92px;
  padding: 10px 14px 12px;
  border: 1px solid rgba(65, 220, 255, 0.28);
  border-radius: 16px;
  background: rgba(5, 10, 25, 0.4);
  box-shadow:
    inset 0 0 28px rgba(0, 180, 255, 0.06),
    0 0 20px rgba(0, 150, 255, 0.08);
  backdrop-filter: blur(10px);
}

.footer-info strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: clamp(15px, 1.15vw, 22px);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(67, 243, 255, 0.14);
}

.footer-sub-label {
  margin-top: 8px;
}

.footer-location {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-qr {
  border: 1px solid rgba(65, 220, 255, 0.28);
  border-radius: 14px;
  padding: 8px;
  background: rgba(5, 10, 25, 0.56);
  grid-template-columns: 76px 1fr;
  min-height: 92px;
  box-shadow:
    inset 0 0 28px rgba(0, 180, 255, 0.06),
    0 0 20px rgba(0, 150, 255, 0.08);
  backdrop-filter: blur(10px);
}

.screen-qr img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.24);
}

.screen-qr .qr-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(68, 255, 176, 0.16);
}

.screen-qr .qr-sub {
  margin-top: 5px;
  font-size: 9px;
  word-break: break-all;
}

/* Reference-style tournament clock layout */
.reference-topbar {
  grid-template-columns: 1.05fr 0.5fr 0.9fr;
  height: 72px;
}

.screen-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.screen-brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.screen-brand .brand {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  font-size: clamp(22px, 2.2vw, 40px);
  letter-spacing: 0.07em;
}

.screen-brand span {
  display: block;
  margin-top: 2px;
  color: rgba(248, 251, 255, 0.78);
  font-size: clamp(12px, 0.95vw, 18px);
  font-weight: 850;
  letter-spacing: 0.04em;
}

.reference-topbar .clock-title {
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 2px;
}

.reference-topbar .clock-title strong {
  color: #f7fbff;
  font-size: clamp(26px, 2.8vw, 52px);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.18);
}

.reference-topbar .clock-title span {
  color: rgba(248, 251, 255, 0.82);
  font-size: clamp(16px, 1.5vw, 26px);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.reference-board {
  grid-template-columns: 21.5vw 1fr 25vw;
  gap: 1.4vw;
  align-items: stretch;
}

.reference-left,
.reference-right {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 4.8vh;
}

.reference-right {
  padding-left: 2vw;
  border-left: 1px solid rgba(248, 251, 255, 0.46);
}

.side-stat {
  padding: 0.4vh 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.side-stat span {
  display: block;
  color: rgba(248, 251, 255, 0.88);
  font-size: clamp(24px, 2vw, 40px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.side-stat small {
  display: block;
  color: rgba(248, 251, 255, 0.82);
  font-size: clamp(18px, 1.45vw, 30px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.side-stat strong {
  display: block;
  margin-top: 8px;
  color: #f8fbff;
  font-size: clamp(28px, 3vw, 62px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.18),
    0 0 18px rgba(0, 180, 255, 0.12);
}

.reference-left .side-stat {
  text-align: right;
  padding-right: 1.2vw;
}

.reference-right .side-stat {
  text-align: left;
}

.registration-badge {
  justify-self: end;
  margin-right: 1.2vw;
  margin-top: 1vh;
  padding: 10px 20px;
  border-radius: 8px;
  color: #072821;
  background: linear-gradient(180deg, #5ef7c0, #32caa1);
  font-size: clamp(15px, 1.15vw, 22px);
  font-weight: 950;
  box-shadow: 0 0 18px rgba(68, 255, 176, 0.2);
}

.registration-badge.closed {
  color: #fff;
  background: linear-gradient(180deg, #b45561, #77313b);
  box-shadow: 0 0 16px rgba(255, 95, 122, 0.18);
}

.phase-cache {
  display: none;
}

.reference-main-card {
  position: relative;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-items: center;
}

.activity-atmosphere {
  position: absolute;
  inset: 12% 9% 16%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  filter: blur(1px);
}

.activity-atmosphere span {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(90px, 10vw, 170px);
  height: clamp(128px, 14vw, 238px);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: clamp(36px, 4vw, 76px);
  font-weight: 1000;
}

.activity-atmosphere span:nth-child(1) {
  left: 24%;
  top: 0;
  transform: rotate(-14deg);
}

.activity-atmosphere span:nth-child(2) {
  left: 43%;
  top: 12%;
  transform: rotate(12deg);
}

.activity-atmosphere span:nth-child(3) {
  left: 35%;
  top: 42%;
  transform: rotate(-7deg);
}

.reference-main-card .tournament-title {
  position: relative;
  z-index: 1;
  color: rgba(248, 251, 255, 0.92);
  font-size: clamp(24px, 2.5vw, 44px);
  line-height: 1.08;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
}

.reference-main-card .timer {
  position: relative;
  z-index: 1;
  align-self: center;
  font-size: clamp(126px, 18vw, 310px);
  color: #f7fbff;
  letter-spacing: 0.01em;
}

.reference-main-card .paused-banner {
  position: relative;
  z-index: 1;
}

.blind-table {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(150px, 0.62fr) minmax(280px, 1fr);
  gap: 1vw;
  width: min(620px, 92%);
  margin: 0 auto;
  align-items: center;
}

.blind-labels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  text-align: right;
}

.blind-labels span {
  color: rgba(248, 251, 255, 0.78);
  font-size: clamp(18px, 1.6vw, 32px);
  line-height: 1.02;
  font-weight: 850;
}

.blind-labels small {
  margin-bottom: 8px;
  color: rgba(248, 251, 255, 0.9);
  font-size: clamp(18px, 1.55vw, 30px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.blind-values {
  display: grid;
  gap: 7px;
  text-align: right;
}

.blind-values strong {
  color: #f8fbff;
  font-size: clamp(28px, 3vw, 58px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.14),
    0 0 18px rgba(0, 180, 255, 0.1);
}

.reference-main-card .status-row {
  position: relative;
  z-index: 1;
  margin-top: 1.3vh;
  font-size: clamp(15px, 1.2vw, 22px);
  color: rgba(248, 251, 255, 0.72);
}

.reference-footer {
  grid-template-columns: 1fr auto;
  min-height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.reference-footer::before {
  display: none;
}

.reference-footer-info {
  display: flex;
  align-items: end;
  gap: 18px;
  min-width: 0;
}

.reference-footer-info > div {
  min-width: 0;
}

.reference-footer-info .hidden-footer-field {
  display: none;
}

.reference-footer-info span {
  color: rgba(248, 251, 255, 0.62);
  font-size: clamp(10px, 0.82vw, 14px);
}

.reference-footer-info strong {
  color: rgba(248, 251, 255, 0.88);
  font-size: clamp(12px, 0.95vw, 16px);
  white-space: nowrap;
}

.reference-footer .screen-qr {
  grid-template-columns: 54px 160px;
  min-height: 54px;
  padding: 5px 8px;
  border: 0;
  background: rgba(5, 10, 25, 0.34);
}

.reference-footer .screen-qr img {
  width: 54px;
  height: 54px;
  border-radius: 5px;
  padding: 3px;
}

.reference-footer .qr-title {
  font-size: 12px;
}

.reference-footer .qr-sub {
  display: none;
}

/* Structural alignment pass */
.tournament-screen {
  padding: 1.6vh 2vw 1.8vh;
  grid-template-rows: 74px minmax(0, 1fr) 86px;
  gap: 1.45vh;
}

.reference-topbar {
  height: 74px;
  grid-template-columns: minmax(320px, 1fr) 240px minmax(260px, 1fr);
  align-items: center;
}

.screen-brand {
  gap: 10px;
}

.screen-brand img {
  width: 54px;
  height: 54px;
}

.screen-brand .brand {
  font-size: clamp(24px, 2.45vw, 42px);
  line-height: 1;
}

.screen-brand span {
  font-size: clamp(12px, 0.95vw, 16px);
}

.reference-topbar .clock-title {
  align-self: center;
  justify-self: center;
  min-width: 190px;
  padding-top: 2px;
  text-align: center;
}

.reference-topbar .clock-title strong {
  font-size: clamp(30px, 2.7vw, 46px);
}

.reference-topbar .clock-title span {
  font-size: clamp(14px, 1.2vw, 20px);
}

.beijing-time {
  padding-right: 0.5vw;
}

.beijing-time strong {
  font-size: clamp(30px, 2.8vw, 48px);
}

.reference-board {
  grid-template-columns: minmax(210px, 21.5vw) minmax(0, 1fr) minmax(230px, 21.5vw);
  gap: 2vw;
  align-items: stretch;
}

.reference-left,
.reference-right {
  align-content: stretch;
  gap: 0;
  padding: 6.5vh 0 5.5vh;
}

.reference-left {
  grid-template-rows: auto auto 1fr auto;
  border-right: 1px solid rgba(248, 251, 255, 0.32);
}

.reference-right {
  grid-template-rows: repeat(3, 1fr);
  padding-left: 2.2vw;
  padding-right: 1vw;
  border-left: 1px solid rgba(248, 251, 255, 0.32);
}

.reference-left .side-stat {
  text-align: right;
  padding: 0 1.35vw 3.6vh 0;
}

.reference-right .side-stat {
  display: grid;
  align-content: center;
  text-align: left;
  padding: 0;
}

.side-stat span {
  font-size: clamp(20px, 1.75vw, 34px);
}

.side-stat small {
  margin-top: 3px;
  font-size: clamp(16px, 1.28vw, 25px);
}

.side-stat strong {
  margin-top: 10px;
  font-size: clamp(30px, 3.15vw, 60px);
}

.registration-badge {
  align-self: end;
  justify-self: end;
  margin: 0 1.35vw 0 0;
}

.reference-main-card {
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  padding: 1vh 0 3.2vh;
}

.reference-main-card .tournament-title {
  display: none;
}

.reference-main-card .timer {
  align-self: end;
  margin-bottom: 2.5vh;
  font-size: clamp(150px, 19.4vw, 330px);
  line-height: 0.82;
}

.activity-atmosphere {
  inset: 11% 10% 20%;
  opacity: 0.14;
}

.blind-table {
  grid-template-columns: 210px 320px;
  gap: 1.4vw;
  width: auto;
  margin: 0 auto;
}

.blind-labels,
.blind-values {
  display: grid;
  grid-template-rows: repeat(3, minmax(46px, auto));
  gap: 8px;
  align-items: center;
}

.blind-labels {
  text-align: right;
}

.blind-labels div {
  display: grid;
  align-content: center;
}

.blind-labels span {
  font-size: clamp(17px, 1.35vw, 26px);
  line-height: 1;
}

.blind-labels small {
  margin: 2px 0 0;
  font-size: clamp(16px, 1.28vw, 24px);
  line-height: 1;
}

.blind-values {
  text-align: right;
}

.blind-values strong {
  font-size: clamp(30px, 2.85vw, 54px);
  line-height: 1;
}

.reference-main-card .status-row {
  margin-top: 1.2vh;
}

.reference-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: end;
  gap: 1.2vw;
  min-height: 86px;
}

.reference-footer-info {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.9fr 0.8fr minmax(260px, 2.1fr);
  gap: 14px;
  align-items: end;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid rgba(65, 220, 255, 0.18);
  border-radius: 14px;
  background: rgba(5, 10, 25, 0.26);
  backdrop-filter: blur(8px);
}

.reference-footer-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.reference-footer .screen-qr {
  grid-template-columns: 62px minmax(0, 1fr);
  align-self: stretch;
  min-height: 68px;
  padding: 7px 9px;
  border: 1px solid rgba(65, 220, 255, 0.18);
  border-radius: 14px;
}

.reference-footer .screen-qr img {
  width: 62px;
  height: 62px;
}

/* Fixed grid layout: keep the timer inside the center column. */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tournament-screen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 28px 36px 20px;
  display: grid;
  grid-template-rows: 110px minmax(0, calc(100vh - 110px - 130px)) 115px;
  gap: 0;
}

.tournament-screen::before {
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45) 70%),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.48) 45%,
      rgba(0, 0, 0, 0.7) 100%
    );
}

.screen-felt {
  filter: brightness(0.62) saturate(0.95) blur(0.8px);
}

.reference-topbar {
  height: 110px;
  min-height: 110px;
  display: grid;
  grid-template-columns: 360px 1fr 300px;
  align-items: center;
}

.screen-brand {
  min-width: 0;
}

.screen-brand img {
  width: 64px;
  height: 64px;
}

.screen-brand .brand {
  font-size: 34px;
  white-space: nowrap;
}

.reference-topbar .clock-title {
  min-width: 0;
  justify-self: center;
}

.reference-topbar .clock-title strong {
  font-size: 40px;
}

.reference-topbar .clock-title span {
  font-size: 18px;
}

.beijing-time {
  justify-self: end;
  padding-right: 0;
  min-width: 0;
}

.beijing-time strong {
  font-size: 42px;
}

.tournament-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  column-gap: 42px;
  height: calc(100vh - 110px - 130px);
  min-height: 0;
  align-items: center;
  overflow: hidden;
}

.tournament-left {
  width: 280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 54px;
  padding: 0;
  border-right: 1px solid rgba(248, 251, 255, 0.18);
}

.tournament-center {
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-align: center;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tournament-right {
  width: 300px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 58px;
  padding: 0 10px 0 42px;
  border-left: 1px solid rgba(248, 251, 255, 0.18);
}

.reference-left .side-stat,
.reference-right .side-stat {
  padding: 0;
}

.reference-left .side-stat {
  text-align: right;
  padding-right: 24px;
}

.reference-right .side-stat {
  text-align: left;
}

.side-stat span {
  font-size: 28px;
}

.side-stat small {
  font-size: 22px;
}

.side-stat strong {
  font-size: 52px;
}

.registration-badge {
  align-self: center;
  justify-self: auto;
  margin: 24px 0 0;
}

.timer-main {
  font-size: clamp(150px, 14vw, 230px);
  line-height: 0.9;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  align-self: end;
  margin: 0 0 24px;
}

.activity-atmosphere {
  inset: 12% 8% 18%;
  opacity: 0.1;
}

.blind-info {
  width: min(620px, 100%);
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  row-gap: 14px;
  column-gap: 22px;
  align-items: center;
}

.blind-labels,
.blind-values {
  display: contents;
}

.blind-labels div {
  display: grid;
  align-content: center;
  min-height: 54px;
  text-align: left;
}

.blind-labels span {
  font-size: 22px;
}

.blind-labels small {
  font-size: 20px;
}

.blind-values strong {
  min-height: 54px;
  display: grid;
  align-content: center;
  text-align: right;
  font-size: clamp(36px, 3.8vw, 58px);
  white-space: nowrap;
  overflow: hidden;
}

.reference-main-card .status-row {
  margin-top: 18px;
}

.tournament-footer {
  height: 115px;
  min-height: 115px;
  display: grid;
  grid-template-columns: 1fr 260px;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.reference-footer-info {
  height: 86px;
  display: grid;
  grid-template-columns: 130px 180px 160px 160px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 14px 18px;
  overflow: hidden;
}

.reference-footer-info strong {
  max-width: 100%;
}

.reference-footer .screen-qr {
  width: 260px;
  height: 86px;
  grid-template-columns: 72px 1fr;
  align-items: center;
  padding: 8px 10px;
  overflow: hidden;
}

.reference-footer .screen-qr img {
  width: 72px;
  height: 72px;
}

.reference-footer .qr-title {
  font-size: 14px;
  line-height: 1.25;
}

@media (max-aspect-ratio: 4 / 3) {
  .tournament-screen {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .tournament-board,
  .screen-footer,
  .tournament-topbar {
    grid-template-columns: 1fr;
  }
}

/* Final stable screen layout */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tournament-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  padding: 26px 36px 20px;
  display: grid;
  grid-template-rows: 100px minmax(0, 1fr) 110px;
  row-gap: 18px;
  background: #020612;
}

.screen-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/tournament/assets/screen-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.55) blur(1px);
  transform: scale(1.01);
}

.tournament-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.42);
}

.tournament-screen::after,
.screen-felt,
.activity-atmosphere {
  display: none;
}

.screen-header,
.screen-main,
.screen-footer {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.screen-header {
  height: 100px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  align-items: center;
}

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

.header-brand img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.18));
}

.brand-name {
  color: #f8fbff;
  font-size: 34px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(80, 220, 255, 0.22);
}

.brand-subtitle {
  margin-top: 8px;
  color: rgba(248, 251, 255, 0.78);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.header-level {
  justify-self: center;
  text-align: center;
}

.header-level strong {
  display: block;
  color: #f8fbff;
  font-size: 40px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.header-level span {
  display: block;
  margin-top: 6px;
  color: rgba(248, 251, 255, 0.82);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.header-time {
  justify-self: end;
  text-align: right;
  min-width: 0;
}

.header-time span {
  display: block;
  color: rgba(248, 251, 255, 0.72);
  font-size: 18px;
  font-weight: 850;
}

.header-time strong {
  display: block;
  margin-top: 6px;
  color: #44ffb0;
  font-size: 42px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-shadow: 0 0 16px rgba(68, 255, 176, 0.2);
}

.screen-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  column-gap: 36px;
  min-height: 0;
  overflow: visible;
  align-items: stretch;
}

.left-panel {
  width: 300px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding-right: 24px;
  border-right: 1px solid rgba(248, 251, 255, 0.18);
}

.right-panel {
  width: 300px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 46px;
  padding-left: 24px;
  border-left: 1px solid rgba(248, 251, 255, 0.18);
}

.panel-stat {
  min-width: 0;
}

.left-panel .panel-stat {
  text-align: right;
}

.right-panel .panel-stat {
  text-align: left;
}

.panel-stat span {
  display: block;
  color: rgba(248, 251, 255, 0.86);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
}

.panel-stat small {
  display: block;
  margin-top: 4px;
  color: rgba(248, 251, 255, 0.72);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 850;
}

.panel-stat strong,
.right-value {
  display: block;
  margin-top: 10px;
  color: #f8fbff;
  font-size: clamp(44px, 4vw, 64px);
  line-height: 1;
  font-weight: 1000;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

.registration-badge {
  align-self: center;
  margin: 0;
  padding: 10px 22px;
  border-radius: 9px;
  color: #06281f;
  background: linear-gradient(180deg, #5ef7c0, #32caa1);
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(68, 255, 176, 0.22);
}

.registration-badge.closed {
  color: #fff;
  background: linear-gradient(180deg, #b45561, #77313b);
}

.center-panel {
  min-width: 0;
  overflow: visible;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 12px;
}

.timer-main {
  max-width: 100%;
  overflow: visible;
  color: #f8fbff;
  font-family: "Arial Black", Impact, "DIN Alternate", "Avenir Next Condensed", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(120px, 13vw, 220px);
  line-height: 0.9;
  font-weight: 1000;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.22),
    0 0 18px rgba(0, 255, 220, 0.2),
    0 0 40px rgba(0, 220, 255, 0.14);
}

.blind-grid {
  width: min(620px, 100%);
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  row-gap: 12px;
  align-items: center;
}

.blind-label {
  min-width: 0;
  padding-right: 24px;
  text-align: right;
}

.blind-label div:first-child {
  color: rgba(248, 251, 255, 0.78);
  font-size: 20px;
  line-height: 1;
  font-weight: 850;
}

.blind-label div:last-child {
  margin-top: 4px;
  color: rgba(248, 251, 255, 0.9);
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.blind-value {
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  text-align: left;
  white-space: nowrap;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.14);
}

.status-text {
  margin-top: 20px;
  color: rgba(248, 251, 255, 0.76);
  font-size: 20px;
  line-height: 1;
  font-weight: 850;
}

.status-text span {
  color: #fff;
}

.paused-banner {
  margin-top: 12px;
}

.screen-footer {
  height: 110px;
  min-height: 110px;
  max-height: 110px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 160px 150px 150px minmax(0, 1fr) 280px;
  column-gap: 20px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.screen-footer::before {
  display: none;
}

.footer-item {
  min-width: 0;
  overflow: visible;
}

.footer-item span {
  display: block;
  color: rgba(248, 251, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.footer-item strong {
  display: block;
  margin-top: 6px;
  color: rgba(248, 251, 255, 0.92);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.footer-location-wrap strong {
  white-space: normal;
}

.footer-qr {
  width: 280px;
  height: 86px;
  min-height: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(65, 220, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 10, 25, 0.42);
  backdrop-filter: blur(8px);
}

.footer-qr img {
  width: 76px;
  height: 76px;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
}

.footer-qr .qr-title {
  color: #44ffb0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.footer-qr .qr-sub {
  display: none;
}

/* Stable blinds table */
.center-panel .blind-info {
  width: min(620px, 100%);
  margin: 16px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.center-panel .blind-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  column-gap: 28px;
}

.center-panel .blind-label {
  min-width: 0;
  padding: 0;
  text-align: right;
}

.center-panel .blind-label .zh {
  color: rgba(255, 255, 255, 0.95);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.center-panel .blind-label .en {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.center-panel .blind-value {
  min-width: 0;
  color: #ffffff;
  text-align: left;
  font-size: clamp(30px, 2.65vw, 46px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.center-panel .status-line {
  margin-top: 14px;
  padding-bottom: 8px;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
