/* FORCE BIG LOGO */
.logo-container {
  display: flex;
  justify-content: center;
  margin: 0;
}

.league-logo {
  width: 1000px;
  max-width: 98%;
  height: auto;
  display: block;
  margin: 0 auto;
}



.container {
  width: 92%;
  max-width: 1400px;   /* bigger max width */
  margin: 0 auto;
  padding: 30px 20px;  /* more padding */
}


.tabs, .division-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tabs button, .division-tabs button {
  padding: 10px 20px;
  border: none;
  background: #ccc;
  cursor: pointer;
}

.tabs button.active,
.division-tabs button.active {
  background: #2c3e50;
  color: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

thead {
  background: #2c3e50;
  color: white;
}

.team {
  text-align: left;
  font-weight: bold;
}

tbody tr:hover {
  background: #e6f0ff;
  cursor: pointer;
}

/* ----------------------------------
   TAB + DIVISION SHOW/HIDE RULES
---------------------------------- */

.section, .league-division, .schedule-division, .players-section {
  display: none;
}

.section.active,
.league-division.active,
.schedule-division.active,
.players-section.active {
  display: block;
}



.players-section thead {
  background: #34495e;
}

/* ===============================
   COLOR SYSTEM
================================ */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --primary: #1f3a5f;
  --primary-dark: #162b45;
  --accent: #3fa9f5;
  --border: #e0e6ed;
  --text: #2c3e50;
  --muted: #7f8c8d;
}

/* ===============================
   PAGE
================================ */
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #eef2f7, #f9fbfd);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
}


/* ===============================
   MAIN CONTAINER
================================ */
.container {
  background: var(--card);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ===============================
   HEADER
================================ */
h1 {
  text-align: center;
  margin-bottom: 28px;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.4px;
}


/* ===============================
   LOGO
================================ */


/* ===============================
   TABS (MAIN)
================================ */
.tabs {
  background: #eef3f9;
  padding: 6px;
  border-radius: 999px;
  margin-top: 0px;   /* pulls tabs up closer to logo */
}

.tabs button {
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.25s ease;
}

.tabs button.active {
  background: var(--primary);
  color: white;
}

.tabs button:hover {
  color: var(--primary);
}

/* ===============================
   DIVISION TABS
================================ */
.division-tabs {
  margin-top: 15px;
}

.division-tabs button {
  background: #edf1f6;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.division-tabs button.active {
  background: var(--primary);
  color: white;
}

.division-tabs button:hover {
  background: var(--primary-dark);
  color: white;
}

/* ===============================
   TABLES
================================ */
table {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

thead {
  background: var(--primary);
  color: white;
}

th {
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

td {
  font-size: 0.9rem;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #eef6ff;
}

/* ===============================
   TEAM CELLS
================================ */
td.team {
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

td.team:hover {
  text-decoration: underline;
}

/* ===============================
   PLAYERS PANEL
================================ */
.players-section {
  margin-top: 25px;
  padding: 20px;
  background: #f7faff;
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: fadeIn 0.25s ease;
}

.players-section h3 {
  margin-bottom: 12px;
  color: var(--primary);
}

/* ===============================
   SCHEDULE
================================ */
#schedule h3 {
  margin-top: 25px;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

/* ===============================
   EXCEL UPLOAD (ADMIN)
================================ */
#excelBlock {
  background: #f2f7fd;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 15px;
}

#excelInput:enabled {
  cursor: pointer;
}

/* ===============================
   LOGIN
================================ */
#admin-login {
  max-width: 300px;
  margin: 0 auto 25px;
  display: grid;
  gap: 10px;
}

#admin-login input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

#admin-login button {
  background: var(--primary);
  color: white;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
}

/* ===============================
   ANIMATIONS
================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= LOGOUT BUTTON ================= */
#logoutBtn {
  position: absolute;
  top: 25px;
  right: 30px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#logoutBtn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.week-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.week-selector select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* important */
}

.schedule-table th,
.schedule-table td {
  padding: 10px;
  border: 1px solid var(--border);
  overflow: hidden;      /* hide overflow text */
  text-overflow: ellipsis; /* show ... */
  white-space: nowrap;   /* prevent wrap */
}

.logo-container {
  display: flex;
  justify-content: center;
}

/* ================= RANKING PANEL ================= */
.layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
}

.ranking-panel {
  width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.ranking-panel h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--primary);
  text-align: center;
}

.ranking-list {
  max-height: 500px;   /* scroll when too long */
  overflow-y: auto;
  margin-top: 10px;
}

.ranking-list table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-list th,
.ranking-list td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.ranking-list th {
  font-weight: 700;
  font-size: 0.9rem;
}

