:root{
  --bg:#0b1020;
  --card:#121a33;
  --muted:#8ea0c6;
  --text:#e9eeff;
  --line:#243055;
  --accent:#6ea8ff;
  --accent2:#9bffd0;
  --danger:#ff6e6e;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(110,168,255,.35), transparent 55%),
              radial-gradient(800px 500px at 80% 0%, rgba(155,255,208,.18), transparent 45%),
              var(--bg);
  color:var(--text);
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.nav{
  display:flex;
  flex-direction:column;   /* stack */
  align-items:center;      /* center everything */
  padding:16px 0;
  gap:10px;
}

.nav .small{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  text-align:center;
}

.nav .small a{
  white-space:nowrap;
}

button:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  letter-spacing:.3px;
}

.badge{
  padding: 4px 10px;
  border:1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.badge-link:hover { transform: translateY(-1px); }
.badge-link { transition: transform .12s ease; }

.card{
  background: rgba(18,26,51,.92);
  border:1px solid rgba(36,48,85,.9);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}

.h1{font-size: 28px; margin: 0 0 8px}
.p{color:var(--muted); margin:0 0 14px; line-height:1.5}

label{display:block; font-weight:600; margin: 12px 0 6px}
input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(8,12,26,.6);
  color: var(--text);
  outline:none;
}
input:focus{
  border-color: rgba(110,168,255,.8);
  box-shadow: 0 0 0 3px rgba(110,168,255,.18);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 11px 14px;
  border-radius: 12px;
  border:1px solid rgba(110,168,255,.35);
  background: linear-gradient(180deg, rgba(110,168,255,.22), rgba(110,168,255,.10));
  color: var(--text);
  font-weight: 700;
  cursor:pointer;
  width:100%;
}
.btn:hover{filter:brightness(1.08)}
.btn.secondary{
  background: transparent;
  border:1px solid var(--line);
  color: var(--text);
}

.row{display:flex; gap:10px; align-items:center}
.row > *{flex:1}

.flash{
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0 0;
  border: 1px solid rgba(110,168,255,.35);
  background: rgba(110,168,255,.12);
  color: var(--text);
}

.flashright{
  border-radius: 12px;
  text-align: center;
  padding: 12px;
  margin: 10px 0 0;
  border: 1px solid rgba(110,168,255,.35);
  background: rgba(110,168,255,.12);
  color: var(--text);
}
.flash.error{
  border-color: rgba(255,110,110,.40);
  background: rgba(255,110,110,.10);
}

.flash.success{
  border-color: rgba(155,255,208,.40);
  background: rgba(155,255,208,.10);
}

/* Locked squad visual clarity */
.locked-player {
  border: 2px solid #4da3ff;
  background: rgba(77, 163, 255, 0.15);
}

.locked-player input[type="checkbox"] {
  accent-color: #4da3ff; /* modern browsers */
  opacity: 1 !important;
}

.locked-player .player-name {
  color: #eaf3ff;
  font-weight: 900;
}

/* Locked but NOT selected */
.locked-unselected {
  opacity: 0.35;
}

/* Pick squad: selected styling */
.player-row.is-selected{
  border: 2px solid rgba(255,255,255,.65);
}

/* When locked: make selected players SUPER obvious */
.player-row.is-locked-selected{
  border: 2px solid hotpink !important;
  box-shadow: 0 0 0 2px rgba(255,105,180,.18) !important;
}

/* Optional: fade unselected when locked */
.player-row.is-locked-unselected{
  opacity: .55;
}


.small{font-size: 13px; color: var(--muted)}
.hr{height:1px; background: var(--line); margin: 16px 0}


/* Mobile-friendly tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 720px; /* prevents "tiny squished" tables */
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}

/* Desktop (860px and up) */
@media (min-width: 860px){
  .grid.two{ grid-template-columns: 1fr 1fr; }
}

