/* WHNDY Volleyball — styles.css
   This file controls how everything LOOKS.
   Any page with <link> to this file is styled by it. */

/* ===== 1. TEAM COLORS ======================================
   These are "variables." Change any value and the WHOLE site
   re-themes automatically. Pick your real team colors here. */
:root {
  --navy:   #0f1f3d;   /* dark background, navbar          */
  --accent: #ffd166;   /* bright yellow — buttons, titles  */
  --white:  #ffffff;
  --light:  #f4f6fa;   /* page background                  */
  --muted:  #5a6478;   /* secondary text                   */
  --text:   #1b2436;   /* main readable text               */
}

/* ===== 2. BASE (applies to everything) =====================
   "box-sizing: border-box" makes sizing predictable. */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
}

/* ===== 3. NAVBAR ==========================================
   "display: flex" lays items in a row (logo on the left,
   then Home/Stats/Team/Vods left-aligned after it).
   "position: sticky" keeps it pinned while you scroll. */
.navbar {
  background: var(--navy);
  display: flex;                 /* put children side by side */
  align-items: center;           /* center them vertically    */
  gap: 1.5rem;                   /* space between links       */
  padding: 1rem 2rem;
  position: sticky;              /* stick to top when scrolling */
  top: 0;
  z-index: 100;                  /* stay above everything else */
}

.navbar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.3rem;
  transition: color 0.2s;        /* smooth hover change */
}

.navbar a:hover {
  color: var(--accent);
}

.navbar .logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
}

/* make the logo a fixed, sensible height */
.navbar .logo img {
  height: 40px;
  width: auto;
}

/* ===== 4. HERO (the welcome banner) ======================== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #24365e 100%);
  color: var(--white);
  text-align: center;
  padding: 5rem 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--accent);
  font-style: italic;
}

/* ===== 5. CONTENT LAYOUT ==================================
   "max-width + margin auto" centers a column of content.
   720px keeps lines readable on big screens. */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

h2 {
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
}

/* ===== 6. CARDS + BUTTONS ================================= */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(15, 31, 61, 0.08);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1b2436;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  margin-top: 0.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);   /* little lift on hover */
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.4);
}

/* ===== STATS PAGE ===== */
.page-title { font-size: 2rem; color: var(--navy); margin-bottom: 1rem; }

.pick-label { font-weight: 600; margin-right: 0.5rem; }

#gameSelect {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccd3e0;
  background: #fff;
  margin-bottom: 1.5rem;
}

.game-header { font-size: 1.4rem; color: var(--navy); margin-bottom: 0.25rem; }
.game-meta  { color: var(--muted); margin-bottom: 1rem; }

/* the table itself */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e6eaf2;
}

th {
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

td.num { text-align: left; }      /* right-align numbers, like a ledger */
th     { text-align: left; }

/* the totals + opponent-errors rows stand out */
.totals-row td {
  border-top: 2px solid var(--navy);
  font-weight: 700;
  background: #eef2f8;
}

/* leaderboard */
.leaderboard { margin-top: 2rem; }

.lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.lb-col {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(15,31,61,0.08);
}

.lb-col h3 { color: var(--navy); margin-bottom: 0.5rem; }

.lb-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid #eef1f6;
}

/* highlight the current nav link */
.navbar a.active { color: var(--accent); }

/* ===== TEAM PAGE ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.player-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,31,61,0.08);
  transition: transform 0.15s;
}

.player-card:hover { transform: translateY(-3px); }

.player-photo {
  height: 220px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 4rem;
  font-weight: 800;
}

.player-photo img { width: 100%; height: 100%; object-fit: cover; }

.player-info { padding: 1rem; }

.player-info h3 {
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pos-badge {
  background: var(--accent);
  color: #1b2436;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.bio { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75rem; }

.pose-clip { width: 100%; border-radius: 8px; margin-bottom: 0.75rem; }

.highlights { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; margin-top: 0; }

/* ===== VODS PAGE ===== */
.lede { color: var(--muted); margin-bottom: 1.5rem; }

.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.vod-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,31,61,0.08);
}

.vod-header {
  padding: 1rem;
}
.vod-header h3 { color: var(--navy); margin-bottom: 0.25rem; }
.vod-header p  { color: var(--muted); margin-bottom: 0.75rem; }

/* each set gets its own padded block */
.vod-item { padding: 0 1rem 1rem; }

/* the 16:9 aspect-ratio trick: keeps iframes from collapsing */
.vod-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;   /* = 9/16 as a percentage */
}
.vod-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.vod-set {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.vod-set a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}