/* TV Legacy CSS - WebKit < 534 and ES3 compatible */
/* Premier Open & National Games Championship Dark Theme (1280x720) */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #090d16;
  color: #f8fafc;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

#stage {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background-color: #090d16;
  -webkit-transform-origin: 0 0;
  -moz-transform-origin: 0 0;
  -ms-transform-origin: 0 0;
  transform-origin: 0 0;
}

#offline-bar {
  display: none;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 1280px;
  height: 32px;
  background-color: #dc2626;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  line-height: 32px;
  z-index: 9999;
}

#level-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #141c2c;
  border: 1px solid #28374f;
  color: #00e676;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  z-index: 1000;
}

/* Header Bar */
#header-bar {
  width: 1280px;
  height: 56px;
  background-color: #090d16;
  position: relative;
}

table.header-table {
  width: 100%;
  height: 56px;
  border-collapse: collapse;
}

td.header-sponsor-left {
  width: 220px;
  padding-left: 14px;
}

div.sponsor-pill {
  width: 190px;
  height: 36px;
  line-height: 36px;
  background-color: #131b29;
  border: 1.5px solid #233148;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #e2e8f0;
  letter-spacing: 1px;
}

td.header-center {
  text-align: center;
  vertical-align: middle;
}

table.title-wrap-table {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
}

td.shuttle-icon-cell {
  width: 36px;
  vertical-align: middle;
}

div.shuttle-icon-circle {
  width: 32px;
  height: 32px;
  line-height: 30px;
  background-color: #00a884;
  color: #ffffff;
  font-size: 16px;
  text-align: center;
}

td.title-text-cell {
  padding-left: 10px;
  text-align: left;
}

div.main-tournament-title {
  font-size: 20px;
  font-weight: bold;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

div.sub-tournament-meta {
  font-size: 12px;
  color: #94a3b8;
  font-weight: normal;
  margin-top: 1px;
}

td.header-sponsor-right {
  width: 220px;
  text-align: right;
  padding-right: 14px;
}

/* 16 Courts Wrap Table */
#courts-stage-wrap {
  width: 1280px;
  height: 618px;
  overflow: hidden;
}

table.courts-table {
  width: 1280px;
  height: 618px;
  border-collapse: collapse;
  table-layout: fixed;
}

table.courts-table td.court-cell {
  width: 25%;
  height: 25%;
  padding: 4px 6px;
  vertical-align: top;
  box-sizing: border-box;
}

/* Individual Court Card */
div.court-card {
  width: 100%;
  height: 100%;
  background-color: #121927;
  border: 1.5px solid #202b3d;
  overflow: hidden;
  box-sizing: border-box;
}

/* Card Top Pill Row */
table.card-top-table {
  width: 100%;
  height: 28px;
  border-collapse: collapse;
  table-layout: fixed;
  background-color: #0e1420;
  border-bottom: 1px solid #1a2334;
}

td.top-left-cell {
  padding-left: 8px;
  vertical-align: middle;
  width: 65%;
  white-space: nowrap;
}

span.court-pill {
  display: inline-block;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  vertical-align: middle;
}

span.pill-teal {
  background-color: #00a884;
}

span.pill-blue {
  background-color: #218be4;
}

span.pill-purple {
  background-color: #9b7ce6;
}

span.pill-coral {
  background-color: #f06a55;
}

span.pill-amber {
  background-color: #f5a623;
}

span.cat-pill {
  display: inline-block;
  background-color: #1a2436;
  border: 1px solid #2b3a52;
  color: #94a3b8;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
}

td.top-right-cell {
  padding-right: 8px;
  text-align: right;
  vertical-align: middle;
  width: 35%;
  white-space: nowrap;
}

span.status-dot {
  color: #f06a55;
  font-size: 11px;
  margin-right: 2px;
  vertical-align: middle;
}

span.status-dot-final {
  color: #64748b;
}

