/* =========================================================
   SukanPro360 TV MODE Premium Broadcast UI
   ---------------------------------------------------------
   Sasaran: paparan web 16:9 seperti imej cadangan.
   Font fallback digunakan supaya stabil dalam pelayar.
   ========================================================= */

:root{
  --bg:#030b18;
  --navy:#06162b;
  --navy-2:#08213e;
  --panel:rgba(8,24,49,.86);
  --panel-2:rgba(10,35,70,.76);
  --line:rgba(255,255,255,.13);
  --cyan:#00d9ff;
  --cyan-2:#51eeff;
  --gold:#f7c948;
  --gold-2:#ffb703;
  --white:#f8fafc;
  --muted:#bdd2ea;
  --blue:#2563eb;
  --red:#ef4444;
  --green:#22c55e;
  --yellow:#facc15;
  --purple:#8b5cf6;
  --radius-xl:22px;
  --radius-lg:16px;
  --radius-md:12px;
  --shadow:0 22px 52px rgba(0,0,0,.38);
  --glow-cyan:0 0 25px rgba(0,217,255,.26);
  --glow-gold:0 0 25px rgba(247,201,72,.22);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--white);
  background:
    radial-gradient(circle at 78% 13%,rgba(75,155,255,.28),transparent 16%),
    radial-gradient(circle at 80% 20%,rgba(0,217,255,.14),transparent 24%),
    radial-gradient(circle at 14% 80%,rgba(247,201,72,.10),transparent 30%),
    linear-gradient(135deg,#010713 0%,#061c38 50%,#020813 100%);
  overflow:hidden;
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(to bottom,rgba(255,255,255,.05),transparent 22%,transparent 72%,rgba(0,0,0,.18)),
    repeating-linear-gradient(90deg,rgba(255,255,255,.025) 0 1px,transparent 1px 52px),
    repeating-linear-gradient(0deg,rgba(255,255,255,.018) 0 1px,transparent 1px 52px);
  opacity:.78;
  z-index:0;
}

body:after{
  content:"";
  position:fixed;
  inset:auto 0 0 0;
  height:200px;
  pointer-events:none;
  background:
    radial-gradient(ellipse at center bottom,rgba(19,74,128,.55),transparent 60%),
    linear-gradient(to top,rgba(0,0,0,.36),transparent);
  z-index:0;
}

.page{
  position:relative;
  z-index:1;
  width:min(1830px,98vw);
  height:100vh;
  margin:auto;
  padding:14px 20px 12px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:10px;
  overflow:hidden;
}

.header{
  position:relative;
  min-height:96px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:0;
}

.header:after{
  display:none;
  content:none;
}

.gold-arc{
  display:none;
}

.brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.crest{
  width:82px;
  height:90px;
  filter:drop-shadow(0 0 18px rgba(247,201,72,.34));
}

.brand-divider{
  width:1px;
  height:62px;
  background:linear-gradient(to bottom,transparent,rgba(255,255,255,.75),transparent);
}

.brand h1{
  margin:0;
  font-size:38px;
  line-height:1;
  letter-spacing:-1.6px;
  font-weight:950;
  text-shadow:0 0 24px rgba(255,255,255,.10);
}

.brand h1 span{
  color:var(--gold);
  text-shadow:0 0 22px rgba(247,201,72,.23);
}

.brand p{
  margin:6px 0 0;
  color:#e1ecfa;
  font-size:16px;
  font-weight:600;
}

.livebox{
  min-width:220px;
  text-align:right;
  padding-right:12px;
}

.livepill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 20px;
  border-radius:999px;
  font-size:18px;
  font-weight:950;
  background:linear-gradient(135deg,#ef4444,#9f1212);
  border:1px solid rgba(255,255,255,.26);
  box-shadow:0 0 24px rgba(239,68,68,.45);
}

.livepill i{
  width:12px;height:12px;border-radius:999px;background:white;box-shadow:0 0 15px white;
}

.live-date{
  margin-top:8px;
  color:#f5f8ff;
  font-size:16px;
  font-weight:600;
}

.live-clock{
  margin-top:4px;
  font-family:"Courier New",monospace;
  font-size:38px;
  font-weight:950;
  letter-spacing:4px;
  line-height:1;
  color:white;
  text-shadow:0 0 18px rgba(255,255,255,.28);
}

.refresh{
  margin-top:4px;
  color:#b7d9ff;
  font-size:14px;
}

.main-grid{
  display:grid;
  grid-template-columns:1.62fr .98fr;
  gap:14px;
  min-height:0;
  overflow:hidden;
}

