/* league.css  turf green theme and wider field */
:root {
  --turf-dark: #0b1a10;
  --turf: #0e2517;
  --turf-light: #1a3a27;
  --line: rgba(255,255,255,.16);
  --number: rgba(255,255,255,.25);
  --accent: #16a34a;
  --accent-2: #22c55e;
  --panel: #0d1220;
  --panel-2: #0f1426;
  --text: #eef6ff;
  --muted: #b8d4c2;
  --border: rgba(34,197,94,.35);
  --shadow: 0 10px 28px rgba(0,0,0,.35);
}


/* base */
*{margin:0;padding:0;box-sizing:border-box}
body{background:linear-gradient(180deg,var(--turf-dark),#09140d);color:var(--text);font-family:Inter,system-ui,Arial,sans-serif;line-height:1.6}
a{text-decoration:none}
.container{width:90vw;max-width:1600px;margin-inline:auto}

/* ===== Header ===== */
header {
  background-color: #120e20;
  padding: 20px 40px;
  border-bottom: 2px solid var(--accent);
}

.navbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo .logo-img { height: 56px; border-radius: 8px; }

.page-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-2);
  white-space: nowrap;
}

/* ===== Hamburger ===== */
.menu-toggle {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle div {
  width: 26px;
  height: 3px;
  background-color: var(--accent-2);
  transition: transform .3s ease, opacity .3s ease;
}

/* Dropdown menu hidden by default */
.navbar .nav-links {
  display: none !important;
  position: absolute;
  top: 42px;
  right: 40px;
  background-color: #120e20;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-direction: column;
  width: 240px;
  padding: 10px 0;
  box-shadow: 0 8px 16px var(--glow);
  z-index: 1000;
}

.navbar .nav-links a {
  display: block;
  padding: 12px 16px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a:focus {
  background-color: rgba(167, 139, 250, 0.12);
  color: #ffffff;
  outline: none;
}

.navbar .nav-links.show { display: flex !important; }

/* Animate hamburger to X when open */
.menu-toggle.active div:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active div:nth-child(2) { opacity: 0; }
.menu-toggle.active div:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* field layout  now 90 percent width and slimmer endzones */
.field{
  display:grid;
  grid-template-columns: 320px 1fr 320px; /* endzones same width */
  grid-template-areas: "left mid right";
  gap:20px;
  padding:20px;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.10) 0 1px, transparent 1px 42px),
    linear-gradient(180deg,var(--turf),var(--turf-dark));
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.06);
  position:relative;
}

.endzone::before,
.sideline.right::before {
  font-size: 24px; /* smaller text */
}

