/* ============================================
   SPRING LAKES POKER LEAGUE — Main Stylesheet
   White background, clean, readable
   ============================================ */

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

html { scroll-behavior: smooth; }

body {
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── HEADER ─── */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid #e85d26;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 2rem;
}

.site-title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-title:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #444;
  padding: 0.4rem 0.75rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: #e85d26;
  border-bottom-color: #e85d26;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #1a1a1a;
  margin-left: auto;
}

/* ─── HERO BANNER ─── */
.hero-banner {
  width: 100%;
  overflow: hidden;
  max-height: 380px;
  background: #0a0a0a;
}

.hero-img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero-fallback {
  height: 280px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-fallback-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  gap: 0.4rem;
}

.hero-roman {
  font-size: 5rem;
  font-weight: 900;
  color: #e85d26;
  line-height: 1;
}

.hero-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.hero-years {
  color: #aaa;
  font-size: 1rem;
}

/* ─── PAGE LAYOUT ─── */
.page-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.page-body.full-width {
  grid-template-columns: 1fr;
  max-width: 900px;
}

/* ─── MAIN CONTENT ─── */
.event-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 0.3rem;
}

.event-meta {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Separator line like the current site */
.event-meta::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #e85d26;
  margin: 0.6rem auto 0;
}

/* ─── RESULTS TABLE ─── */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.results-table th {
  background: #f2f2f2;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 2px solid #ddd;
}

.results-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1rem;
}

.results-table tr:last-child td { border-bottom: none; }

.results-table tr.money td {
  font-weight: 700;
}

.results-table tr.money:first-child td {
  color: #e85d26;
}

