/* ==========================================================================
   SLURPEE SLUGGERS — Retro 7-Eleven Softball Stats
   ========================================================================== */

:root {
  --bg-cream:       #FFF8F0;
  --bg-warm:        #FEF3E4;
  --green-primary:  #00865A;
  --green-dark:     #004D34;
  --green-light:    #E8F5EE;
  --orange-primary: #F7941D;
  --orange-dark:    #D47A0A;
  --orange-light:   #FFF3E0;
  --red-accent:     #E31837;
  --red-dark:       #B51229;
  --red-light:      #FFF0F0;
  --white:          #FFFFFF;
  --gray-light:     #F5F5F5;
  --gray-border:    #E0E0E0;
  --text-dark:      #1A1A1A;
  --text-muted:     #666666;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.10);
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   STRIPE BAR
   ========================================================================== */

.stripe-bar {
  display: flex;
  width: 100%;
  height: 12px;
}

.stripe {
  flex: 1;
  height: 100%;
}

.stripe--green  { background: var(--green-primary); }
.stripe--orange { background: var(--orange-primary); }
.stripe--red    { background: var(--red-accent); }

/* ==========================================================================
   HERO HEADER
   ========================================================================== */

.hero {
  position: relative;
  background: var(--green-dark);
  padding: 160px 24px 140px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('img/Squad.jpg');
  background-size: cover;
  background-position: center 20%;
  opacity: 0.1;
  z-index: 0;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.03) 60px,
      rgba(255,255,255,0.03) 62px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.03) 60px,
      rgba(255,255,255,0.03) 62px
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--orange-primary);
  border: 2px solid var(--orange-primary);
  padding: 4px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.hero__title {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.hero__subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 2.5vw, 18px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange-primary);
  margin-bottom: 20px;
}

.hero__season {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 1px;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.hero__tagline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

.hero__sponsor {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 10px 24px;
}

.hero__sponsor-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.hero__sponsor-name {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  color: var(--orange-primary);
  letter-spacing: 1px;
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0 24px;
}

.section-header__stripe {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--green-primary), var(--orange-primary));
  border-radius: 2px;
}

.section-header__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-dark);
  white-space: nowrap;
}

/* ==========================================================================
   LEADER CARDS
   ========================================================================== */

.leaders__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.leader-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--green-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.leader-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.leader-card--beer {
  border-left-color: var(--orange-primary);
  background: var(--orange-light);
}

.leader-card--k {
  border-left-color: var(--red-accent);
  background: var(--red-light);
}

.leader-card__icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.leader-card__category {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.leader-card__name {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  color: var(--green-dark);
  line-height: 1.2;
  margin-bottom: 4px;
}

.leader-card--beer .leader-card__name {
  color: var(--orange-dark);
}

.leader-card--k .leader-card__name {
  color: var(--red-dark);
}

.leader-card__value {
  font-family: 'Inconsolata', monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--green-primary);
  letter-spacing: 1px;
}

.leader-card--beer .leader-card__value {
  color: var(--orange-primary);
}

.leader-card--k .leader-card__value {
  color: var(--red-accent);
}

.leader-card__bg-number {
  position: absolute;
  right: -8px;
  bottom: -12px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 80px;
  color: rgba(0,0,0,0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   STATS TABLE
   ========================================================================== */

.stats__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: var(--white);
}

.stats__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.stats__table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.stats__table th {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  background: var(--green-dark);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s ease;
  position: relative;
}

.stats__table th:first-child {
  text-align: left;
  padding-left: 20px;
  border-radius: var(--radius-md) 0 0 0;
}

.stats__table th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.stats__table th:hover {
  background: var(--green-primary);
}

.stats__table th.sorted-asc::after,
.stats__table th.sorted-desc::after {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
}

.stats__table th.sorted-asc::after {
  content: '\25B2';
}

.stats__table th.sorted-desc::after {
  content: '\25BC';
}

.stats__table td {
  font-family: 'Inconsolata', monospace;
  font-size: 15px;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--gray-border);
  transition: background 0.1s ease;
}

.stats__table td:first-child {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-align: left;
  padding-left: 20px;
  letter-spacing: 0.5px;
  color: var(--green-dark);
}

.stats__table tbody tr:nth-child(even) {
  background: var(--gray-light);
}

