/* =========================================================
   SGCC LIVE SCORING — PREMIUM TV DISPLAY
   DESIGN ONLY
   Scoring / PHP / MySQL / sorting are not changed.
   ========================================================= */

*{box-sizing:border-box}

body{
  margin:0;
  font-family:"Segoe UI",Arial,Helvetica,sans-serif;
}

/* ---------- DISPLAY ---------- */

.display{
  min-height:100vh;
  background:
    radial-gradient(circle at 50% -20%,rgba(35,103,73,.42),transparent 42%),
    linear-gradient(135deg,#041810 0%,#08291d 52%,#03140d 100%);
  color:#f4f7f5;
  padding:0 3.2vw 2vh;
}

/* ---------- HEADER ---------- */

header{
  height:15vh;
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  border-bottom:2px solid #c7a75a;
  position:relative;
}

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

.sgcc-logo{
  width:76px;
  height:76px;
  object-fit:contain;
}

.anniversary{
  width:84px;
  height:70px;
  object-fit:contain;
}

.title-block{
  min-width:0;
  text-align:left;
}

.eyebrow{
  font-size:1vw;
  letter-spacing:.22em;
  font-weight:700;
  color:#d9c487;
  opacity:1;
}

h1{
  margin:5px 0 0;
  font-size:3vw;
  line-height:1.05;
  white-space:nowrap;
  color:#fff;
  font-weight:900;
  letter-spacing:-.02em;
  text-shadow:0 2px 8px rgba(0,0,0,.25);
}

.live{
  font-size:1.05vw;
  font-weight:800;
  letter-spacing:.1em;
  white-space:nowrap;
  color:#f3f7f4;
}

.live span{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#54d48d;
  margin-right:8px;
  box-shadow:0 0 12px rgba(84,212,141,.8);
}

/* ---------- MAIN ---------- */

main{
  height:73%;
  padding-top:2vh;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border-bottom:1px solid rgba(255,255,255,.22);
  padding:0 .35vw 1.1vh;
}

h2{
  font-size:2vw;
  margin:1vh 0 1vh;
  color:#fff;
  font-weight:900;
  letter-spacing:.01em;
}

#updated{
  opacity:1;
  font-size:.9vw;
  color:#aebdb5;
  white-space:nowrap;
}

/* ---------- ROTATING LINE ---------- */

.rotating-wrap{
  height:2.2em;
  overflow:hidden;
  margin-top:-.8vh;
}

#rotatingText{
  display:inline-block;
  font-size:.72vw;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:#b9c8c0;
  opacity:.82;
  white-space:nowrap;
}

#rotatingText.rotating-in{
  animation:rotateTextIn .55s ease;
}

@keyframes rotateTextIn{
  0%{opacity:0;transform:translateY(7px)}
  100%{opacity:.82;transform:translateY(0)}
}

/* ---------- LEADERBOARD ---------- */

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#f8faf9;
  border:1px solid #cfdad4;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(0,0,0,.20);
}

/* Header */
th{
  text-align:center;
  background:linear-gradient(180deg,#164f3a,#0b3a29);
  color:#fff;
  opacity:1;
  font-size:.82vw;
  letter-spacing:.12em;
  font-weight:800;
  padding:1.05vh .55vw;
  border-bottom:3px solid #c7a75a;
}

/* ALL SCORE CELLS — explicitly dark so they remain readable */
th,td{
  padding:.95vh .55vw;
  font-size:1.02vw;
}

td{
  color:#14231c;
  background:#fff;
  border-bottom:1px solid #dce4df;
  text-align:center;
  font-weight:650;
}

/* Alternating rows */
tbody tr:nth-child(even) td{
  background:#f0f5f2;
}

tbody tr:hover td{
  background:#e6f0eb;
}

/* Position */
th:first-child,
td:first-child{
  width:5%;
}

td:first-child{
  color:#0b543b;
  font-weight:900;
}

/* Player */
th:nth-child(2),
td:nth-child(2){
  width:32%;
}

.player{
  color:#14231c !important;
  font-weight:800;
  text-align:left;
}

/* Handicap */
th:nth-child(3),
td:nth-child(3){
  width:9%;
}

/* Category */
th:nth-child(4),
td:nth-child(4){
  width:12%;
}

/* Day 1 / Day 2 OUT */
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6){
  width:8%;
}

/* Day 2 IN */
th:nth-child(7),
td:nth-child(7){
  width:9%;
}

/* TOTAL — premium emphasis */
th:nth-child(8),
td:nth-child(8){
  width:9%;
}

td.score{
  color:#063d2b !important;
  background:linear-gradient(90deg,#fffdf7,#f3ead5) !important;
  font-size:1.55vw;
  font-weight:950;
}

/* If TOTAL is the 7th column in the current Day 2 layout */
td:last-child{
  color:#063d2b;
  background:linear-gradient(90deg,#fffdf7,#f3ead5);
  font-size:1.45vw;
  font-weight:950;
}

tbody tr:nth-child(1) td:first-child,
tbody tr:nth-child(2) td:first-child,
tbody tr:nth-child(3) td:first-child{
  color:#a17b2f;
  font-size:1.12vw;
}

/* ---------- FOOTER ---------- */

footer{
  height:12%;
  border-top:1px solid rgba(255,255,255,.18);
  display:flex;
  align-items:center;
  justify-content:space-between;
  opacity:.8;
  color:#aebdb5;
}

/* ---------- ADMIN: PRESERVE FUNCTIONAL LOOK ---------- */

.admin{
  background:#f3f5f4;
  color:#152019;
  min-height:100vh;
  padding:25px;
}

.panel{
  max-width:1450px;
  margin:auto;
  background:white;
  padding:28px;
  border-radius:14px;
  box-shadow:0 8px 30px #0002;
}

.admin h1{font-size:32px;color:#152019}
.admin h2{font-size:21px;color:#152019}
.muted{color:#657268}

.add{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:25px;
}

.admin input,
.admin select,
.admin button{
  padding:8px;
  border:1px solid #ccd5cf;
  border-radius:6px;
}

.admin button{
  background:#183d28;
  color:white;
  cursor:pointer;
}

.admin-table{color:#152019}
.admin-table th,
.admin-table td{
  font-size:13px;
  padding:7px;
}

.admin-table input{width:100%}
.admin-table .num{width:70px}
.admin a{color:#176b3a;font-weight:bold}

/* ---------- RESPONSIVE ---------- */

@media(max-width:900px){
  .display{padding:1.5vh 3vw 2vh}
  .sgcc-logo{width:52px;height:52px}
  .anniversary{width:58px;height:48px}
  .eyebrow{font-size:1.7vw}
  h1{font-size:4.5vw}
  .live{font-size:1.8vw}
  h2{font-size:3.4vw}
  #updated{font-size:1.8vw}
  th,td{font-size:2.4vw}
  .score{font-size:3vw}
  td:last-child{font-size:2.8vw}
  #rotatingText{font-size:1.5vw}
}

@media(prefers-reduced-motion:reduce){
  #rotatingText.rotating-in{animation:none}
}

/* TV scrolling container — visual behavior only */
html,body{
  scroll-behavior:auto;
}