span.status-txt {
  font-size: 11px;
  font-weight: bold;
  color: #cbd5e1;
  vertical-align: middle;
}

/* Battle Area: Player A (33%), Score Center (34%), Player B (33%) */
table.card-battle-table {
  width: 100%;
  height: 94px;
  border-collapse: collapse;
  table-layout: fixed;
}

td.player-col {
  width: 33%;
  vertical-align: middle;
  padding: 0px 6px;
  box-sizing: border-box;
}

td.player-left {
  text-align: left;
}

td.player-right {
  text-align: right;
}

div.player-name-box {
  font-size: 13px;
  font-weight: bold;
  color: #f8fafc;
  line-height: 15px;
  max-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

div.player-name-box div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

div.games-dots-row {
  margin-top: 5px;
}

td.player-left div.games-dots-row {
  text-align: left;
}

td.player-right div.games-dots-row {
  text-align: right;
}

span.g-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1.5px solid #2b3a52;
  background-color: #0e1420;
  margin: 0px 1px;
  vertical-align: middle;
}

span.g-dot-won {
  border: 1.5px solid #00a884;
  background-color: #00a884;
}

/* Center Score Area */
td.score-center-col {
  width: 34%;
  text-align: center;
  vertical-align: middle;
  padding: 0px;
}

div.score-box-wrap {
  display: inline-block;
  white-space: nowrap;
}

div.score-unit {
  display: inline-block;
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

span.score-num {
  display: block;
  font-size: 38px;
  font-weight: bold;
  color: #cbd5e1;
  line-height: 42px;
  border: 1.5px solid transparent;
}

/* Higher Score / Leading Highlight */
span.hl-score {
  background-color: #0f3d2e;
  border: 1.5px solid #00c875;
  color: #00ff88;
}

/* Point Just Increased! Super prominent highlight */
span.score-bump {
  background-color: #f59e0b;
  border: 1.5px solid #fef08a;
  color: #000000;
  font-weight: 900;
}

div.srv-bar {
  height: 4px;
  width: 36px;
  margin-left: auto;
  margin-right: auto;
  background-color: transparent;
  margin-top: 2px;
}

div.srv-bar-active {
  background-color: #f5a623;
}

span.score-colon {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  color: #334155;
  vertical-align: middle;
  line-height: 42px;
  margin: 0px 1px;
}

/* Card Bottom Info */
div.card-bottom-info {
  width: 100%;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  background-color: #0e1420;
  border-top: 1px solid #1a2334;
}

/* Footer Ticker Bar */
#footer-ticker-bar {
  width: 1280px;
  height: 42px;
  background-color: #090d16;
  position: relative;
  border-top: 1px solid #1a2334;
}

table.ticker-table {
  width: 100%;
  height: 42px;
  border-collapse: collapse;
}

td.ticker-time-cell {
  width: 140px;
  padding-left: 14px;
  white-space: nowrap;
}

span.footer-clock {
  font-size: 17px;
  font-weight: bold;
  color: #38bdf8;
}

span.footer-clock-label {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 5px;
}

td.ticker-pills-cell {
  text-align: center;
  vertical-align: middle;
}

span.partner-pill {
  display: inline-block;
  background-color: #131b29;
  border: 1px solid #233148;
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 14px;
  margin: 0px 4px;
}

td.ticker-partner-label {
  width: 160px;
  text-align: right;
  padding-right: 14px;
  font-size: 12px;
  color: #64748b;
}

#debug-box {
  display: none;
  position: absolute;
  bottom: 45px;
  right: 10px;
  width: 320px;
  height: 140px;
  background-color: #000000;
  border: 1px solid #334466;
  color: #00ff66;
  font-family: monospace;
  font-size: 10px;
  padding: 5px;
  overflow-y: scroll;
  z-index: 10000;
}

/* Single Court Full-Screen Mode */
#single-court-stage {
  width: 1280px;
  height: 618px;
  overflow: hidden;
  background-color: #0b101c;
  box-sizing: border-box;
}