.stats__table tbody tr:hover {
  background: var(--green-light);
}

.stats__table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 var(--radius-md);
}

.stats__table tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--radius-md) 0;
}

td.stat-leader {
  font-weight: 700;
  color: var(--green-primary);
}

td.stat-leader-k {
  font-weight: 700;
  color: var(--red-accent);
}

td.stat-leader-beer {
  font-weight: 700;
  color: var(--orange-primary);
}

/* ==========================================================================
   BEER FINES BOARD
   ========================================================================== */

.fines-section {
  margin: 56px 0 40px;
}

.fines-section__layout {
  display: flex;
  align-items: stretch;
  gap: 24px;
  justify-content: center;
}

.fines__photo-wrap {
  flex: 1;
  max-width: 420px;
}

.fines__photo {
  height: 100%;
  position: relative;
}

.fines__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}

.fines__photo-caption {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.fines__card {
  flex: 1;
  max-width: 420px;
  background: var(--bg-warm);
  border: 3px solid var(--red-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.fines__header {
  background: var(--red-accent);
  color: var(--white);
  text-align: center;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.fines__warning {
  font-size: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fines__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.fines__receipt {
  padding: 24px 28px;
  text-align: center;
}

.fines__receipt-header {
  font-family: 'Inconsolata', monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.fines__divider {
  font-family: 'Inconsolata', monospace;
  font-size: 15px;
  color: var(--gray-border);
  letter-spacing: 2px;
  margin: 12px 0;
}

.fines__list {
  list-style: none;
  padding: 0;
}

.fines__list li {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--red-dark);
  padding: 8px 0;
  border-bottom: 1px dashed var(--gray-border);
  letter-spacing: 0.5px;
}

.fines__list li:last-child {
  border-bottom: none;
}

.fines__list--empty {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  color: var(--green-primary);
  font-weight: 600;
  padding: 12px 0;
}

.fines__footer-note {
  font-family: 'Inconsolata', monospace;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.fines__footer-note--small {
  font-size: 12px;
  color: var(--gray-border);
  margin-top: 4px;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.site-footer {
  background: var(--green-dark);
  padding: 32px 24px;
  text-align: center;
}

.site-footer__inner {
  max-width: 600px;
  margin: 0 auto;
}

.site-footer p {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  line-height: 1.8;
}

.site-footer__copy {
  margin-top: 12px;
  font-size: 11px !important;
  color: rgba(255,255,255,0.8) !important;
  letter-spacing: 1px;
}

/* ==========================================================================
   LOADING & ERROR STATES
   ========================================================================== */

.loading-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  color: var(--text-muted);
}

.error-message {
  color: var(--red-accent);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .hero {
    padding: 60px 16px 50px;
  }

  .hero__title {
    letter-spacing: 1px;
  }

  .hero__badge {
    font-size: 11px;
    letter-spacing: 3px;
    padding: 3px 12px;
  }

  .hero__subtitle {
    font-size: 14px;
    letter-spacing: 2px;
  }

  .hero__season {
    font-size: 14px;
  }

  .hero__tagline {
    font-size: 11px;
  }

  .section-header {
    margin: 36px 0 16px;
    gap: 10px;
  }

  .section-header__title {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .leaders__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .leader-card {
    padding: 14px;
    border-left-width: 4px;
  }

  .leader-card__name {
    font-size: 16px;
  }

  .leader-card__value {
    font-size: 22px;
  }

  .leader-card__bg-number {
    font-size: 56px;
  }

  .fines-section__layout {
    flex-direction: column;
    align-items: center;
  }

  .fines__photo-wrap {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .fines__photo-img {
    height: auto;
    max-height: 280px;
  }

  .fines__card {
    max-width: 100%;
  }

  .fines-section {
    margin: 36px 0 28px;
  }

  .stats__table th {
    padding: 10px 8px;
    font-size: 11px;
  }

  .stats__table td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .site-footer {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 44px 12px 36px;
  }

  .leaders__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .leader-card {
    padding: 12px;
  }

  .leader-card__icon {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .leader-card__category {
    font-size: 13px;
  }

  .leader-card__name {
    font-size: 14px;
  }

  .leader-card__value {
    font-size: 18px;
  }

  .fines__title {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .fines__list li {
    font-size: 17px;
  }

  .container {
    padding: 0 12px;
  }
}