.left-stack{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:12px;
  min-height:0;
  overflow:hidden;
}
.right-stack{min-height:0;overflow:hidden}

.panel{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-xl);
  background:
    linear-gradient(145deg,rgba(14,46,84,.78),rgba(4,16,35,.92));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(16px);
}

.panel:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(120deg,rgba(255,255,255,.12),transparent 21%),
    radial-gradient(circle at 90% -10%,rgba(0,217,255,.17),transparent 30%);
  opacity:.75;
}

.panel.cyan{
  border-color:rgba(0,217,255,.55);
  box-shadow:var(--shadow),var(--glow-cyan), inset 0 1px 0 rgba(255,255,255,.08);
}

.panel.gold{
  border-color:rgba(247,201,72,.62);
  box-shadow:var(--shadow),var(--glow-gold), inset 0 1px 0 rgba(255,255,255,.08);
}

.panel-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:44px;
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,.12);
  background:linear-gradient(90deg,rgba(0,217,255,.14),rgba(0,0,0,0));
}

.title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:22px;
  font-weight:950;
  letter-spacing:-.7px;
}

.title img{
  width:24px;
  height:24px;
}

.tag{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  height:28px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:950;
  letter-spacing:.8px;
  color:#63efff;
  background:rgba(0,217,255,.10);
  border:1px solid rgba(0,217,255,.40);
}

.tag.goldtag{
  color:var(--gold);
  background:rgba(247,201,72,.10);
  border-color:rgba(247,201,72,.54);
}

.panel-body{
  position:relative;
  z-index:1;
  padding:12px;
  min-height:0;
  overflow:hidden;
}

/* Live events */
.event-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.event-card{
  position:relative;
  min-height:102px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(135deg,rgba(6,22,46,.97),rgba(11,44,82,.76));
  border:1px solid rgba(0,217,255,.28);
  box-shadow:inset 5px 0 0 var(--cyan),0 14px 34px rgba(0,0,0,.28);
}

.event-card:after{
  content:"";
  position:absolute;
  inset:0 -20% 0 auto;
  width:44%;
  background:
    linear-gradient(135deg,transparent 22%,rgba(255,255,255,.05) 22% 38%,transparent 38% 52%,rgba(255,255,255,.04) 52% 68%,transparent 68%);
  opacity:.8;
}

.icon-ring{
  position:relative;
  z-index:1;
  width:72px;
  height:72px;
  flex:0 0 72px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:radial-gradient(circle,rgba(0,217,255,.30),rgba(2,11,25,.92) 68%);
  border:1px solid rgba(0,217,255,.70);
  box-shadow:0 0 26px rgba(0,217,255,.30), inset 0 0 20px rgba(0,217,255,.13);
}

.icon-ring img{width:64px;height:64px}

.event-info{position:relative;z-index:1}
.event-info h3{
  margin:0 0 6px;
  font-size:21px;
  line-height:1.08;
  font-weight:950;
  letter-spacing:-.6px;
}
.event-line{
  display:flex;
  align-items:center;
  gap:7px;
  margin:4px 0;
  color:#dbeafe;
  font-size:14px;
}
.mini-icon{width:16px;height:16px}

/* Results */
.results-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  min-height:0;
}

.result-card{
  position:relative;
  min-height:104px;
  display:flex;
  align-items:center;
  gap:10px;
  border-radius:16px;
  padding:12px;
  overflow:hidden;
  background:linear-gradient(145deg,rgba(5,18,38,.98),rgba(11,37,68,.78));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 15px 34px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.07);
}

.result-card.goldline{border-color:rgba(247,201,72,.72);box-shadow:0 0 24px rgba(247,201,72,.18)}
.result-card.orangeline{border-color:rgba(251,146,60,.72);box-shadow:0 0 24px rgba(251,146,60,.14)}
.result-card.silverline{border-color:rgba(226,232,240,.70);box-shadow:0 0 24px rgba(226,232,240,.11)}
.result-card.greenline{border-color:rgba(34,197,94,.60);box-shadow:0 0 24px rgba(34,197,94,.12)}
.result-card.yellowline{border-color:rgba(250,204,21,.60);box-shadow:0 0 24px rgba(250,204,21,.11)}

.medal{
  position:relative;
  z-index:1;
  width:58px;
  height:58px;
  flex:0 0 58px;
  filter:drop-shadow(0 0 12px rgba(247,201,72,.30));
}

.result-copy{
  position:relative;
  z-index:1;
  min-width:0;
}