.results-table tr:hover td { background: #fafafa; }

/* ─── SIDEBAR ─── */
.sidebar {}

.sidebar-block {
  margin-bottom: 2rem;
}

.sidebar-heading {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e8e8e8;
}

.next-event-date {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.next-event-type {
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.15rem;
}

.next-event-loc {
  font-size: 0.9rem;
  color: #888;
}

/* ─── SCHEDULE LIST ─── */
.sched-list {
  list-style: none;
}

.sched-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.sched-item.past {
  color: #aaa;
}

.sched-label {
  font-weight: 700;
  min-width: 28px;
}

.sched-info {
  color: inherit;
}

/* ─── RANKINGS PAGE ─── */
.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.rankings-table th {
  background: #f2f2f2;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 0.75rem;
  text-align: center;
  border-bottom: 2px solid #ddd;
  white-space: nowrap;
}

.rankings-table th:nth-child(2) { text-align: left; }

.rankings-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  font-size: 0.95rem;
}

.rankings-table td:nth-child(2) { text-align: left; font-weight: 600; }

.rankings-table tr:hover td { background: #fafafa; }

.rankings-table .rank-1 td { color: #e85d26; font-weight: 700; }
.rankings-table .rank-2 td, .rankings-table .rank-3 td { font-weight: 600; }

.rank-num {
  font-weight: 900;
  font-size: 1rem;
  color: #333;
}

.event-pts {
  font-size: 0.85rem;
  color: #555;
}

.event-pts.has-win {
  color: #e85d26;
  font-weight: 700;
}

.total-pts {
  font-size: 1.1rem;
  font-weight: 900;
}

/* ─── PAGE HEADINGS ─── */
.page-heading {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.page-heading-divider {
  width: 40px;
  height: 3px;
  background: #e85d26;
  margin: 0 auto 2rem;
}

/* ─── RULES PAGE ─── */
.rules-content {
  font-size: 1rem;
  line-height: 1.7;
}

.rules-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e85d26;
}

.rules-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.rules-content li {
  margin-bottom: 0.3rem;
}

.rules-content p {
  margin-bottom: 0.8rem;
}

.highlight-box {
  background: #fff8f5;
  border-left: 4px solid #e85d26;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

.blinds-table, .payouts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.blinds-table th, .payouts-table th {
  background: #f2f2f2;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid #ddd;
}

.blinds-table td, .payouts-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

/* ─── LOADING / EMPTY STATES ─── */
.loading-msg {
  color: #aaa;
  font-style: italic;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.muted {
  color: #999;
  font-size: 0.9rem;
}

/* ─── FOOTER ─── */
.site-footer {
  background: #f7f7f7;
  border-top: 2px solid #e8e8e8;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #888;
  margin-top: 3rem;
}

.site-footer a {
  color: #e85d26;
}

/* ─── ADMIN STYLES ─── */
.admin-header {
  background: #1a1a1a;
  color: #fff;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 1.5rem;
}

.admin-title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #e85d26;
}

.admin-nav a {
  color: #ccc;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.75rem;
  border-right: 1px solid #333;
}

.admin-nav a:last-child { border-right: none; }
.admin-nav a:hover { color: #fff; text-decoration: none; }

.admin-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: 3px solid #e85d26;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-card h2 {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #eee;
}

/* ─── FORM ELEMENTS ─── */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #ddd;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: #e85d26;
}

.form-group { margin-bottom: 1rem; }

.form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: #e85d26; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #d04e1a; }

.btn-dark { background: #1a1a1a; color: #fff; }
.btn-dark:hover:not(:disabled) { background: #333; }

.btn-outline {
  background: transparent;
  border: 1.5px solid #ccc;
  color: #555;
}
.btn-outline:hover:not(:disabled) { border-color: #e85d26; color: #e85d26; }

.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a93226; }

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
}

.btn-full { width: 100%; }

/* ─── ADMIN FINISH ENTRY TABLE ─── */
.finish-entry-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
}

.finish-entry-table th {
  background: #f5f5f5;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid #e0e0e0;
}

.finish-entry-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.finish-entry-table input[type="number"] {
  width: 80px;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

.finish-entry-table select {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

/* Points preview badge */
.pts-preview {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  min-width: 32px;
  text-align: center;
}

.pts-preview.winner {
  background: #fff3ec;
  color: #e85d26;
}

/* ─── LOGIN CARD ─── */
.login-wrap {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.login-card {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 3px solid #e85d26;
  padding: 2.5rem;
  width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.login-card h2 {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.login-card p {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.error-msg {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  text-align: center;
}

.success-msg {
  color: #27ae60;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  text-align: center;
}

/* ─── CSV TEXTAREA ─── */
.csv-area textarea {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  min-height: 100px;
  resize: vertical;
}

.csv-hint {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.3rem;
  font-style: italic;
}

/* ─── PLAYER ROSTER CHIPS ─── */
.player-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.player-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.player-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.player-tag-remove:hover { color: #c0392b; }

/* ─── STATUS BANNER ─── */
.status-banner {
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: none;
}

.status-banner.show { display: block; }
.status-banner.success { background: #eafaf1; color: #1e8449; border-left: 4px solid #27ae60; }
.status-banner.error { background: #fdedec; color: #922b21; border-left: 4px solid #c0392b; }
.status-banner.info { background: #eaf4fd; color: #1a5276; border-left: 4px solid #2980b9; }

/* ─── TOC QUALIFICATION BADGE ─── */
.toc-badge {
  display: inline-block;
  background: #fff3ec;
  color: #e85d26;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 2px solid #e85d26; z-index: 100; padding: 0.5rem 0; }
  .site-nav.open .nav-link { padding: 0.75rem 1.5rem; border-bottom: 1px solid #f0f0f0; border-right: none; }
  .nav-toggle { display: block; }
  .page-body { grid-template-columns: 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .hero-fallback { height: 180px; }
  .hero-roman { font-size: 3rem; }
  .hero-name { font-size: 1.2rem; }
  .rankings-table { font-size: 0.82rem; }
  .rankings-table th, .rankings-table td { padding: 0.5rem 0.4rem; }
}

/* ─── RANKINGS: alternating column shading ─── */
.rankings-table tbody tr:nth-child(even) td {
  background-color: #f0f7f0;
}
.rankings-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}
.rankings-table tbody tr:hover td {
  background-color: #e8f4e8 !important;
}
/* Keep 1st place orange tint on top */
.rankings-table .rank-1 td {
  background-color: #fff8f5 !important;
}
.rankings-table .rank-1:hover td {
  background-color: #ffeee8 !important;
}

/* ─── HOME: announcement block ─── */
.announcement-block {
  background: #fff8f5;
  border-left: 4px solid #e85d26;
  padding: 1rem 1.2rem;
  margin-bottom: 1.8rem;
}
.announcement-block h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e85d26;
  margin-bottom: 0.4rem;
}
.announcement-block p {
  font-size: 1rem;
  color: #1a1a1a;
  white-space: pre-line;
  line-height: 1.6;
}
