/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:    #C8102E;
  --blue:   #002868;
  --white:  #ffffff;
  --light:  #f4f6fa;
  --gray:   #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--light);
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
header {
  background: var(--blue);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo img {
  height: 48px;
  object-fit: contain;
  display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  text-decoration: none;
  border-bottom: 3px solid var(--red);
  padding-bottom: 2px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #001a4d 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-logo {
  width: 220px;
  max-width: 80vw;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.hero .subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.7);
  margin: 0.5rem 0 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); text-decoration: none; }

.btn-primary   { background: var(--red);   color: var(--white); }
.btn-secondary { background: var(--white); color: var(--blue);  }

/* ── Feature Cards (Home) ── */
.features {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-4px); }

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.2rem; color: var(--blue); margin-bottom: 0.5rem; }
.feature-card p  { color: var(--gray); margin-bottom: 1rem; font-size: 0.95rem; }
.feature-card a  { color: var(--red); font-weight: 600; }

/* ── Page Header ── */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, #001a4d 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}
.page-header h1 { font-size: 2.2rem; font-weight: 800; text-transform: uppercase; }
.page-header p  { color: rgba(255,255,255,0.7); margin-top: 0.5rem; font-size: 1rem; }

/* ── Roster ── */
.roster {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.player-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s;
}
.player-card:hover { transform: translateY(-3px); }
.player-card.coach { border-top: 4px solid var(--red); }

.player-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--blue);
  min-width: 48px;
  text-align: center;
}

.player-info h3 { font-size: 1.05rem; color: #1a1a2e; font-weight: 700; }

.player-position {
  display: inline-block;
  margin-top: 0.3rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Schedule ── */
.schedule {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.schedule-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legend-item.win      { background: #d1fae5; color: #065f46; }
.legend-item.loss     { background: #fee2e2; color: #991b1b; }
.legend-item.upcoming { background: #dbeafe; color: #1e40af; }

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.schedule-table th {
  background: var(--blue);
  color: var(--white);
  padding: 0.9rem 1.2rem;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.schedule-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: var(--light); }

.status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status.win      { background: #d1fae5; color: #065f46; }
.status.loss     { background: #fee2e2; color: #991b1b; }
.status.upcoming { background: #dbeafe; color: #1e40af; }

.schedule-note {
  margin-top: 1.5rem;
  color: var(--gray);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

/* ── Login ── */
.login-section {
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-icon { font-size: 3rem; margin-bottom: 1rem; }
.login-card h2 { font-size: 1.5rem; color: var(--blue); margin-bottom: 0.5rem; }
.login-card p  { color: var(--gray); margin-bottom: 1.5rem; font-size: 0.95rem; }

.login-card input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
  outline: none;
}
.login-card input[type="password"]:focus { border-color: var(--blue); }
.login-card .btn { width: 100%; }

.login-error {
  color: var(--red);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

/* ── Parents Grid ── */
.protected-content { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

.parents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.parents-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.parents-card h3 { color: var(--blue); font-size: 1.1rem; margin-bottom: 0.75rem; }
.parents-card p  { color: var(--gray); font-size: 0.9rem; margin-bottom: 0.75rem; }

.info-list {
  list-style: none;
  font-size: 0.92rem;
  color: #374151;
}
.info-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; }

.logout-section {
  margin-top: 2.5rem;
  text-align: center;
}

/* ── Footer ── */
footer {
  background: var(--blue);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
  font-size: 0.85rem;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  nav { flex-direction: column; height: auto; padding: 1rem; gap: 0.75rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .schedule-table { font-size: 0.82rem; }
  .schedule-table th, .schedule-table td { padding: 0.6rem 0.75rem; }
}