.result-copy h3{
  margin:0 0 5px;
  font-size:18px;
  font-weight:950;
  letter-spacing:-.4px;
}
.result-copy p{
  margin:0 0 8px;
  font-size:13px;
  color:#d9e8fb;
}
.meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  color:#dcecff;
  font-size:12px;
  font-weight:700;
}
.dot{width:10px;height:10px;border-radius:999px;display:inline-block;vertical-align:-1px;margin-right:5px}
.blue-dot{background:var(--blue)}
.red-dot{background:var(--red)}
.green-dot{background:var(--green)}
.yellow-dot{background:var(--yellow)}
.time{color:#c0f7ff;font-weight:950}
.ghost-athlete{
  position:absolute;
  right:14px;
  bottom:10px;
  width:58px;
  height:58px;
  opacity:.13;
  filter:grayscale(1);
}

/* Summary */
.summary-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:16px;
}

.summary-card{
  min-height:78px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:14px;
  background:linear-gradient(145deg,rgba(13,42,80,.88),rgba(4,16,35,.88));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.summary-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.14);
}

.summary-icon img{width:42px;height:42px}
.summary-card .label{font-size:13px;color:#e4efff;font-weight:700}
.summary-card .value{font-size:32px;line-height:1;font-weight:950;margin-top:3px}

.table-title{
  display:grid;
  grid-template-columns:1fr 48px 48px 48px 70px;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
  padding:0 8px;
  color:var(--gold);
  font-weight:950;
  font-size:13px;
}

.medal-head img{width:26px;height:26px;vertical-align:middle}

.house-table{display:grid;gap:8px}
.house-row{
  display:grid;
  grid-template-columns:44px 1fr 48px 48px 48px 70px;
  gap:6px;
  align-items:center;
  min-height:58px;
  padding:6px;
  border-radius:15px;
  background:linear-gradient(90deg,rgba(10,36,72,.96),rgba(4,16,36,.86));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 14px 28px rgba(0,0,0,.22);
}

.rankno{
  width:38px;height:38px;border-radius:10px;
  display:grid;place-items:center;
  font-size:20px;font-weight:950;
  color:white;
}
.house-row.blue .rankno,.house-row.blue .points{background:linear-gradient(135deg,#2f78ff,#0f3d91)}
.house-row.red .rankno,.house-row.red .points{background:linear-gradient(135deg,#ff4b4b,#9d1c1c)}
.house-row.green .rankno,.house-row.green .points{background:linear-gradient(135deg,#38d879,#127c3d)}
.house-row.yellow .rankno,.house-row.yellow .points{background:linear-gradient(135deg,#ffe15c,#c58b00);color:#1f2937}

.house-name{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:18px;
  font-weight:950;
}
.house-name img{width:32px;height:38px;object-fit:contain}

.medalnum{
  text-align:center;
  font-size:18px;
  font-weight:950;
  color:#ffd65a;
}
.medalnum.silver{color:#dbeafe}
.medalnum.bronze{color:#fb923c}

.points{
  justify-self:end;
  width:58px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  font-size:24px;
  font-weight:950;
  color:white;
  border:1px solid rgba(255,255,255,.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
}

/* Footer */
.footer{
  margin-top:0;
  min-height:48px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 18px;
  border-radius:20px 0 20px 0;
  border:1px solid rgba(247,201,72,.65);
  background:linear-gradient(90deg,rgba(5,18,38,.96),rgba(7,26,52,.90),rgba(4,14,30,.96));
  box-shadow:var(--shadow),var(--glow-gold);
  font-size:14px;
  font-weight:700;
  overflow:hidden;
}

.footer img{width:24px;height:24px}
.footer strong{font-weight:950;color:white}
.footer .cyantext{color:#35dfff;font-weight:900}
.footer .goldtext{color:var(--gold);font-weight:950}
.sep{opacity:.46}

/* Helpers */
.noise{
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.10;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

@media (max-width:1300px){
  .brand h1{font-size:32px}
  .main-grid{grid-template-columns:1fr}
  .right-stack{min-height:auto}
}
@media (max-width:900px){
  .page{width:100%;padding:18px}
  .header{flex-direction:column;align-items:flex-start}
  .livebox{text-align:left}
  .event-grid,.results-grid,.summary-row{grid-template-columns:1fr}
  .table-title{grid-template-columns:1fr 42px 42px 42px 72px;font-size:13px}
  .house-row{grid-template-columns:44px 1fr 42px 42px 42px 64px}
  .rankno{width:40px;height:40px;font-size:20px}
  .house-name{font-size:17px}
  .house-name img{width:32px}
  .points{width:58px;height:48px;font-size:24px}
  .footer{border-radius:16px;flex-wrap:wrap}
}
