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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
  color: #e0e0e0;
  min-height: 100vh;
  padding: 10px;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
}

header {
  text-align: center;
  margin-bottom: 20px;
  color: white;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

/* Logo removed */

header h1 {
  font-size: 2.2rem;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  font-weight: 900;
}

.league-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.nav-btn.active {
  background: linear-gradient(135deg, #9E3039 0%, #7a252c 100%);
  border-color: #9E3039;
  color: white;
  box-shadow: 0 4px 12px rgba(158, 48, 57, 0.4);
}

/* Smaller navigation button for secondary sections */
.nav-btn-small {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-btn-small:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.nav-btn-small.active {
  background: linear-gradient(135deg, #9E3039 0%, #7a252c 100%);
  border-color: #9E3039;
  color: white;
  box-shadow: 0 2px 8px rgba(158, 48, 57, 0.3);
}

/* Secondary navigation container */
.secondary-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

#season-info {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

/* Zar Selector */
.zar-selector-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  padding: 10px;
}

.zar-select-label {
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zar-select {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  outline: none;
}

.zar-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.zar-select:focus {
  border-color: #9E3039;
  box-shadow: 0 0 0 3px rgba(158, 48, 57, 0.2);
}

.zar-select option {
  background: #1a1f2e;
  color: #e0e0e0;
  padding: 10px;
}

/* No zar selected message */
.no-zar-message {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* NHL Zar Sections */
.nhl-zar-section {
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nhl-zar-header {
  font-size: 1.8rem;
  font-weight: 900;
  color: #e0e0e0;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid rgba(158, 48, 57, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Round Selector */
.round-selector-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  padding: 10px;
}

.round-select-label {
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.round-select {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  outline: none;
}

.round-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.round-select:focus {
  border-color: #9E3039;
  box-shadow: 0 0 0 3px rgba(158, 48, 57, 0.2);
}

.round-select option {
  background: #1a1f2e;
  color: #e0e0e0;
  padding: 10px;
}

#refresh-btn {
  background: #9E3039;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: 600;
}

#refresh-btn:hover {
  background: #7a252c;
}

#bracket-container {
  background: rgba(20, 25, 40, 0.95);
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  min-height: 500px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#loading,
#error {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #b0b0b0;
}

#error {
  color: #d32f2f;
}

/* Playoff Bracket Layout */
.playoff-bracket {
  display: flex;
  justify-content: center;
  gap: 60px;
  min-width: 1600px;
  padding: 20px;
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
}

.conference {
  flex: 1;
  display: flex;
  gap: 50px;
}

.conference.left {
  flex-direction: row;
}

.conference.right {
  flex-direction: row-reverse;
}

.round {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 400px;
  position: relative;
}

.round-header {
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: #e0e0e0;
  margin-bottom: 15px;
  padding: 8px;
  background: linear-gradient(to right, #2a3a5a, #1e2d47);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #3d5a80;
}

.round-zar-name {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: -10px;
  margin-bottom: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.matchup {
  background: #1a1f2e;
  border-radius: 10px;
  margin: 10px 0;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid #2a3441;
  display: flex;
  position: relative;
  margin-left: 65px;
  width: calc(100% - 65px);
  max-width: calc(100% - 65px);
  box-sizing: border-box;
  /* Add space for the number */
}

/* ... (other styles) ... */

/* Matchup Numbering */
.matchup-number {
  position: absolute;
  top: 50%;
  left: -50px;
  /* Move outside to the left */
  transform: translateY(-50%);
  background: #9E3039;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 10;
  border: 2px solid #fff;
  visibility: visible !important;
  opacity: 1 !important;
}

.matchup-teams {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-right: 150px;
  min-width: 0;
  overflow: visible;
}

.team-container {
  background: #252b3a;
  border-bottom: 2px solid #2a3441;
  transition: all 0.2s;
}

.team-container:last-child {
  border-bottom: none;
}

.team-container.winner {
  background: linear-gradient(to right, #2d4a2d, #1e3a1e);
  border-left: 5px solid #4caf50;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(to right, #2a2f3e, #252b3a);
}

.team-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0e0e0;
  flex: 1;
}

.team-name-link {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.team-name-link:hover {
  color: #4a9eff;
  text-decoration: underline;
}

.team-container.winner .team-name-link {
  color: #81c784;
}

.team-container.winner .team-name-link:hover {
  color: #a5d6a7;
}

.team-container.winner .team-name {
  color: #81c784;
}

.team-score {
  display: none;
}

.stats-row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: #1e2330;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  box-sizing: border-box;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  background: #2a2f3e;
  border-radius: 6px;
  transition: all 0.2s;
  min-width: 60px;
  max-width: 100px;
  overflow: hidden;
  box-sizing: border-box;
}

.stat-cell.win {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.stat-cell.loss {
  background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
  box-shadow: 0 2px 6px rgba(239, 83, 80, 0.3);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #b0b0b0;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-cell.win .stat-label,
.stat-cell.loss .stat-label {
  color: white;
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e0e0e0;
}

.stat-cell.win .stat-value,
.stat-cell.loss .stat-value {
  color: white;
}

/* Italic styling for NHL goalie categories with < 3 games */
.stat-cell.italic-category .stat-label,
.stat-cell.italic-category .stat-value {
  font-style: italic;
  opacity: 0.85;
}


/* Center Championship Area */
.championship {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 300px;
  position: relative;
}

.championship-header {
  text-align: center;
  margin-bottom: 20px;
}

.championship-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.trophy {
  font-size: 4rem;
  margin: 10px 0;
}

.championship .matchup {
  min-width: 450px;
  border: 3px solid #ffd700;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Error state */
.matchup.error {
  background: #ffebee;
  border-color: #ef5350;
}

.matchup-error {
  padding: 20px;
  text-align: center;
  color: #ef5350;
  font-weight: 600;
}

/* Matchup Score Box */
.matchup-score-box {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #2a3a5a 0%, #1e2d47 100%);
  border: 2px solid #3d5a80;
  border-radius: 10px;
  padding: 15px 20px;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.matchup-score-box .score-label {
  font-size: 0.7rem;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.matchup-score-box .score-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

footer {
  text-align: center;
  margin-top: 20px;
  color: white;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .playoff-bracket {
    min-width: 1200px;
  }

  .round {
    min-width: 320px;
  }

  .stats-row {
    gap: 1px;
  }

  .stat-label {
    font-size: 0.6rem;
  }

  .stat-value {
    font-size: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .header-content {
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }

  .logo {
    position: static;
    transform: none;
    height: 60px;
    margin-bottom: 10px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .playoff-bracket {
    flex-direction: column;
    min-width: 100%;
  }

  .conference {
    flex-direction: column;
  }

  .round {
    min-width: 100%;
  }

  .championship {
    order: -1;
    margin-bottom: 20px;
  }

  .matchup-score-box {
    position: static;
    transform: none;
    margin: 10px auto;
    width: 100%;
    max-width: 200px;
  }

  .matchup-teams {
    padding-right: 0;
  }

  .matchup {
    flex-direction: column;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  .container {
    padding: 0 5px;
  }

  header h1 {
    font-size: 1.3rem;
  }

  .league-nav {
    gap: 6px;
    margin: 10px 0;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .zar-selector-container,
  .round-selector-container {
    flex-direction: column;
    gap: 8px;
    padding: 5px;
  }

  .zar-select,
  .round-select {
    min-width: 100%;
    max-width: 100%;
  }

  #bracket-container {
    padding: 10px 5px;
    border-radius: 8px;
    overflow-x: hidden;
  }

  .round {
    min-width: 100%;
  }

  .round-header {
    font-size: 0.85rem;
    padding: 6px;
  }

  .matchup {
    margin-left: 40px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    border-radius: 8px;
  }

  .matchup-number {
    left: -35px;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .team-header {
    padding: 8px 10px;
  }

  .team-name {
    font-size: 0.9rem;
  }

  .stats-row {
    padding: 5px;
    gap: 3px;
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
  }

  .stat-cell {
    min-width: 40px;
    max-width: none;
    padding: 4px 2px;
  }

  .stat-label {
    font-size: 0.55rem;
  }

  .stat-value {
    font-size: 0.7rem;
  }

  .matchup-score-box {
    padding: 10px 15px;
    min-width: 100px;
  }

  .matchup-score-box .score-value {
    font-size: 1.4rem;
  }

  .championship .matchup {
    min-width: 100%;
  }

  /* EPL mobile */
  .epl-bracket-container {
    flex-direction: column;
    gap: 20px;
    padding: 10px;
  }

  .epl-round {
    min-width: 100%;
  }

  .epl-matchup {
    min-width: 100%;
  }

  .epl-team-box {
    padding: 10px;
  }

  .epl-team-name {
    font-size: 0.9rem;
  }

  .epl-team-points {
    font-size: 1rem;
  }

  /* Search */
  #team-search {
    max-width: 100%;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .no-zar-message {
    padding: 40px 15px;
    font-size: 1.1rem;
  }
}

/* Connecting Lines (optional enhancement) */
.round::after {
  content: '';
  position: absolute;
  right: -25px;
  top: 50%;
  width: 20px;
  height: 2px;
  background: #1976d2;
  transform: translateY(-50%);
}

.conference.right .round::after {
  right: auto;
  left: -25px;
}

.round:last-child::after {
  display: none;
}

/* Admin Panel */
.admin-body {
  background: #0a0e27;
  color: #0a0e27;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  color: white;
}

.admin-header h1 {
  margin-bottom: 6px;
}

.admin-subtitle {
  opacity: 0.8;
}

.admin-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  align-self: center;
}

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

.admin-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(8, 15, 52, 0.25);
  margin-bottom: 20px;
}

.admin-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
  background: white;
  color: #000000;
  cursor: text;
  transition: border-color 0.2s;
}

.admin-field textarea {
  font-family: inherit;
  resize: vertical;
  min-height: 200px;
}

.admin-field select:focus,
.admin-select:focus {
  outline: none;
  border-color: #2563eb;
}

.admin-field select option,
.admin-select option {
  background: white;
  color: #374151;
}

.admin-field.small {
  max-width: 150px;
}

.admin-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.admin-btn:active {
  transform: scale(0.98);
}

.admin-btn.primary {
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.admin-btn.secondary {
  background: #e0e7ff;
  color: #4338ca;
}

.admin-btn.ghost {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #000000;
}

.admin-btn.danger {
  background: #fee2e2;
  color: #dc2626;
}

.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-round-card {
  border-left: 6px solid #2563eb;
  margin-bottom: 24px;
}

/* Zar sections for NBA */
.admin-zar-section {
  margin-bottom: 40px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-zar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-zar-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #e0e0e0;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-zar-rounds {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
}

.admin-round-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-round-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-round-actions {
  display: flex;
  gap: 8px;
}

.admin-matchups {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-matchup-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9fafb;
}

.admin-matchup-fields,
.admin-matchup-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-matchup-links .admin-field {
  flex: 1;
}

.admin-team-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 250px;
}

.admin-team-group .admin-field.small {
  max-width: 100%;
}

.admin-matchup-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-empty {
  text-align: center;
  padding: 30px 20px;
  color: #6b7280;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  border: 1px dashed rgba(99, 102, 241, 0.3);
}

.admin-empty.small {
  padding: 12px;
}

.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-status {
  font-weight: 600;
  margin-left: 12px;
}

.admin-status[data-state='info'] {
  color: #2563eb;
}

.admin-status[data-state='success'] {
  color: #15803d;
}

.admin-status[data-state='error'] {
  color: #dc2626;
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
  }

  .admin-top-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .matchup-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Search Styles */
.search-container {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

#team-search {
  padding: 12px 20px;
  width: 100%;
  max-width: 400px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
  outline: none;
}

#team-search:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #9E3039;
  box-shadow: 0 0 15px rgba(158, 48, 57, 0.3);
}

#team-search::placeholder {
  color: rgba(255, 255, 255, 0.5);
}


/* Search Highlight */
.matchup.highlight {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  transform: scale(1.02);
  transition: all 0.3s;
  z-index: 20;
}

.team-container.highlight-team {
  background: rgba(255, 215, 0, 0.15);
}

.team-name.highlight-text {
  color: #ffd700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* EPL Points Display */
.epl-points {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  text-align: center;
  margin-top: 8px;
}

.epl-points .stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.epl-points .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

/* EPL Bracket Styles */
.epl-bracket-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.epl-round {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  min-width: 280px;
  flex-shrink: 0;
}

.epl-round-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.epl-matchups {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.epl-matchup {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  position: relative;
}

.epl-matchup-teams-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.epl-matchup-number {
  background: #9E3039;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.epl-team-box {
  background: #1f2937;
  border: 2px solid #dc2626;
  border-radius: 8px;
  padding: 12px;
  min-height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.3s;
}

/* Default styles for non-winners (dark background) */
.epl-team-box:not(.epl-winner) {
  background: #1f2937;
  border-color: #dc2626;
}

.epl-team-box:not(.epl-winner) .epl-team-group {
  color: #dc2626;
}

.epl-team-box:not(.epl-winner) .epl-team-name {
  color: #9ca3af !important;
}

.epl-team-box:not(.epl-winner) .epl-team-points {
  color: #9ca3af !important;
}

/* Winner styles (white background with green border) */
.epl-team-box.epl-winner {
  border-color: #10b981;
  background: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.epl-team-box.epl-winner .epl-team-group {
  color: #10b981 !important;
}

.epl-team-box.epl-winner .epl-team-name {
  color: #1f2937 !important;
  font-weight: 700;
}

.epl-team-box.epl-winner .epl-team-points {
  color: #1f2937 !important;
  font-weight: 700;
}

.epl-team-box > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.epl-team-group {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.epl-team-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937 !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  min-height: 1.2em;
}

.epl-team-points {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  margin-left: auto;
  white-space: nowrap;
}


.epl-final {
  align-items: center;
}

.epl-matchup-final .epl-team-box {
  min-width: 280px;
  padding: 16px;
  font-size: 1.1rem;
}

/* Admin Bracket View Styles */
.admin-bracket-container {
  width: 100%;
  max-width: 1600px;
  margin: 20px auto;
  padding: 20px;
}

.admin-bracket-round {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
  flex-shrink: 0;
}

.admin-bracket-round-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.admin-bracket-matchups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-bracket-matchup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 250px;
  position: relative;
  padding-top: 15px;
}

.admin-bracket-matchup-number {
  position: absolute;
  top: 0;
  left: 10px;
  background: #9E3039;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
}

.admin-bracket-matchup-teams {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-bracket-team {
  background: #1f2937;
  border: 2px solid #dc2626;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.admin-bracket-team.winner {
  border-color: #10b981;
  background: #ffffff;
}

.admin-bracket-input-group {
  width: 50px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  color: #dc2626;
}

.admin-bracket-team.winner .admin-bracket-input-group {
  color: #10b981;
}

.admin-bracket-input-name {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.95rem;
  background: transparent;
  color: #9ca3af;
  min-width: 0;
}

.admin-bracket-team.winner .admin-bracket-input-name {
  color: #1f2937;
}

.admin-bracket-input-points {
  width: 60px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  background: transparent;
  color: #9ca3af;
}

.admin-bracket-team.winner .admin-bracket-input-points {
  color: #1f2937;
}

.admin-bracket-input-group:focus,
.admin-bracket-input-name:focus,
.admin-bracket-input-points:focus {
  outline: none;
  border-color: #9E3039;
  background: rgba(255, 255, 255, 0.1);
}

.admin-bracket-team.winner .admin-bracket-input-group:focus,
.admin-bracket-team.winner .admin-bracket-input-name:focus,
.admin-bracket-team.winner .admin-bracket-input-points:focus {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.95);
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.admin-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab.active {
  color: #ffffff;
  border-bottom-color: #9E3039;
}

.admin-tab-content {
  display: block;
}

.admin-tab-content[style*="display: none"] {
  display: none !important;
}

/* Content Management Styles */
.content-item {
  background: rgba(10, 14, 39, 0.8);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.content-item.draggable-item {
  cursor: move;
}

.content-item.draggable-item:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.content-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.content-item.drag-over {
  border-color: #9E3039;
  border-width: 2px;
  background: rgba(158, 48, 57, 0.1);
  transform: translateY(0);
}

.drag-handle {
  user-select: none;
  transition: color 0.2s;
}

.drag-handle:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

.content-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.content-item-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ffffff;
}

.content-item-actions {
  display: flex;
  gap: 10px;
}

.content-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.content-form textarea {
  min-height: 200px;
  resize: vertical;
}

.image-upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.image-upload-area:hover {
  border-color: #9E3039;
  background: rgba(255, 255, 255, 0.05);
}

.image-upload-area.dragover {
  border-color: #9E3039;
  background: rgba(158, 48, 57, 0.1);
}

.uploaded-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.uploaded-image {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, border 0.2s;
  border: 2px solid transparent;
}

.uploaded-image:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.uploaded-image.thumbnail-selected {
  border: 3px solid #9E3039;
  box-shadow: 0 0 15px rgba(158, 48, 57, 0.5);
}

.uploaded-image.drag-over {
  border: 2px solid #9E3039;
  opacity: 0.7;
}

.uploaded-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.uploaded-image .image-order-number {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(158, 48, 57, 0.9);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  pointer-events: none;
}

.uploaded-image .thumbnail-badge {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(158, 48, 57, 0.95);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  z-index: 2;
  pointer-events: none;
}

.uploaded-image .remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 3;
}

.youtube-id-help {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

/* Rich Text Editor Styles */
.editor-toolbar {
  display: flex;
  gap: 5px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 4px 4px 0 0;
  border: 1px solid #d1d5db;
  border-bottom: none;
  flex-wrap: wrap;
}

.editor-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #000000;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-weight: 600;
}

.editor-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.editor-btn:active {
  background: #e5e7eb;
  border-color: #6b7280;
}

.rich-text-editor {
  font-family: inherit;
  line-height: 1.6;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #d1d5db !important;
  overflow-y: auto;
  word-wrap: break-word;
}

.rich-text-editor:focus {
  border-color: #2563eb !important;
  background: #ffffff !important;
  color: #000000 !important;
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: -2px;
}

.rich-text-editor * {
  margin: 0;
  padding: 0;
}

.rich-text-editor p {
  margin-bottom: 10px;
}

.rich-text-editor strong {
  font-weight: bold;
}

.rich-text-editor em {
  font-style: italic;
}

.rich-text-editor u {
  text-decoration: underline;
}

/* Monthly Managers Styles */
.manager-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

.month-row {
  padding: 0 10px;
  margin-bottom: 8px;
}

.month-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: stretch;
  padding: 0;
}

.month-box {
  width: 100%;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.3s;
  box-sizing: border-box;
}

.month-box:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

.month-title {
  font-size: 1rem;
  font-weight: 800;
  color: #9E3039;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.league-cell {
  min-height: 50px;
  display: flex;
  flex-direction: column;
}

/* Responsive styles for monthly managers */
@media (max-width: 1024px) {
  .monthly-managers-header,
  .month-row {
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 15px !important;
  }
  
  .month-title {
    font-size: 1.1rem !important;
  }
  
  .league-header {
    font-size: 1.1rem !important;
    padding: 12px !important;
  }
}

@media (max-width: 768px) {
  .monthly-managers-header,
  .month-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
  }
  
  /* Hide "Mēnesis" header on mobile */
  .month-header-title {
    display: none !important;
  }
  
  .month-row {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .month-cell {
    width: 100%;
    margin-bottom: 15px;
    padding: 0;
    align-items: stretch;
  }
  
  .month-box {
    padding: 15px;
    margin-bottom: 12px;
  }
  
  .month-title {
    font-size: 0.9rem !important;
    letter-spacing: 0.8px !important;
  }
  
  .league-cell {
    width: 100%;
    margin-bottom: 20px;
  }
  
  /* Add league labels before each league cell on mobile */
  .league-cell[data-league]::before {
    content: attr(data-league);
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
  }
  
  /* Hide extra league headers on mobile, show only first */
  .monthly-managers-header .league-header:nth-child(n+3) {
    display: none;
  }
  
  .manager-card {
    padding: 12px !important;
  }
  
  .manager-name {
    font-size: 1rem !important;
  }
}

.rich-text-editor p {
  margin-bottom: 10px;
}

.rich-text-editor ul,
.rich-text-editor ol {
  margin-left: 20px;
  margin-bottom: 10px;
}

.rich-text-editor strong {
  font-weight: bold;
}

.rich-text-editor em {
  font-style: italic;
}

.rich-text-editor u {
  text-decoration: underline;
}