.ranking-list td {
  font-size: 0.85rem;
}

.ranking-list tr:hover {
  background: #eef6ff;
}


.logo-link {
  display: inline-block !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------------------------
   TWO-COLUMN LAYOUT
---------------------------- */
.table-layout {
  display: flex;
  gap: 35px;             /* more space between table and ranking */
  align-items: flex-start;
}

.table-left {
  flex: 1;
  min-width: 820px;      /* wider table area */
}

/* RIGHT SIDE: Ranking panel */
.ranking-right {
  width: 346px;
  background: #f7faff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  max-height: 560px; /* controls scroll height */
  overflow-y: auto;  /* scroll when too tall */
}

table {
  width: 100%;
  font-size: 17px;
  border-spacing: 0;
}

th {
  font-size: 0.95rem;
  letter-spacing: 0.4px;
}

td {
  font-size: 1rem;
}

th, td {
  padding: 14px 12px;
}


.tabs button,
.division-tabs button {
  padding: 14px 22px;
  font-size: 17px;
  font-weight: 600;
}



/* Ranking table style */
#ranking-container table {
  width: 100%;
  border-collapse: collapse;
}

#ranking-container th,
#ranking-container td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: center;
}

#ranking-container thead {
  background: var(--primary);
  color: white;
}

#weekWrapper[data-admin="false"] {
  display: none;
}

.player-link {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
}


.player-link:hover {
  text-decoration: underline;
}

.excel-spacing {
  margin-bottom: 30px; /* space before tabs */
}


/* ================= PODIUM STYLES ================= */

.rank-1 {
  background: linear-gradient(90deg, #fff4cc, #ffe08a);
  font-weight: 700;
}

.rank-2 {
  background: linear-gradient(90deg, #f1f3f5, #dfe3e6);
  font-weight: 600;
}

.rank-3 {
  background: linear-gradient(90deg, #fbe7d3, #f2c6a0);
  font-weight: 600;
}

.rank-1 td:first-child::after {
  content: " 🥇";
}

.rank-2 td:first-child::after {
  content: " 🥈";
}

.rank-3 td:first-child::after {
  content: " 🥉";
}

/* Optional polish */
.rank-1 td,
.rank-2 td,
.rank-3 td {
  border-bottom: 2px solid rgba(0,0,0,0.05);
}



/* ===============================
   PLAYER PROFILE PAGE
================================ */

    body {
      font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      background: #f4f6f8;
      padding: 40px;
      display: flex;
      justify-content: center;
      font-size: 17px;
      line-height: 1.55;
      color: #1f2937;
    }

    .serie-values {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 2px;
    }

    .stat-small {
      font-size: 0.75rem;
      color: #9ca3af;
    }

    .stat-total {
      font-size: 0.95rem;
      font-weight: 800;
      padding: 2px 8px;
      border-radius: 8px;
      background: #eef2ff;
      color: #1f3a5f;
      transition: all 0.2s ease;
    }

    /* performance tiers */
    .total-good {
      background: #dcfce7;
      color: #166534;
    }

    .total-verygood {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .total-elite {
      background: linear-gradient(135deg, #fef3c7, #fcd34d);
      color: #7c2d12;
      box-shadow: 0 0 12px rgba(252, 211, 77, 0.5);
      transform: scale(1.03);
    }
    .card {
      width: 560px;
      background: white;
      padding: 28px;
      border-radius: 16px;
      box-shadow: 0 14px 35px rgba(0,0,0,0.12);
      text-align: center;
    }

    h1 {
      margin: 0 0 12px;
      font-size: 2.1rem;
      font-weight: 700;
      letter-spacing: 0.2px;
      color: #1f3a5f;
    }


    .avatar {
      margin: 15px auto 25px;
    }

    .avatar img {
      width: 140px;
      height: 140px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid #1f3a5f;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 16px;
    }

    .stat {
      background: #f8f9fb;
      border-radius: 14px;
      padding: 14px 16px;
      text-align: left;
      font-size: 1.05rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    }


    .stat strong {
      font-weight: 700;
      font-size: 1.15rem;
      color: #1f3a5f;
    }


    .section-title {
      margin: 22px 0 10px;
      font-weight: 700;
      font-size: 1.15rem;
      color: #1f3a5f;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      text-align: left;
    }


    .last3 {
      margin-top: 16px;
      font-size: 1.35rem;
      display: flex;
      justify-content: center;
      gap: 12px;
    }


    a {
      display: inline-block;
      margin-top: 20px;
      text-decoration: none;
      color: #1f3a5f;
      font-weight: 600;
    }

    .upload-section {
      margin-top: 15px;
    }