table.single-top-bar {
  width: 100%;
  height: 48px;
  background-color: #101726;
  border-bottom: 2px solid #1f2c42;
  border-collapse: collapse;
}

td.st-left {
  padding-left: 20px;
  vertical-align: middle;
}

span.single-court-pill {
  display: inline-block;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  padding: 4px 14px;
  vertical-align: middle;
}

span.single-cat-pill {
  display: inline-block;
  background-color: #1c273a;
  border: 1px solid #2e3e5c;
  color: #94a3b8;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

button.btn-all-courts {
  background-color: #1e293b;
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 14px;
  margin-left: 18px;
  cursor: pointer;
  vertical-align: middle;
}

button.btn-all-courts:hover {
  background-color: #38bdf8;
  color: #090d16;
}

td.st-right {
  padding-right: 20px;
  text-align: right;
  vertical-align: middle;
}

span.single-status-dot {
  color: #f06a55;
  font-size: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

span.single-status-txt {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: bold;
  vertical-align: middle;
}

/* Single Battle Table */
table.single-battle-table {
  width: 100%;
  height: 520px;
  border-collapse: collapse;
  table-layout: fixed;
}

td.single-player-col {
  width: 37%;
  vertical-align: middle;
  padding: 0px 28px;
  box-sizing: border-box;
}

td.single-player-left {
  text-align: left;
}

td.single-player-right {
  text-align: right;
}

div.single-player-box {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  line-height: 42px;
  word-break: break-word;
}

div.single-player-box div {
  margin-bottom: 4px;
}

/* Winner Trophy Banner */
div.single-trophy-wrap {
  margin-top: 14px;
}

div.single-trophy-banner {
  display: inline-block;
  background-color: #2b1f07;
  border: 2px solid #f59e0b;
  color: #fef08a;
  font-size: 20px;
  font-weight: 900;
  padding: 8px 22px;
  letter-spacing: 1.5px;
}

div.single-sets-row {
  margin-top: 18px;
}

span.single-g-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #334460;
  background-color: #101726;
  margin: 0px 3px;
  vertical-align: middle;
}

span.single-g-dot-won {
  border-color: #00a884;
  background-color: #00a884;
}

/* Single Center Score */
td.single-score-center-col {
  width: 26%;
  text-align: center;
  vertical-align: middle;
}

div.single-score-wrap {
  display: inline-block;
  white-space: nowrap;
}

div.single-score-unit {
  display: inline-block;
  width: 108px;
  text-align: center;
  vertical-align: middle;
}

span.single-score-num {
  display: block;
  font-size: 96px;
  font-weight: 900;
  color: #cbd5e1;
  line-height: 100px;
  border: 2px solid transparent;
}

span.single-score-num.hl-score {
  background-color: #0f3d2e;
  border: 2px solid #00c875;
  color: #00ff88;
}

span.single-score-num.score-bump {
  background-color: #f59e0b;
  border: 2px solid #fef08a;
  color: #000000;
  font-weight: 900;
}

div.single-srv-bar {
  height: 7px;
  width: 90px;
  margin-left: auto;
  margin-right: auto;
  background-color: transparent;
  margin-top: 6px;
}

div.single-srv-bar.srv-bar-active {
  background-color: #f5a623;
}

span.single-score-colon {
  display: inline-block;
  font-size: 56px;
  font-weight: bold;
  color: #334460;
  vertical-align: middle;
  line-height: 100px;
  margin: 0px 4px;
}

div.single-game-sub {
  margin-top: 14px;
  font-size: 17px;
  font-weight: bold;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

/* Single Bottom Info */
div.single-bottom-info {
  width: 100%;
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
  background-color: #101726;
  border-top: 1px solid #1f2c42;
  box-sizing: border-box;
}

/* Clickable Court Cells */
table.courts-table td.court-cell {
  cursor: pointer;
}

table.courts-table td.court-cell:hover div.court-card {
  border-color: #38bdf8;
}