/* Mobile/tablet (below 860px) */
@media (max-width: 859.98px){
  .grid.two{ grid-template-columns: 1fr; }
}
/* --- Responsive 2-column grids: mobile stack, desktop split --- */
.grid.two{
  grid-template-columns: 1fr !important; /* mobile default */
}

@media (min-width: 860px){
  .grid.two{
    grid-template-columns: 1fr 420px !important; /* left content + right sidebar */
    align-items: start;
  }
}
@media (max-width: 520px){
  .card{ padding: 14px; }
  .h1{ font-size: 22px; }
}

.grid.cards{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

@media (min-width:860px){
  .grid.cards{
    grid-template-columns:1fr 1fr;
  }
}

.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  max-width: 100%;
  touch-action: pan-x;
}

.table-scroll table{
  min-width: 720px;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td{
  white-space: nowrap;
}

/* Right-edge fade hint (only visible when overflow exists) */
.table-scroll:after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:28px;
  height:100%;
  pointer-events:none;
  background: linear-gradient(to left, rgba(11,16,32,.95), rgba(11,16,32,0));
}

.table-scroll::after,
.table-scroll::before {
  display: none !important;
  content: none !important;
}

/* Prevent cell wrapping chaos */
.table-scroll th,
.table-scroll td{
  white-space: nowrap;
}

.comp-trophy {
  height: auto;
  transition: filter 0.25s ease, transform 0.25s ease;
}

.champion-glow {
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.55))
          drop-shadow(0 0 10px rgba(255, 195, 0, 0.35));
}


.top-four td{
  background: rgba(255, 215, 0, 0.06);
  border-top: 1px solid rgba(255, 215, 0, 0.25);
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
}

/* Teams grid – auto-fill side by side */
.team-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:14px;
}

.team-card{
  background: rgba(18,26,51,.92);
  border:1px solid rgba(36,48,85,.9);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform .15s ease, filter .15s ease;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}

.team-card:hover{
  transform: translateY(-2px);
  filter: brightness(1.06);
  transform:translateY(-3px);
  box-shadow:0 6px 18px rgba(0,0,0,0.25);
}

.team-name{
  font-weight: 900;
  font-size: 16px;
}
.aw-badges {
  display:grid;
  grid-template-columns: repeat(10, auto);
  gap:8px;
}
 .aw-section-title{
      padding:10px 12px;
      border-radius:14px;
      font-weight:900;
      letter-spacing:.3px;
      font-size:22px;
      border:1px solid var(--line);
      background:rgba(8,12,26,.6);
      margin-top:18px;
    }
    .aw-row{
      display:flex;
      justify-content:space-between;
      gap:12px;
      padding:12px;
      border-radius:14px;
      border:1px solid var(--line);
      background:rgba(8,12,26,.6);
      margin-top:10px;
      align-items:center;
      flex-wrap:wrap;
    }
    .aw-left{ min-width: 220px; }
    .aw-name{ font-weight:900; }
    .aw-badges{
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      justify-content:flex-end;
      align-items:center;
    }

    /* Badge images */
    .award-badge{
      width:48px;
      height:48px;
      object-fit:contain;
      border-radius:10px;
      border:1px solid rgba(36,48,85,.9);
      background: rgba(18,26,51,.55);
      padding:4px;
    }
    
    /* ===== T20Sim Header Branding ===== */
    .nav .brand .site-brand{
      display:flex;
      align-items:center;
      gap:10px;
      text-decoration:none;
      color:inherit;
    }
    
    
    .site-text{
      display:flex;
      flex-direction:column;
      line-height:1.1;
    }
    
    .site-title{
      font-weight:900;
      font-size:18px;
    }
    
    .site-tagline{
      font-size:11px;
      opacity:0.75;
    }
    
    .comp-locked {
      color: #ffcc00; /* gold/yellow premium feel */
    }
    
    .comp-open {
      color: var(--text); /* default */
    }


/* Slightly tighter on phones */
@media (max-width:520px){
  .container{ padding:14px; }
  .card{ padding:14px; }

  .table-scroll th,
  .table-scroll td{
    padding:6px !important;
    font-size:12px;
  }
}