/* columns */
.endzone.left{grid-area:left}
.midfield{grid-area:mid;position:relative}
.sideline.right{grid-area:right;background:linear-gradient(180deg,var(--panel),var(--panel-2));padding:12px;border-radius:14px;color:#fff;box-shadow:var(--shadow);position:relative}

/* endzones smaller and matched */
.endzone{
  background:linear-gradient(180deg,#0c1534,#0a112a);
  color:#fff;border:1px solid rgba(255,255,255,.06);
  border-radius:14px;padding:12px;box-shadow:var(--shadow);position:relative;overflow:hidden
}
.endzone::before{
  content:"ENDZONE";
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-90deg);
  font-weight:900;letter-spacing:6px;font-size:28px;color:rgba(255,255,255,.08)
}

/* midfield yard lines and numbers  start after endzones */
.mid-overlay{position:absolute;inset:0;pointer-events:none}
.mid-overlay::before{
  content:"";
  position:absolute;inset:0;
  background:
    linear-gradient(to right,
      transparent 0,
      transparent calc(10% - 1px),
      var(--line) calc(10% - 1px),
      var(--line) calc(10% + 1px),
      transparent calc(10% + 1px)
    );
  background-size:10% 100%;
  background-repeat:repeat-x;
  filter:opacity(.9);
}

/* keep yard lines behind all midfield content */
.mid-overlay { z-index: 0; }

.midfield > *:not(.mid-overlay) {
  position: relative;
  z-index: 1;
}

/* belt and suspenders for the strip itself */
.score-strip { position: relative; z-index: 1; }

.numbers{
  position:absolute;left:0;right:0;
  display:grid;grid-template-columns:repeat(9,1fr);
  text-align:center;align-items:center;
  font-weight:900;letter-spacing:1px;color:var(--number);
  text-shadow:0 1px 0 rgba(0,0,0,.35);
  font-size:clamp(14px,2vw,22px)
}
.numbers.top{top:8px}
.numbers.bottom{bottom:8px;transform:rotate(none)}

/* stacks */
.endzone,.midfield,.sideline{display:flex;flex-direction:column;gap:20px}

/* panels and cards now green accented */
.panel,.card,.champ-card{
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
  border:1px solid var(--border);
  border-radius:14px;overflow:hidden;box-shadow:var(--shadow)
}

/* right panel head */
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
.panel-head h2{font-size:18px}
.panel-head .mini{font-size:13px;color:#9fe8c1}

/* PA Milk Society card  now opaque */
.score-strip{
  display:flex;align-items:center;justify-content:space-between;
  background: #0e1a12 !important; /* solid */
  border:1px solid var(--border);border-radius:14px;padding:14px 16px
}
.score-strip .title{font-size:18px;font-weight:900}
.score-strip .subtitle{font-size:14px;color:var(--muted)}

/* center cards */
.links-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.card{padding:16px;transition:transform .15s ease,border-color .15s ease, box-shadow .15s ease}
.card:hover{transform:translateY(-4px);border-color:rgba(34,197,94,.6);box-shadow:0 14px 30px rgba(34,197,94,.18)}
.card h3{margin-bottom:6px;font-size:18px}
.card p{color:#d0e7d9;font-size:13px;margin-bottom:14px}

.button{
  display:inline-block;padding:10px 16px;
  background:#14532d;color:#fff;font-weight:800;
  border-radius:10px;border:1px solid rgba(34,197,94,.45);
  transition:background-color .25s ease, transform .06s ease
}
.button:hover{background:#16a34a}
.button:active{transform:translateY(1px)}

/* champ card */
.champ-card{padding:14px 16px}
.champ-card h3{color:#9fe8c1;margin-bottom:8px}
.champ-body .champ-row{display:grid;gap:8px}
.champ-name{font-weight:900;font-size:16px}
.champ-meta{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;
  color:#04210f;background:linear-gradient(90deg,var(--accent),var(--accent-2));
  box-shadow:0 6px 16px rgba(34,197,94,.25)
}

/* standings table */
/* Standings table */
.table-wrap { 
  overflow-x: auto; 
}

.standings-table { 
  width: 100%; 
  border-collapse: collapse; 
  color: #f0f4ff; 
  table-layout: fixed; /* ensures even column widths */
}

.standings-table th, 
.standings-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(59,130,246,0.25);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Adjust column widths (percentages add up to 100%) */
.standings-table th:nth-child(1),
.standings-table td:nth-child(1) { width: 20%; } /* Rank */
.standings-table th:nth-child(2),
.standings-table td:nth-child(2) { width: 35%; } /* Manager */
.standings-table th:nth-child(3),
.standings-table td:nth-child(3) { width: 15%; } /* W */
.standings-table th:nth-child(4),
.standings-table td:nth-child(4) { width: 15%; } /* L */

.standings-table th { 
  background-color: #12172a; 
  color: #3b82f6; 
  font-weight: 700; 
}

.standings-table tr:hover { 
  background-color: rgba(59,130,246,0.08); 
}

/* footer */
footer{text-align:center;padding:20px;font-size:14px;color:#9fb3a4;border-top:1px solid rgba(255,255,255,.06);margin-top:20px}

/* responsive */
@media (max-width:1200px){.field{grid-template-columns:220px 1fr 380px}}
@media (max-width:980px){
  .field{grid-template-columns:1fr;grid-template-areas:"mid" "right" "left"}

  .links-row{
    grid-template-columns:1fr;
    justify-items: center;
    align-items: center;  
  }
}
@media (max-width:768px){
  .navbar{flex-direction:column;align-items:flex-start;gap:10px}
  .logo-img{height:36px}
  .nav-links{width:100%;flex-wrap:wrap}
  .nav-link{padding:10px 10px}
}

/* === Past Champs (condensed) === */

/* container */
#champBody,
.champ-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

/* each champ box */
.champ-card,
.champ-item {
  background: linear-gradient(180deg, var(--panel, #12172a), var(--panel-2, #0f1426));
  border: 1px solid var(--border, #3b82f6);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}

/* header row (year • name • trophy) */
.champ-header,
.champ-head {
  word-spacing: 15px;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text, #f0f4ff);
  font-weight: 900;
}

.champ-year {
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--muted, #b3c7ff);
  opacity: .9;
  font-weight: 900;
}

.champ-name {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.champ-trophy,
.rings {
  margin-left: 0px;
  font-size: 18px;
  opacity: .95;
}

/* chips row */
.champ-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* shared chip */
.chip {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(90deg, var(--accent-2, #60a5fa), var(--accent, #3b82f6));
}

/* === Mobile: no field visuals; standings in the middle === */
@media (max-width: 820px) {
  /* kill turf + yardage visuals */
  .field{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "mid"   /* Score strip + links */
      "right"  /* Standings (middle) */
      "left"; /* Past Champs */
    gap: 12px;
    padding: 12px;
    background: none;
    border: none;
  }

  .score-strip {
    display: none;
  }

  /* remove lines/numbers and ENDZONE label */
  .mid-overlay, .numbers { display: none !important; }
  .endzone::before { display: none !important; }

  /* keep sections visible but drop the “field” look */
  .endzone,
  .sideline.right {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0; /* their inner cards/panels have padding */
  }

  /* map the areas so order is: champs → standings → links */
  .endzone.left   { grid-area: left; }
  .sideline.right { grid-area: right; }
  .midfield       { grid-area: mid; }

  /* make the links single column for narrow screens */
  .links-row { grid-template-columns: 1fr; }

  /* make sure the score strip and panels sit above anything */
  .score-strip,
  .panel,
  .champ-card { position: relative; z-index: 1; }
}

@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }

  .navbar {
    flex-direction: row;            /* keep items in one row */
    justify-content: space-between; /* logo left, hamburger right */
    align-items: center;
    position: relative;
  }

  /* Hamburger icon */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
  }
  .menu-toggle div {
    width: 26px;
    height: 3px;
    background-color: #22c55e;
    transition: transform .3s ease, opacity .3s ease;
  }

  /* Hide nav links initially, position dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #1a1a2e;
    border: 1px solid #22c55e;
    border-radius: 8px;
    flex-direction: column;
    width: 220px;
    padding: 10px 0;
    z-index: 1000;
  }
  .nav-links.show { display: flex; }

  .nav-links a {
    font-size: 15px;
    padding: 10px 12px;
    width: 100%;
    text-align: left;
  }
  .nav-links a:last-child {
    border-bottom: none;
  }

  html {
    font-size: 70%; /* shrink all text sizes proportionally */
  }

  .hero {
    padding: 60px 15px 30px; /* less vertical space */
  }

  .features {
    gap: 20px;
    padding: 30px 15px;
    flex-direction: column;
    align-items: center; /* <-- this centers the column */
  }

  .card {
    width: 90%;
    padding: 16px;
    text-align: center;
    max-width: 320px; /* optional limit */
  }

}
