/* homepage styling
    
        /* ===== MODERN DARK GREEN THEME - BASE STYLES ===== */
        
        :root {
          --dark-green-primary: #0a1a0a;
          --dark-green-secondary: #0f2a0f;
          --dark-green-accent: #1a3a1a;
          --green-accent: #2d5a2d;
          --green-highlight: #4a7c4a;
          --green-bright: #6b9e6b;
          --green-glow: #8bc34a;
          --text-primary: #ffffff;
          --text-secondary: #e0e0e0;
          --text-muted: #b0b0b0;
          --text-dark: #1a1a1a;
          --success-color: #4caf50;
          --warning-color: #ff9800;
          --danger-color: #f44336;
          --info-color: #2196f3;
          --border-radius: var(--bb-border-radius-default);
          --border-radius-sm: var(--bb-border-radius-subtle);
          --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
          --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
          --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
          --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      }

      body {
          background: var(--bb-color-background-default);
          color: var(--bb-color-text-default);
          font-family: var(--bb-body-font);
          min-height: 100vh;
          display: flex;
          flex-direction: column;
          text-rendering: geometricPrecision;
      }

      main {
          flex-grow: 1;
      }
      
      /* Header and Navbar styling */
   
      
  
      .navbar {
          padding: var(--bb-padding-sm) 0;
          background: transparent !important;
      }

      .navbar-nav {
        gap: var(--bb-space-md);
      }

      /* Mobile navbar styles */
      @media (max-width: 991.98px) {
      .navbar {padding: var(--bb-padding-md) 0;}

          .navbar-nav {
              margin-top:var(--bb-padding-lg);
          }

      }
      
      .navbar-brand {
          font-family: var(--bb-heading-font), serif;
          font-size: var(--bb-text-size-2xl);
          letter-spacing: 0.04em;
          color: var(--bb-color-text-default);
          display: flex;
          align-items: center;
          transition: var(--transition);
      }
      .navbar-brand:hover {
          transform: scale(1.2);
          color: var(--bb-color-text-action-default);
      }
      
      .logo-img {
          height: 24px;
          width: auto;
          margin-right: var(--bb-space-xs);
          margin-left: var(--bb-space-xs);
          transition: var(--bb-transition-normal);
      }
      .navbar-brand:hover .logo-img {
          transform: rotate(360deg);
      }
      
      /* FIRST NAVBAR DEFINITION - NOW ACTIVE */
      .navbar-dark .navbar-nav .nav-link {
          color: var(--bb-color-text-default);
          font-weight: var(--bb-text-weight-medium);
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          transition: var(--bb-transition-normal);
          border-radius: none;
          position: relative;
      }

      .navbar-dark .navbar-nav .nav-link:hover,
      .navbar-dark .navbar-nav .nav-link.active {
        color: var(--bb-color-text-highlight);
      }

      .navbar-dark .navbar-nav .nav-item.active .nav-link {
          border-bottom: 2px solid var(--bb-color-border-highlight);
      }

      /* Mobile navbar backdrop overlay */
      .navbar-backdrop {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.6);
          backdrop-filter: blur(8px);
          -webkit-backdrop-filter: blur(8px);
          z-index: 1039;
          opacity: 0;
          visibility: hidden;
          transition: opacity 0.3s ease, visibility 0.3s ease;
          display: none;
      }

      .navbar-backdrop.show {
          opacity: 1;
          visibility: visible;
      }

      /* Mobile navigation toggle button */
      .mobile-nav-toggle {
          position: relative;
          z-index: 1041;
          display: none !important; /* Hidden by default on desktop - !important to override utility classes */
      }

      .mobile-nav-icon-close {
          display: none;
      }

      /* Show cross icon when menu is open */
      .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon-burger {
          display: none;
      }

      .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon-close {
          display: inline-block;
      }

      /* Show button only on mobile */
      @media (max-width: 991.98px) {
          .mobile-nav-toggle {
              display: inline-flex !important; /* !important to ensure it shows on mobile */
          }
      }

      /* Ensure navbar stays above backdrop and show backdrop only on mobile */
      @media (max-width: 991.98px) {
          .navbar-backdrop {
              display: block;
          }
          
          .navbar-collapse {
              position: relative;
              z-index: 1040;
          }
      }
      
      /* Search bar styling */
      .search-container .form-control {
          background-color: var(--bb-color-surface-default);
          border: 1px solid var(--bb-color-border-default);
          color: var(--bb-color-text-default);
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          transition: var(--bb-transition-normal);
          flex: 1;
          width: 100%;
          min-width: 0;
      }
      
      .search-container .form-control:focus {
          background-color: var(--bb-color-surface-default);
          box-shadow: var(--bb-shadow-sm);
          border-color: var(--bb-color-surface-active);
      }
      
      .search-container .btn {
          position: absolute;
          right: 5px;
          top: 50%;
          transform: translateY(-50%);
          border: none;
          padding: var(--bb-padding-xs) var(--bb-padding-sm);
          color: var(--bb-color-text-link-default);
          transition: var(--bb-transition-normal);
      }

      .search-container .btn:hover {
        color: var(--bb-color-text-link-hover);
      }
      
      /* Main content area */
      

      
      /* Alert styling */
      .messages-container {
          position: fixed;
          top: 90px;
          right: 20px;
          z-index: 1050;
          max-width: 380px;
      }
      
      .messages-container .alert {
          box-shadow: var(--shadow-medium);
          margin-bottom: 1rem;
          border-radius: var(--bb-border-radius-default);
          border: 1px solid rgba(255,255,255,0.2);
          backdrop-filter: blur(10px);
          display: flex;
          align-items: center;
          padding: var(--bb-padding-md) var(--bb-padding-lg);
      }
      .alert-success { background-color: rgba(76, 175, 80, 0.5); border-left: 4px solid var(--success-color); color: var(--text-primary); }
      .alert-warning { background-color: rgba(255, 152, 0, 0.5); border-left: 4px solid var(--warning-color); color: var(--text-primary); }
      .alert-danger { background-color: rgba(244, 67, 54, 0.5); border-left: 4px solid var(--danger-color); color: var(--text-primary); }
      .alert-info { background-color: rgba(33, 150, 243, 0.5); border-left: 4px solid var(--info-color); color: var(--text-primary); }

      
      /* Button styling */
      .btn-primary {
          background: linear-gradient(145deg, var(--green-accent), var(--green-highlight));
          border: 1px solid rgba(255, 255, 255, 0.2);
          color: var(--text-primary);
          font-weight: 600;
          padding: var(--bb-padding-sm) var(--bb-padding-lg);
          border-radius: var(--bb-border-radius-default);
          transition: var(--transition);
      }
      
      .btn-primary:hover {
          background: linear-gradient(145deg, var(--green-highlight), var(--green-bright));
          transform: translateY(-2px);
          box-shadow: var(--shadow-medium);
          color: var(--text-primary);
          border-color: rgba(255, 255, 255, 0.3);
      }
      
      .btn-outline-light {
           color: var(--text-secondary);
          border: 1px solid var(--text-secondary);
          background: transparent;
          padding: var(--bb-padding-sm) var(--bb-padding-lg);
      }
      .btn-outline-light:hover {
          background: var(--text-secondary);
          color: var(--text-dark);
          border-color: var(--text-secondary);
      }
 
  
  .next-tournament-box h4 {
  margin-bottom: 1rem;
  font-family: var(--bb-heading-font);
  color: var(--secondary-color);
}

.next-tournament-box h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.next-tournament-box .tournament-date,
.next-tournament-box .tournament-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.next-tournament-box i {
  color: var(--primary-color);
}

a:hover .next-tournament-box {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Tournament cards */
      .upcoming-tournament-card {
          background-color: white;
          border-radius: 10px;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
          margin-bottom: 1rem;
          padding: var(--bb-padding-md);
          transition: all 0.3s ease;
          border-left: 4px solid var(--primary-color);
      }

.upcoming-tournament-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upcoming-tournament-card.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.upcoming-tournament-card.clickable:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left-width: 6px;
}

.upcoming-tournament-card.clickable .fa-chevron-right {
  transition: transform 0.2s ease;
}

.upcoming-tournament-card.clickable:hover .fa-chevron-right {
  transform: translateX(3px);
}

.upcoming-tournament-card .tournament-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.upcoming-tournament-card .tournament-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.upcoming-tournament-info-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Home page tournament items */
.home-tournaments {
  margin-top: 1rem;
}

      .home-tournament-item {
          padding: var(--bb-padding-md);
          margin-bottom: 0.5rem;
          border-radius: 0.5rem;
          border: 1px solid #eee;
          transition: all 0.2s ease;
          cursor: pointer;
          position: relative;
      }

.home-tournament-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.home-tournament-item:last-child {
  margin-bottom: 0;
}

.home-tournament-title {
  margin-bottom: 0.5rem;
}

.home-tournament-date {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.home-tournament-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Simple tournament list */
.tournament-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--bb-color-surface-default);
}

.tournament-list .list-group-item {
  transition: all 0.3s ease;
  border-left: none;
  border-right: none;
}

.tournament-list .list-group-item:hover {
  background-color: var(--primary-light);
}

.tournament-list .tournament-link {
  color: var(--secondary-color);
  text-decoration: none;
}

.tournament-list .tournament-link:hover h5 {
  color: var(--primary-color);
}

      .tournament-item {
          display: flex;
          padding: var(--bb-padding-md) var(--bb-padding-lg);
          border-bottom: 1px solid var(--bb-color-border-default);
          align-items: center;
          transition: all 0.2s ease;
          cursor: pointer;
          position: relative;
      }

.tournament-item:last-child {
  border-bottom: none;
}

.tournament-item:hover {
  background-color: var(--bb-color-surface-hover);
}

.tournament-content {
  flex: 1;
  min-width: 0;
}

.tournament-main {
  margin-bottom: 0.5rem;
}


.tournament-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.tournament-date-time {
  color: var(--text-light);
  font-size: 0.9rem;
}

.tournament-chevron {
  margin-left: 1rem;
  color: #ccc;
  transition: transform 0.2s ease;
}

.tournament-item:hover .tournament-chevron {
  transform: translateX(3px);
  color: var(--primary-color);
}

.simple-tournament-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

      .simple-tournament-item {
          display: flex;
          padding: var(--bb-padding-md) var(--bb-padding-lg);
          border-bottom: 1px solid #eee;
          align-items: center;
          transition: all 0.2s ease;
          cursor: pointer;
      }

.simple-tournament-item:last-child {
  border-bottom: none;
}

.simple-tournament-item:hover {
  background-color: rgba(58, 92, 170, 0.05);
}

.simple-tournament-content {
  flex: 1;
  min-width: 0;
}

.simple-tournament-title {
  margin-bottom: 0.25rem;
}

.simple-tournament-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

.simple-tournament-winner {
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 1.5rem;
  white-space: nowrap;
}

.simple-tournament-arrow {
  color: #ccc;
  transition: transform 0.2s ease;
  margin-left: 1rem;
}

.simple-tournament-item:hover .simple-tournament-arrow {
  transform: translateX(3px);
  color: var(--primary-color);
}

      .simple-tournament-item.with-details {
          padding: var(--bb-padding-lg);
      }

.simple-tournament-details {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.simple-tournament-participants {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Clickable row styling */
.clickable-row {
  cursor: pointer;
  transition: all 0.2s ease;
}

.clickable-row:hover {
  background-color: var(--primary-light);
  transform: translateX(3px);
}

.clickable-row:active {
  background-color: rgba(58, 92, 170, 0.15);
}

.clickable-row td:last-child {
  opacity: 0.5;
  transition: all 0.2s ease;
}

.clickable-row:hover td:last-child {
  opacity: 1;
}

.clickable-row .fa-chevron-right {
  transition: transform 0.2s ease;
}

.clickable-row:hover .fa-chevron-right {
  transform: translateX(3px);
}

/* Participant row styling */
      .participant-row {
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          border-bottom: 1px solid #f0f0f0;
          display: flex;
          align-items: center;
          transition: all 0.2s ease;
      }

.participant-row:last-child {
  border-bottom: none;
}

.participant-row:hover {
  background-color: rgba(0,0,0,0.05);
}

.participant-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  color: #000000;
  background-color: #f8f9fa;
  margin-right: 1rem;
}




.remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #ff4d4f;
  background: white;
  color: #ff4d4f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

.remove-btn:hover {
  background-color: #fff1f0;
}

/* Online accounts section */
      .online-accounts .btn {
          padding: var(--bb-padding-xs) var(--bb-padding-sm);
          transition: all 0.3s ease;
      }

.online-accounts .btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Player ranking styling */
.player-ranking-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #333;
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(58, 92, 170, 0.25);
}

.form-label {
  font-weight: 500;
}

.form-text {
  font-size: 0.8rem;
  color: var(--text-light);
}

.tournament-form-group {
  margin-bottom: 1.5rem;
}

.tournament-form-control {
  display: block;
  width: 100%;
}

#rounds-field-container {
  transition: all 0.3s ease;
}

.input-group-text {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.form-select option:hover,
.form-select option:checked {
  background-color: var(--primary-light);
}

/* Badges */
      .badge {
          font-weight: 500;
          padding: var(--bb-padding-xs) var(--bb-padding-sm);
      }

.bg-primary-subtle {
  background-color: rgba(58, 92, 170, 0.1);
}

.text-primary {
  color: var(--primary-color) !important;
}

/* Status indicators */
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.status-active {
  background-color: var(--success-color);
}

.status-inactive {
  background-color: var(--danger-color);
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
}

.messages-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 350px;
}

.messages-container .alert {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
}

/* Buttons */
      .btn {
          border-radius: 6px;
          font-weight: 500;
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          transition: all 0.3s ease;
      }

      .btn-sm {
          padding: var(--bb-padding-xs) var(--bb-padding-sm);
      }

      .btn-lg {
          padding: var(--bb-padding-sm) var(--bb-padding-lg);
      }

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover, 
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(58, 92, 170, 0.2);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(58, 92, 170, 0.2);
}

.btn-group .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-group .btn-outline-primary:hover,
.btn-group .btn-outline-primary.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Footer */
      .footer {
          background-color: var(--bb-color-surface-dimmed);
          color: var(--bb-color-text-default);
          margin-top: var(--bb-space-xl);
          padding: var(--bb-padding-3xl) 0;
          border-top: 1px solid var(--bb-color-border-default);
      }

.footer p {
  color: var(--bb-color-text-default);
  margin: 0;
}

.footer h5 {
  color: var(--bb-color-text-default);
}

.footer-links {
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--bb-color-text-default);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--bb-color-text-default);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Player profile styling */
      .player-profile-header {
          background-color: var(--primary-color);
          padding: var(--bb-padding-2xl) var(--bb-padding-xl);
          border-radius: 12px;
          margin-bottom: 2rem;
          position: relative;
          overflow: hidden;
      }

.player-profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.player-profile-header * {
  position: relative;
  z-index: 1;
}

.player-profile-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.player-profile-header .rating {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  text-align: center;
}

.player-link {
  font-weight: 500;
  color: var(--secondary-color);
  transition: all 0.2s ease;
}

.player-link:hover {
  color: var(--primary-color);
}

/* Accordion styling */
.rounds-accordion {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
}

.rounds-accordion .accordion-item {
  border: none;
  border-bottom: 1px solid #f0f0f0;
}

.rounds-accordion .accordion-item:last-child {
  border-bottom: none;
}

      .rounds-accordion .accordion-button {
          padding: var(--bb-padding-md) var(--bb-padding-lg);
          font-size: 1.2rem;
          font-weight: 600;
          color: #000000;
          background-color: #ffffff;
      }

.rounds-accordion .accordion-button:not(.collapsed) {
  color: #000000;
  background-color: #f8f9fa;
  box-shadow: none;
}

.rounds-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: #f0f0f0;
}

.rounds-accordion .accordion-button::after {
  background-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
}

.rounds-match-table {
  margin-bottom: 0;
  width: 100%;
  color: #000000;
}

.rounds-match-table thead {
  background-color: #f8f9fa;
}

      .rounds-match-table th {
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          font-weight: 600;
          border-bottom: 1px solid #f0f0f0;
      }

      .rounds-match-table td {
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          vertical-align: middle;
          border-bottom: 1px solid #f0f0f0;
      }

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

.rounds-match-table a {
  color: #000000;
  text-decoration: none;
  font-weight: 500;
}

.rounds-match-table a:hover {
  text-decoration: underline;
  color: #19e893;
}

/* Animation for saving status */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.save-status.bg-success {
  animation: pulse 0.5s ease-in-out;
}

/* Responsive adjustments for the grid */
@media (min-width: 576px) {
  .container {max-width: 100%;}
}

@media (min-width: 768px) {
  .container {
    max-width: 100%;
   
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 100%;
    padding-right: calc(var(--bb-padding-md) * 2.5) !important;
    padding-left: calc(var(--bb-padding-md) * 2.5) !important;
  }
}

@media (min-width: 1200px) {
  .container {max-width: 100%;}
}

@media (min-width: 1400px) {
  .container {
    max-width: 1920px;
  }

}

.container {

  width: 100%;
  padding-right: calc(var(--bb-padding-md) * 1.5);
  padding-left: calc(var(--bb-padding-md) * 1.5);
  margin-right: auto;
  margin-left: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-banner {
    text-align: center;
  }
  
  .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .player-profile-header {
    text-align: center;
  }
  
  .tournaments-table thead {
    display: none;
  }
  
  .tournaments-table, 
  .tournaments-table tbody, 
  .tournaments-table tr, 
  .tournaments-table td {
    display: block;
    width: 100%;
  }
  
  .tournaments-table tr {
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
  }
  
  .tournaments-table td {
    position: relative;
    padding-left: 50%;
  }
  
  .tournaments-table td:before {
    position: absolute;
    left: 1rem;
    width: 45%;
    white-space: nowrap;
    font-weight: 600;
  }
  
  .tournaments-table td:nth-of-type(1):before { content: "Tournament"; }
  .tournaments-table td:nth-of-type(2):before { content: "Date"; }
  .tournaments-table td:nth-of-type(3):before { content: "Type"; }
  .tournaments-table td:nth-of-type(4):before { content: "Participants"; }
  .tournaments-table td:nth-of-type(5):before { content: "Actions"; }
  
  .tournament-row-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .tournament-row-details {
    align-items: flex-start;
    margin-top: 0.5rem;
  }
  
  .tournament-table {
    width: 100%;
  }
  
  .tournament-name {
    min-width: 160px;
  }
  
  .tournament-type-badge {
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  .navbar .form-control {
    width: 100%;
  }
  
  .navbar form {
    width: 100%;
  }
  
  .messages-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
  
  .tournament-info-list div {
    margin-bottom: 0.5rem;
  }
  
  .tournament-results {
    display: none; /* Hide results on very small screens to save space */
  }
  
  .simple-tournament-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
}

/* style.css - Complete CSS for De Laurierboom Chess Club */

:root {
  /* Old color palette */
  --primary-color: #3a5caa;
  --primary-dark: #2d4b99;
  --primary-light: #d9e3f8;
  --secondary-color: #2b2b2b;
  --accent-color: #e6b463;
  --light-bg: #f8f9fa;
  --dark-bg: #212529;
  --text-color: #333;
  --text-light: #6c757d;
  --success-color: #4caf50;
  --info-color: #2196f3;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --white-square: #f0d9b5;
  --black-square: #b58863;
  
  /* Typography */
 
  --bb-heading-font: "New Amsterdam", serif;
  --bb-body-font: "Inter", sans-serif;

  /* New brand CSS variables aka design tokens, DONT USE DIRECTLY ON COMPONENTS, use semantic variables instead*/
    /*  Primary */
    --bb-color-primary-50: #F0FAF7;
    --bb-color-primary-100: #DCF5ED;
    --bb-color-primary-200: #ABF5DC;
    --bb-color-primary-300: #6CF5C8;
    --bb-color-primary-400: #1DF5AD;
    --bb-color-primary-500: #00CC88;
    --bb-color-primary-600: #00A36D;
    --bb-color-primary-700: #006B47;
    --bb-color-primary-800: #00422B;
    --bb-color-primary-900: #002E1E;
    --bb-color-primary-950: #001A11;
  
    /*  Yellow */
    --bb-color-yellow-50: #FFDFE5;
    --bb-color-yellow-100: #FFFAE5;
    --bb-color-yellow-200: #FFF0B2;
    --bb-color-yellow-300: #FFE270;
    --bb-color-yellow-400: #FFD633;
    --bb-color-yellow-500: #E5B800;
    --bb-color-yellow-600: #A38300;
    --bb-color-yellow-700: #665200;
    --bb-color-yellow-800: #2E2500;
    --bb-color-yellow-900: #1A1400;
  
    /*  Red */
    --bb-color-red-50: #FFF5F9;
    --bb-color-red-100: #FFE5EF;
    --bb-color-red-200: #FFB2D1;
    --bb-color-red-300: #FF4791;
    --bb-color-red-400: #FF0066;
    --bb-color-red-500: #CC0052;
    --bb-color-red-600: #A30041;
    --bb-color-red-700: #6B002B;
    --bb-color-red-800: #2E0012;
    --bb-color-red-900: #1A000A;
  
    /*  Blue */
    --bb-color-blue-50: #F5F8FF;
    --bb-color-blue-100: #E5ECFF;
    --bb-color-blue-200: #B2C7FF;
    --bb-color-blue-300: #4C7CFF;
    --bb-color-blue-400: #0044FF;
    --bb-color-blue-500: #0036CC;
    --bb-color-blue-600: #002CA3;
    --bb-color-blue-700: #001D6B;
    --bb-color-blue-800: #000C2E;
    --bb-color-blue-900: #00071A;
  
    /*  Purple */
    --bb-color-purple-50: #F9F0FA;
    --bb-color-purple-100: #F4E1F5;
    --bb-color-purple-200: #FBC2FF;
    --bb-color-purple-300: #EE93F5;
    --bb-color-purple-400: #EA58F5;
    --bb-color-purple-500: #BE00CC;
    --bb-color-purple-600: #9800A3;
    --bb-color-purple-700: #64006B;
    --bb-color-purple-800: #2B002E;
    --bb-color-purple-900: #18001A;
  
    /*  Neutral */
    --bb-color-neutral-50: #F5FAF8;
    --bb-color-neutral-100: #DCE0DF;
    --bb-color-neutral-200: #C8CCCB;
    --bb-color-neutral-300: #B4B8B6;
    --bb-color-neutral-400: #A0A3A2;
    --bb-color-neutral-500: #828584;
    --bb-color-neutral-600: #646665;
    --bb-color-neutral-700: #464747;
    --bb-color-neutral-800: #282929;
    --bb-color-neutral-900: #141414;
  
    /* Black and White */
    --bb-color-black: #050505;
    --bb-color-white: #FAFFFD;
  

    /* Semantic variables, design tokens */
    /* Background tokens */
  --bb-color-background-default: var(--bb-color-primary-950);
  --bb-color-surface-default: var(--bb-color-primary-900);

  --bb-color-surface-highlight: var(--bb-color-primary-800);
  --bb-color-surface-dimmed: var(--bb-color-black);
  --bb-color-surface-contrast: var(--bb-color-primary-100);

  --bb-color-surface-hover: var(--bb-color-primary-800);
  --bb-color-surface-pressed: var(--bb-color-primary-700);
  --bb-color-surface-active: var(--bb-color-primary-400);
  --bb-color-surface-disabled: var(--bb-color-neutral-400);

  --bb-color-surface-overlay-lighten: rgba(250, 255, 253, 0.15);
  --bb-color-surface-overlay-darken: rgba(0, 0, 0, 0.15);

  /* Surface tokens for rankings*/
  --bb-color-surface-ranking-1: var(--bb-color-yellow-400);
  --bb-color-surface-ranking-2: var(--bb-color-neutral-300);
  --bb-color-surface-ranking-3: var(--bb-color-yellow-600);


  /* System tokens, notifications and statusses */
  --bb-color-surface-system-critical: var(--bb-color-red-900);
  --bb-color-surface-system-success: var(--bb-color-primary-950);
  --bb-color-surface-system-warning: var(--bb-color-yellow-900);
  --bb-color-surface-system-informative: var(--bb-color-blue-900);
  --bb-color-surface-system-personal: var(--bb-color-purple-900);
  --bb-color-surface-system-neutral: var(--bb-color-neutral-900);

  --bb-color-border-system-critical: var(--bb-color-red-300);
  --bb-color-border-system-success: var(--bb-color-primary-300);
  --bb-color-border-system-warning: var(--bb-color-yellow-300);
  --bb-color-border-system-informative: var(--bb-color-blue-400);
  --bb-color-border-system-personal: var(--bb-color-purple-300);
  --bb-color-border-system-neutral: var(--bb-color-neutral-300);

  --bb-color-text-system-critical: var(--bb-color-red-300);
  --bb-color-text-system-success: var(--bb-color-primary-300);
  --bb-color-text-system-warning: var(--bb-color-yellow-300);
  --bb-color-text-system-informative: var(--bb-color-blue-400);
  --bb-color-text-system-personal: var(--bb-color-purple-300);  
  --bb-color-text-system-neutral: var(--bb-color-neutral-300);
  
  /* Border tokens */
  --bb-color-border-subtle: var(--bb-color-primary-900);
  --bb-color-border-default: var(--bb-color-primary-800);
  --bb-color-border-strong: var(--bb-color-primary-700);
  --bb-color-border-strongest: var(--bb-color-primary-600);
  --bb-color-border-hover: var(--bb-color-primary-700);
  --bb-color-border-pressed: var(--bb-color-primary-600);
  --bb-color-border-highlight: var(--bb-color-primary-400);

  /* Static text color tokens */
  --bb-color-text-default: var(--bb-color-primary-50);
  --bb-color-text-disabled: var(--bb-color-neutral-600);
  --bb-color-text-contrast: var(--bb-color-primary-950);
  --bb-color-text-highlight: var(--bb-color-primary-400);
  --bb-color-text-alternative: var(--bb-color-neutral-500);

  /* Text tokens for rankings*/
  --bb-color-text-ranking-1: var(--bb-color-yellow-900);
  --bb-color-text-ranking-2: var(--bb-color-neutral-900);
  --bb-color-text-ranking-3: var(--bb-color-yellow-900);

  /* Link tokens */
  --bb-color-text-link-default: var(--bb-color-primary-400);
  --bb-color-text-link-hover: var(--bb-color-primary-300);
  --bb-color-text-link-pressed: var(--bb-color-primary-200);

  /* Primary button tokens */
  --bb-color-surface-action-primary-default: var(--bb-color-yellow-400);
  --bb-color-surface-action-primary-hover: var(--bb-color-yellow-500);
  --bb-color-surface-action-primary-pressed: var(--bb-color-yellow-600);

  --bb-color-text-action-primary-default: var(--bb-color-yellow-900);
  --bb-color-text-action-primary-hover: var(--bb-color-yellow-900);
  --bb-color-text-action-primary-pressed: var(--bb-color-yellow-900);

  /* Secondary button tokens */
  --bb-color-surface-action-secondary-default: var(--bb-color-primary-400);
  --bb-color-surface-action-secondary-hover: var(--bb-color-primary-500);
  --bb-color-surface-action-secondary-pressed: var(--bb-color-primary-600);

  --bb-color-text-action-secondary-default: var(--bb-color-primary-950);
  --bb-color-text-action-secondary-hover: var(--bb-color-primary-950);
  --bb-color-text-action-secondary-pressed: var(--bb-color-primary-950);

  /* Tertiary button tokens */
  --bb-color-surface-action-tertiary-default: var(--bb-color-primary-900);
  --bb-color-surface-action-tertiary-hover: var(--bb-color-primary-800);
  --bb-color-surface-action-tertiary-pressed: var(--bb-color-primary-700);

  --bb-color-text-action-tertiary-default: var(--bb-color-primary-400);
  --bb-color-text-action-tertiary-hover: var(--bb-color-primary-400);
  --bb-color-text-action-tertiary-pressed: var(--bb-color-primary-400);

  /* Critical button tokens */
  --bb-color-surface-action-critical-default: var(--bb-color-red-400);
  --bb-color-surface-action-critical-hover: var(--bb-color-red-500);
  --bb-color-surface-action-critical-pressed: var(--bb-color-red-600);

  --bb-color-text-action-critical-default: var(--bb-color-white);
  --bb-color-text-action-critical-hover: var(--bb-color-white);
  --bb-color-text-action-critical-pressed: var(--bb-color-white);
  
  /* Text tokens */
  --bb-text-size-xs: 0.75rem;
  --bb-text-size-sm: 0.875rem;
  --bb-text-size-md: 1rem;
  --bb-text-size-lg: 1.25rem;
  --bb-text-size-xl: 1.5rem;
  --bb-text-size-2xl: 2rem;
  --bb-text-size-3xl: 2.5rem;
  --bb-text-size-4xl: 3rem;
  --bb-text-size-5xl: 3.5rem;
  --bb-text-size-6xl: 4rem;

  /* Text weight tokens */
  --bb-text-weight-regular: 400;
  --bb-text-weight-medium: 500;
  --bb-text-weight-bold: 700;

  /* Text line height tokens */
  --bb-text-line-height-xs: 1;
  --bb-text-line-height-sm: 1.25;
  --bb-text-line-height-md: 1.5;
  --bb-text-line-height-lg: 1.75;
  --bb-text-line-height-xl: 2;
  --bb-text-line-height-2xl: 2.25;

  /* Border radius tokens */
  --bb-border-radius-none: 0px;
  --bb-border-radius-subtlest: 2px;
  --bb-border-radius-subtle: 4px;
  --bb-border-radius-default: 8px;
  --bb-border-radius-strong: 16px;
  --bb-border-radius-strongest: 24px;

  /* Transition tokens */
  --bb-transition-fast: 0.15s ease;
  --bb-transition-normal: 0.3s ease;
  --bb-transition-slow: 0.5s ease;

   /* Shadow tokens */
   --bb-shadow-none: none;
   --bb-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
   --bb-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
   --bb-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);

   /* Padding tokens, use for paddings in elements */
   --bb-padding-xs: 0.25rem;
   --bb-padding-sm: 0.5rem;
   --bb-padding-md: 1rem;
   --bb-padding-lg: 1.5rem;
   --bb-padding-xl: 2rem;
   --bb-padding-2xl: 2.5rem;
   --bb-padding-3xl: 3rem;

   /* Space tokens, use for gaps and margins */
   --bb-space-xs: 0.25rem;
   --bb-space-sm: 0.5rem;
   --bb-space-md: 1rem;
   --bb-space-lg: 1.5rem;
   --bb-space-xl: 2rem;
   --bb-space-2xl: 2.5rem;
   --bb-space-3xl: 3rem;
  }


/* Base styles */
body {
  font-family: var(--bb-body-font);
  color: var(--bb-color-text-default);
  background-color: var(--bb-color-background-default);
  line-height: var(--bb-text-line-height-md);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--bb-heading-font);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
  color: var(--bb-color-text-default);
}
h1, .h1 {
  font-size: var(--bb-text-size-4xl);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}

h2, .h2 {
  font-size: var(--bb-text-size-3xl);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}

h3, .h3 {
  font-size: var(--bb-text-size-2xl);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}

h4, .h4 {
  font-size: var(--bb-text-size-xl);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}

h5, .h5 {
  font-size: var(--bb-text-size-lg);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}

h6, .h6 {
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-xs);
  letter-spacing: 0.04em;
}
.heading-xl {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-4xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.heading-l {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-3xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.heading-m {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-2xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.heading-s {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.heading-xs {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-lg);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.heading-xxs {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

a {
  color: var(--bb-color-text-link-default);
  text-decoration: none;
  transition: var(--bb-transition-normal);
}

a:hover {
  color: var(--bb-color-text-link-hover);
}

/* Bar Blitz Design System Components */
/* Button primary */
.bb-button-primary {
  background: var(--bb-color-surface-action-primary-default);
  color: var(--bb-color-text-action-primary-default);
  font-family: var(--bb-body-font);
  font-weight: var(--bb-text-weight-medium);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-md); 
  padding: var(--bb-padding-sm) var(--bb-padding-md);
  border-radius: var(--bb-border-radius-none);
  transition: var(--bb-transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  gap: var(--bb-space-xs);
  white-space: nowrap;
}

.bb-button-primary:hover {
  background: var(--bb-color-surface-action-primary-hover);
  border-color: var(--bb-color-surface-action-primary-hover);
  color: var(--bb-color-text-action-primary-hover);
  box-shadow: var(--bb-shadow-md);
}

.bb-button-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(238, 147, 245, 0.3);
}

.bb-button-primary:active {
  background: var(--bb-color-surface-action-primary-pressed);
  border-color: var(--bb-color-surface-action-primary-pressed);
  transform: translateY(0);
}

.bb-button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Button tertiary */ 
.bb-button-tertiary {
  background: var(--bb-color-surface-action-tertiary-default);
  border: none;
  color: var(--bb-color-text-action-tertiary-default);
  font-family: var(--bb-body-font);
  font-weight: var(--bb-text-weight-medium);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-md); 
  padding: var(--bb-padding-sm) var(--bb-padding-md);
  border-radius: var(--bb-border-radius-none);
  transition: var(--bb-transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  gap: var(--bb-space-xs);
  white-space: nowrap;
}

.bb-button-tertiary:hover {
  background: var(--bb-color-surface-action-tertiary-hover);
  border-color: var(--bb-color-surface-action-tertiary-hover);
  color: var(--bb-color-text-action-tertiary-hover);
  box-shadow: var(--bb-shadow-md);
}

.bb-button-tertiary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(238, 147, 245, 0.3);
}


.bb-button-tertiary:active {
  background: var(--bb-color-surface-action-tertiary-pressed);
  border-color: var(--bb-color-surface-action-tertiary-pressed);
  transform: translateY(0);
  box-shadow: var(--bb-shadow-sm);
}

.bb-button-tertiary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* Button secondary */
.bb-button-secondary {
  background: var(--bb-color-surface-action-secondary-default);
  border: none;
  color: var(--bb-color-text-action-secondary-default);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-md); 
  padding: var(--bb-padding-sm) var(--bb-padding-md);
  border-radius: var(--bb-border-radius-none);
  transition: var(--bb-transition-normal);
  text-decoration: none;
  font-family: var(--bb-body-font);
  font-weight: var(--bb-text-weight-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
}

.bb-button-secondary:hover {
  background: var(--bb-color-surface-action-secondary-hover);
  border-color: var(--bb-color-surface-action-secondary-hover);
  color: var(--bb-color-text-action-secondary-hover);
}

.bb-button-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(238, 147, 245, 0.3);
}

.bb-button-secondary:active {
  background: var(--bb-color-surface-action-secondary-pressed);
  border-color: var(--bb-color-surface-action-secondary-pressed);
  transform: translateY(0);
  box-shadow: var(--bb-shadow-sm);
}

.bb-button-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Generic icon-only button */
.icon-button {
  width: 48px;
  height: 48px;
}

.bb-button-critical {
  background: var(--bb-color-surface-action-critical-default);
  border: none;
  color: var(--bb-color-text-action-critical-default);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-md); 
  padding: var(--bb-padding-md);
}

.bb-button-critical:hover {
  background: var(--bb-color-surface-action-critical-hover);
  border-color: var(--bb-color-surface-action-critical-hover);
  color: var(--bb-color-text-action-critical-hover);
  box-shadow: var(--bb-shadow-md);
}

.bb-button-critical:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(238, 147, 245, 0.3);
}


.bb-button-critical:active {
  background: var(--bb-color-surface-action-critical-pressed);
  border-color: var(--bb-color-surface-action-critical-pressed);
  transform: translateY(0);
  box-shadow: var(--bb-shadow-sm);
}


.bb-button-critical:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Chess pattern header */
.chess-header {
  position: relative;
  
}



.search-container {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}


.search-container .form-control {
  background-color: var(--bb-color-surface-default);
  border: none;
  color: white;
  border-radius: var(--bb-border-radius-default);
  padding-left: 15px;
  padding-right: 45px;
  transition: var(--bb-transition-normal);
  flex: 1;
  width: 100%;
  min-width: 0;
}

.search-container .form-control:focus {
  background-color: var(--bb-color-surface-default);
  box-shadow: var(--bb-shadow-sm);
}

.search-container .form-control::placeholder {
  color: var(--bb-color-text-default);
}

.search-container .btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: var(--bb-padding-sm);
  color: var(--bb-color-surface-active);
  transition: var(--bb-transition-normal);
}

/* Dropdown styling */
.dropdown-menu {
  border: none;
  box-shadow: var(--bb-shadow-md);
  border-radius: var(--bb-border-radius-default);
  padding: 0.5rem 0;
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
  font-weight: var(--bb-text-weight-medium);
}

.dropdown-item:active {
  background-color: var(--bb-color-surface-active);
}

/* Card styling */
.card {
  border-radius: var(--bb-border-radius-default);
  overflow: hidden;
  transition: var(--bb-transition-normal);
  border: none;
  box-shadow: var(--bb-shadow-sm);
}



.card-header {
  border-bottom: none;
  font-weight: 600;
  background-color: var(--dark-bg);
  color: white;
}


/* Tournament panels and containers */


.tournament-panel-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.standings-table-container {
  width: 100%;
  border-radius: var(--bb-border-radius-default);
  overflow: hidden;
}

/* Tables styling */
.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  border-top: none;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(58, 92, 170, 0.05);
}

/* Tournament tables */
.tournaments-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.tournaments-table th, 
.tournaments-table td {
  padding: 1rem;
  text-align: left;
  vertical-align: middle;
}


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

.tournaments-table tr:hover {
  background-color: var(--bb-color-surface-hover);
}

.tournaments-table tr {
  position: relative;
}

.tournaments-table tr:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.tournaments-table tr:hover:after {
  background-color: var(--bb-color-surface-active);
}

/* Tournament table for specific view */
.tournament-table {
  border-collapse: separate;
  border-spacing: 0;
}

.tournament-table th {
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--bb-color-border-default);
}

.tournament-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
}

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

.tournament-table-row {
  cursor: pointer;
  transition: all 0.2s ease;
}

.tournament-table-row:hover {
  background-color: var(--bb-color-surface-hover);
}


.tournament-table-row .fa-chevron-right {
  transition: all 0.2s ease;
}

/* Rankings tables */
.rankings-table th {
  padding: var(--bb-padding-sm) 0px;

}

.rankings-table th:first-child {
  width: 64px;
}


.rankings-table thead tr {
  border-bottom: 1px solid var(--bb-color-border-default);
}



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

.rankings-table tr {
  transition: all 0.2s ease;
}







/* Standings table */
.standings-table {
  width: 100%;
  margin-bottom: 0;
}


.standings-table tr {
  transition: all 0.2s ease;
  cursor: pointer;
}

.standings-table tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateX(3px);
}

.standings-table td {
  padding: var(--bb-padding-xs);
  vertical-align: middle;
}

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

.standings-table td:first-child {
  position: relative;
}

/* Cross tables */
.tournament-crosstable {
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tournament-crosstable th,
.tournament-crosstable td {
  padding: 0.5rem;
  vertical-align: middle;
}

.tournament-crosstable .table-secondary {
  background-color: #f8f9fa;
}

.tournament-crosstable tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.tournament-crosstable .badge {
  min-width: 24px;
}

/* Rank styling */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: var(--bb-text-size-md);
  font-weight: 600;
}

/* Mobile: smaller badge */
@media (max-width: 767.98px) {
  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: var(--bb-text-size-sm);
  }
}

.rank-1 {
  background-color: var(--bb-color-surface-ranking-1);
  color: var(--bb-color-text-ranking-1);
}

.rank-2 {
  background-color: var(--bb-color-surface-ranking-2);
  color: var(--bb-color-text-ranking-2);
}

.rank-3 {
  background-color: var(--bb-color-surface-ranking-3);
  color: var(--bb-color-text-ranking-3);
}

.rank-other {
  background-color: var(--bb-color-surface-highlight);
  color: var(--bb-color-text-default);
  border: 1px solid var(--bb-color-border-strong);
}

/* Past tournament winners section */
.tournament-winners-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--bb-space-xs);
  min-width: 150px;
}

.tournament-winner-item {
  display: flex;
  align-items: center;
  gap: var(--bb-padding-sm);
}

/* Desktop: name first, badge second (default order) */
.winner-name {
  order: 1;
  font-weight: 600;
  color: var(--bb-color-text-default);
  white-space: nowrap;
}

.tournament-winner-item .rank-badge {
  order: 2;
}

.rank-tied {
  background-color: #87CEEB !important;
  color: #333333 !important;
}

.rank-position {
  position: relative;
  display: flex;
  align-items: center;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  font-weight: 700;
  color: #000;
}



/* Rank change indicators */
.rank-change {
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
}

.rank-up {
  color: #4caf50;
}

.rank-down {
  color: #f44336;
}

.rank-change-up {
  color: #4caf50 !important;
  margin-left: 8px;
}

.rank-change-down {
  color: #f44336 !important;
  margin-left: 8px;
}

/* Rating badges */
.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 0.35em 0.65em;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #19e893;
  color: #000000;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rating-badge.laurier {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.rating-badge.fide {
  background-color: #f0f0f0;
  color: #333;
}

/* Consolidated player-rating class - combines all previous definitions */
.player-rating {
  text-align: center;
  color: var(--bb-color-text-highlight);
  font-weight: 600;
}

/* Tournament rows and cards */
.tournament-row {
  display: flex;
  padding: var(--bb-padding-md);
  border-bottom: 1px solid var(--bb-color-border-default);
  transition: var(--bb-transition-normal);
  cursor: pointer;
  align-items: center;
  position: relative;
}

.tournament-row:last-child {
  border-bottom: none;
}

.tournament-row:hover {
  background-color: var(--bb-color-surface-hover);
}

.tournament-row.live {
  border-left: 4px solid var(--bb-color-border-system-critical);
}

.tournament-row.live:hover {
  background-color: var(--bb-color-surface-hover);
}

/* Mobile responsive styles for tournament-row */
@media (max-width: 767.98px) {
  .tournament-row {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--bb-padding-md);
    gap: var(--bb-space-md);
  }

  .tournament-status-block {
    align-self: flex-start;
    margin-left: 0;
    margin-top: var(--bb-padding-sm);
  }
}

@media (max-width: 480px) {
  .tournament-row {
    padding: var(--bb-padding-md);
  }
}

/* Tournament date block */
.tournament-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  text-align: center;
  margin-right: var(--bb-padding-lg);
  background: var(--bb-color-surface-contrast);
  padding: var(--bb-padding-sm) var(--bb-padding-md);
  border-radius: 0px;
  color: var(--bb-color-text-contrast);
}

.tournament-date-day {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-2xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.tournament-date-month {
  text-transform: uppercase;
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-lg);
  line-height: var(--bb-text-line-height-xs);

  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

.tournament-date-year {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-md);
  line-height: var(--bb-text-line-height-xs);

  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
}

/* Mobile responsive styles for tournament-date-block */
@media (max-width: 767.98px) {
  .tournament-date-block {
    flex-direction: row;
    align-items: center;
    gap: var(--bb-padding-xs);
    min-width: auto;
    padding: var(--bb-padding-sm) ;
    margin-right: 0;
    align-self: flex-start;
  }


  .tournament-date-month {
    margin-top: 0;
  }

  .tournament-date-year {
    display: none;
  }
}

/* Tournament info block and related elements */
.tournament-info-block {
  flex: 1;
}

/* Tournament title - unified styles */
.tournament-title,
.tournament-title-text {
  font-family: var(--bb-heading-font);
  font-size: var(--bb-text-size-xl);
  line-height: var(--bb-text-line-height-xs);
  font-weight: var(--bb-text-weight-regular);
  letter-spacing: 0.04em;
  margin-bottom: var(--bb-space-sm);
}

/* Context-specific overrides */
.tournament-item .tournament-title {
  margin: 0;
}

/* For tournament detail page headers */
.heading-xl.tournament-title {
  display: flex;
  align-items: center;
  margin-top: var(--bb-padding-xl);
  margin-bottom: var(--bb-padding-md);
}

.tournament-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bb-padding-lg);
  color: var(--bb-color-text-default);
}

.tournament-details i {
  margin-right: var(--bb-padding-sm);
  color: var(--bb-color-text-highlight);
}

.tournament-status-block {
  margin-left: var(--bb-padding-md);
  white-space: nowrap;
}

.tournament-status {
  display: inline-block;
  font-weight: 600;
  font-size: var(--bb-text-size-sm);
  padding: var(--bb-padding-sm) var(--bb-padding-sm);
  border-radius: var(--bb-border-radius-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tournament-status.live {
  background: var(--bb-color-surface-system-critical);
  color: var(--bb-color-text-system-critical);
  border: 1px solid var(--bb-color-border-system-critical);
}

.tournament-status.full {
  background: var(--bb-color-surface-system-neutral);
  color: var(--bb-color-text-system-neutral);
  border: 1px solid var(--bb-color-border-system-neutral);
}

.tournament-status.spots {
  background: var(--bb-color-surface-system-success);
  color: var(--bb-color-text-system-success);
  border: 1px solid var(--bb-color-border-system-success);
}

.tournament-status.waitlist {
  background: var(--bb-color-surface-system-warning);
  color: var(--bb-color-text-system-warning);
  border: 1px solid var(--bb-color-border-system-warning);
}

.tournament-status.registered {
  background: var(--bb-color-surface-system-personal);
  color: var(--bb-color-text-system-personal);
  border: 1px solid var(--bb-color-border-system-personal);
}

.tournament-status.locked {
  background: var(--bb-color-surface-system-neutral);
  color: var(--bb-color-text-system-neutral);
  border: 1px solid var(--bb-color-border-system-neutral);
}

/* Mobile responsive styles for tournament info elements */
@media (max-width: 767.98px) {
  .tournament-info-block {
    min-width: 0;
    width: 100%;
    margin-bottom: var(--bb-padding-sm);
  }

  .tournament-title,
  .tournament-title-text {
    margin-bottom: var(--bb-space-sm);
  }

  .tournament-details {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--bb-space-xs);
  }

  .tournament-status-block {
    margin-left: 0;
    margin-top: 0;
    width: auto;
    text-align: left;
  }

  .tournament-status {
    padding: var(--bb-padding-xs) var(--bb-padding-sm);
  }
}




/* Tab content visibility */
.tab-content {
  display: none;
}

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

/* Tournament tabs */
.tournament-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: var(--bb-padding-xl);
  background: var(--bb-color-surface-default);
  border: 1px solid var(--bb-color-border-default);
  border-radius: var(--bb-border-radius-default);
  padding: var(--bb-padding-xs);
  gap: var(--bb-padding-xs);
}

.tournament-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: var(--bb-padding-sm) var(--bb-padding-lg);
  border-radius: var(--bb-border-radius-subtle);
  font-weight: 600;
  color: var(--bb-color-text-secondary);
  cursor: pointer;
  transition: var(--bb-transition-normal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--bb-padding-sm);
}

.tournament-tab.active {
  background: var(--bb-color-surface-active);
  border-color: var(--bb-color-border-active);
  color: var(--bb-color-text-contrast);
}

.tournament-tab:hover:not(.active) {
  background: var(--bb-color-surface-hover);
  color: var(--bb-color-text-default);
  border-color: var(--bb-color-border-hover);
}

/* Past tournament styles */
.past-tournament {
  display: flex;
  align-items: center;
  padding: var(--bb-padding-md) var(--bb-padding-lg);
  border-bottom: 1px solid var(--bb-color-border-default);
  cursor: pointer;
  transition: var(--bb-transition-normal);
  background: var(--bb-color-surface-default);
}

.past-tournament:last-child {
  border-bottom: none;
}

.past-tournament:hover {
  background: var(--bb-color-surface-hover);
}


.past-tournament .tournament-info-block {
  flex: 1;
  min-width: 0;
}


/* Mobile responsive for tabs */
@media (max-width: 767.98px) {
  .tournament-tabs {
    flex-direction: column;
    gap: var(--bb-padding-xs);
  }

  .tournament-tab {
    margin: 0;
    justify-content: center;
  }
}

/* Mobile responsive for past tournaments */
@media (max-width: 767.98px) {
  .past-tournament {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--bb-padding-md);
  }

  .past-tournament .tournament-date-block {
    flex-direction: row;
    align-items: center;
    gap: var(--bb-padding-xs);
    min-width: auto;
    padding: var(--bb-padding-sm);
    margin-right: 0;
    margin-bottom: 0;
    align-self: flex-start;
  }



  .past-tournament .tournament-date-year {
    display: none;
  }

  .past-tournament .tournament-info-block {
    width: 100%;
    margin-bottom: var(--bb-padding-sm);
  }

  .past-tournament .tournament-winners-section {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  /* Mobile: badge first, name second */
  .tournament-winner-item .rank-badge {
    order: 1;
  }

  .tournament-winner-item .winner-name {
    order: 2;
  }
}

.tournament-row-main {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tournament-row-content {
  flex: 1;
  min-width: 0;
}

.tournament-row-title {
  margin-bottom: 0.5rem;
  color: var(--bb-color-text-default);
}

.tournament-row-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.25rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.tournament-row-description {
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

.tournament-row-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.tournament-row::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  z-index: 1;
}

.tournament-row * {
  position: relative;
  z-index: 2;
}

.tournament-row-arrow {
  color: #ccc;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}






/* Tournament info display */
.tournament-info-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tournament-info-cell .tournament-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.tournament-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tournament-desc {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 400px;
}

.tournament-action {
  text-align: right;
}

.tournament-name {
  width: 25%;
  min-width: 200px;
}

.tournament-name strong {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--secondary-color);
}

.tournament-info {
  color: var(--text-light);
  font-size: 0.875rem;
}

.tournament-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Tournament type badges */
.tournament-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.7em;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.tournament-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.tournament-type.swiss,
.type-swiss,
.swiss {
  background-color: #d6e4ff;
  color: #0040a0;
}

.tournament-type.round-robin,
.type-round-robin,
.round-robin {
  background-color: #fff3cd;
  color: #664d03;
}

.tournament-type.double-round-robin,
.type-double-round-robin,
.double-round-robin {
  background-color: #d1e7dd;
  color: #0f5132;
}

.type-tbd,
.tbd {
  background-color: #e9ecef;
  color: #495057;
}

.tournament-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.tournament-badge.none {
  background-color: #e9ecef;
  color: #495057;
}

.tournament-badge.round-robin {
  background-color: #fff3cd;
  color: #856404;
}

.tournament-badge.double-round-robin {
  background-color: #d1e7dd;
  color: #0f5132;
}

.tournament-badge.swiss {
  background-color: #cfe2ff;
  color: #084298;
}

/* Tournament type pills */
.tournament-type-pills {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tournament-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.75em;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tournament-type-pill.swiss {
  background-color: #d6e4ff;
  color: #0040a0;
}

.tournament-type-pill.round-robin {
  background-color: #fff3cd;
  color: #664d03;
}

.tournament-type-pill.double-round-robin {
  background-color: #d1e7dd;
  color: #0f5132;
}

.tournament-type-pill.tbd {
  background-color: #e9ecef;
  color: #495057;
}

/* Time control badges */
.time-bullet {
  background-color: #ffecb3;
  color: #856404;
}

.time-blitz {
  background-color: #d0f0fd;
  color: #055160;
}

.time-rapid {
  background-color: #d8f3dc;
  color: #155724;
}

.time-classical {
  background-color: #e6ccff;
  color: #5a009c;
}

/* Participants display */
.tournament-participants {
  color: var(--text-light);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.player-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
  background-color: #f8f9fa;
  border-radius: 30px;
  font-weight: 500;
}

/* Winner and results display */
.tournament-winners {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-top: 0.25rem;
  text-align: right;
}

.winner-pill, .runner-up-pill {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.winner-pill {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.winner-pill i, .runner-up-pill i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.runner-up-pill {
  font-weight: 500;
  opacity: 0.9;
  color: var(--text-light);
}

.winner-badge {
  display: inline-flex;
  align-items: center;
  background-color: #FFF9E6;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.875rem;
  border: 1px solid #FFE8A3;
}






.winner-badge, .runner-up-badge {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.2rem 0;
}

.winner-badge {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.runner-up-badge {
  font-weight: 500;
  opacity: 0.8;
}

.winner, .runner-up {
  white-space: nowrap;
  font-size: 0.9rem;
}

.winner {
  margin-bottom: 0.25rem;
}

.tournament-results {
  display: flex;
  flex-direction: column;
  margin-right: 1.5rem;
}

.winner-name, .runner-up-name {
  display: flex;
  align-items: center;
  white-space: nowrap;
}



.runner-up-name {
  font-size: 0.85rem;
  opacity: 0.9;
}


/* ===== PLAYER NAME STYLING - CONSOLIDATED ===== */
.player-name {
  color: var(--bb-color-text-default);
  text-decoration: none;
  transition: color 0.2s;
}

.player-name:hover {
  color: var(--bb-color-text-link-hover)!important;
}



.player-details .player-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}



/* Mobile responsive player name styles */
@media (max-width: 767.98px) {
  .player-details .player-name {
    font-size: 0.85rem;
  }
  
  .medal-container .player-name {
    font-size: 1rem;
  }
  
  .standings-table .player-name,
  .registration-view .standings-table .player-name, 
  .registration-view .participant-name {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
  }
}

@media (max-width: 480px) {
  .player-details .player-name {
    font-size: 0.8rem;
  }
  
  .medal-container .player-name {
    font-size: 0.9rem;
  }
  
  .standings-table .player-name,
  .registration-view .standings-table .player-name,
  .registration-view .participant-name {
    font-size: 0.9rem !important;
  }
}



.player-score {
  font-weight: 600;
  text-align: right;
}

/* Match styling */
.vs-badge {
  background-color: #f8f9fa;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.player-white, .player-black {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.player-white {
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid #dee2e6;
}

.player-black {
  background-color: rgba(240, 240, 240, 0.5);
  border: 1px solid #dee2e6;
}

.result-select {
  max-width: 140px;
  display: inline-block;
}

.save-status {
  min-width: 60px;
  display: inline-block;
  text-align: center;
}

.match-result {
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.result-win {
  background-color: #d4edda;
  color: #155724;
}

.result-loss {
  background-color: #f8d7da;
  color: #721c24;
}

.result-draw {
  background-color: #fff3cd;
  color: #856404;
}

.result-pending {
  background-color: #e2e3e5;
  color: #383d41;
}

.match-result-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Pairings styling */
.pairings-board {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  width: 10%;
  color: #000000;
}

.pairings-player {
  font-size: 1.5rem;
  font-weight: bold;
  width: 35%;
  color: #000000;
}

.pairings-result {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  width: 20%;
  color: #000000;
}

/* Scoped pairings classes */
.pairings .elo {
  font-weight: bold;
}
.pairings .white_player {background-color: var(--bb-color-surface-overlay-lighten);}
.pairings .black_player {background-color: var(--bb-color-surface-overlay-darken);}
.pairings .white-board {background-color: var(--bb-color-white);color: var(--bb-color-black);}
.pairings .black-board {background-color: var(--bb-color-black);color: var(--bb-color-white);}


/* Tournament pairings table - consolidated styling */
.tournament-table.pairings {
  width: 100%;
  font-size: var(--bb-text-size-md);
}

.tournament-table.pairings th,
.tournament-table.pairings td {
  padding: var(--bb-padding-sm);
}

.tournament-table.pairings .board,
.tournament-table.pairings .score,
.tournament-table.pairings .pairing {
  text-align: center;
}

/* Tournament box styles */
      .next-tournament-box {
          background-color: var(--primary-light);
          border-radius: 12px;
          text-align: center;
          padding: var(--bb-padding-lg);
          box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
          transition: all 0.3s ease;
          color: var(--secondary-color);
          cursor: pointer;
      }

.next-tournament-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.remove-player-btn {
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 4px;
  background-color: transparent;
  border: 1px solid #dc3545;
  color: #dc3545;
  transition: all 0.2s ease;
}

.remove-player-btn:hover {
  background-color: #dc3545;
  color: white;
}

.remove-player-btn i {
  font-size: 0.875rem;
}

/* Attendance checkbox styling */
.attendance-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  margin: 0;
}

.form-check {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.form-check-label { 
    color:var(--bb-color-text-default);
}

/* Ensure the checkbox column doesn't affect row hover */
#participants-table-registration tr:hover .form-check {
  position: relative;
  z-index: 2;
}

/* Make sure the remove button stays on top of the row hover effect */
#participants-table-registration tr:hover .remove-player-btn {
  position: relative;
  z-index: 2;
}

/* Waiting list table styling - same as participants table */
#waiting-list-table tr:hover .form-check {
  position: relative;
  z-index: 2;
}

/* Waiting list checkbox styling - same as attendance checkbox */
.waiting-list-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  margin: 0;
}

/* Responsive fix for Performance by Color stats-table on mobile */
@media (max-width: 600px) {
  .stats-table {
    width: 100% !important;
    font-size: 0.95rem;
    table-layout: fixed;
    border-collapse: collapse;
  }
  .stats-table th, .stats-table td {
    padding: 0.4rem 0.2rem !important;
    word-break: break-word;
    text-align: center;
  }
  .stats-table thead {
    display: none;
  }
  .stats-table tr {
    display: block;
    margin-bottom: 0.7rem;
    border-bottom: 2px solid #e9ecef;
  }
  .stats-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: none;
    position: relative;
    padding-left: 40%;
    min-height: 32px;
  }
  .stats-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0.5rem;
    top: 0;
    width: 38%;
    font-weight: 600;
    color: #888;
    text-align: left;
    white-space: nowrap;
    font-size: 0.92em;
  }
}

.standings-table td, .participants-table td, .crosstable .rating-cell, .standings-table .participant-rating, .standings-table .player-rating, .standings-table .rating-badge, .participants-table .rating-badge {
  white-space: nowrap !important;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 90px;
}

.standings-table td:nth-child(4),
.participants-table td.rating-cell,
.crosstable .rating-cell {
  min-width: 75px;
  max-width: 110px;
  text-align: right;
}

.standings-table .participant-name, .participants-table .player-cell, .crosstable .player-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .standings-table .participant-name, .participants-table .player-cell, .crosstable .player-cell {
    max-width: 110px;
  }
  .standings-table td, .participants-table td, .crosstable .rating-cell {
    max-width: 60px;
  }
}


    /* ===== TABLE STYLES (from home.html) ===== */
    /*.table-container {
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--bb-border-radius-default);
        overflow: hidden;
        border: 1px solid var(--bb-color-border-default);
        backdrop-filter: blur(5px);
    }
    .rankings-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }
    .rankings-table thead th {
        border-bottom: 1px solid var(--bb-color-border-default);
        letter-spacing: 0.05em;
    }
    .rankings-table tbody td {
        padding: 1rem 1.5rem;
        vertical-align: middle;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
        font-size: 1rem;
        transition: background-color 0.2s ease-in-out;
    }
    .rankings-table tbody tr:last-child td {
        border-bottom: none;
    }
    .rankings-table tbody tr {
        cursor: pointer;
    }
    .rankings-table tbody tr:hover td {
        background-color: rgba(255, 255, 255, 0.08);
    }
    .rank-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.9rem;
        background: linear-gradient(145deg, var(--green-accent), var(--green-highlight));
        color: var(--text-primary);
        box-shadow: var(--shadow-light);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    .rank-1 { background: linear-gradient(145deg, #ffd700, #ffed4e); color: var(--text-dark); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    .rank-2 { background: linear-gradient(145deg, #c0c0c0, #e0e0e0); color: var(--text-dark); }
    .rank-3 { background: linear-gradient(145deg, #cd7f32, #daa520); color: var(--text-primary); }
*/

    /* ===== TOURNAMENT DETAIL PAGE - MODERN DARK GREEN THEME ===== */
    
    /* Base page styles */
    .page-container {
        padding-top: calc(var(--bb-padding-md) * 1);
        padding-bottom: calc(var(--bb-padding-md) * 1);
        margin: 0 auto;
    }

    /* Tournament header */
    /* merged into global .tournament-title above */

    .live-indicator {
        display: inline-flex;
        align-items: center;
        font-size: 1.1rem; 
        color: var(--text-primary);
        margin-left: 0.75rem;
        vertical-align: middle;
        font-weight: 500;
    }
    .live-indicator::before {
        content: '';
        display: inline-block;
        width: 10px; 
        height: 10px;
        background-color: var(--danger-color);
        border-radius: 50%;
        margin-right: 0.5rem;
        animation: pulse 2s infinite;
    }

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

    .tournament-location { 
        font-size: 1.1rem; 
        margin-bottom: 2rem; 
        color: var(--text-secondary);
        font-weight: 400;
    }

    .tournament-location a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: color 0.2s ease-in-out;
        display: inline-flex;
        align-items: center;
    }

    .tournament-location a:hover {
        color: var(--green-glow);
        text-decoration: none;
    }

    .tournament-location a i {
        transition: transform 0.2s ease-in-out;
    }

    .tournament-location a:hover i {
        transform: scale(1.1);
    }

    /* Tournament panels */
          .tournament-panel {
          background: var(--bb-color-surface-default);
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-lg);
          margin-bottom: var(--bb-space-md);
          box-shadow: var(--bb-shadow-md);
          border: 1px solid var(--bb-color-border-default);
          position: relative;
          overflow: hidden;
      }

    .tournament-panel::before {
        content: none;
    }

    .tournament-panel-title {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    /* ================================================= */
    /* ===== NEW ADMIN PANEL STYLES (REGISTRATION) ===== */
    /* ================================================= */

    .admin-panel-container {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
          .admin-panel-container .waiting-list-lock-section {
          background: var(--bb-color-surface-default);
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-lg);
          border: 1px solid var(--bb-color-border-default);
          margin: 0;
      }
    
    .admin-panel-container .lock-status-locked span,
    .admin-panel-container .lock-status-unlocked span {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .admin-panel-container .lock-status-description {
        font-size: 0.95rem;
        margin-top: 0.25rem;
        margin-bottom: 1rem;
        padding-left: 0;
    }
    
    .admin-panel-container .btn-toggle-lock {
        width: 100%;
        background: var(--danger-color);
        border: none;
        box-shadow: none;
    }

    .admin-panel-container .btn-toggle-lock.btn-unlock-list {
        background: var(--success-color);
    }
    
    .admin-panel-container .btn-toggle-lock:hover {
        filter: brightness(1.1);
        transform: none;
        box-shadow: none;
    }

    .admin-panel-container .lock-help-text {
        text-align: left;
        margin-top: 1rem;
        font-size: 0.9rem;
    }

    .admin-info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

          .admin-info-grid .info-item,
      .admin-panel-container .description-container {
          background: var(--bb-color-surface-default);
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-md) var(--bb-padding-lg);
          margin: 0;
          border: 1px solid var(--bb-color-border-default);
      }
    
    .admin-info-grid .info-item.full-span {
        grid-column: 1 / -1;
    }
    
          .admin-panel-container .description-container {
          padding: var(--bb-padding-lg);
      }

    .admin-info-grid .info-label,
    .admin-panel-container .description-container .info-label { /* Re-use for consistency */
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--bb-color-text-default);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }

    .admin-info-grid .info-value,
    .admin-panel-container .description-container .info-value {
        color: var(--bb-color-text-default);
    }

    /* Location links in info items */
    .info-value a {
        color: var(--bb-color-text-link-default);
        transition: color 0.2s ease-in-out;
        display: inline-flex;
        align-items: center;
    }

    .info-value a:hover {
        color: var(--bb-color-text-link-hover);
    }

    .info-value a i {
        transition: transform 0.2s ease-in-out;
    }

 
    
    .admin-button-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

          .admin-button-grid .btn-admin {
          display: flex;
          align-items: center;
          justify-content: center;
          border: none;
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-sm) var(--bb-padding-lg);
          font-weight: 600;
          text-decoration: none;
          font-size: 1rem;
          transition: var(--transition);
          box-shadow: var(--shadow-light);
      }
    
    .admin-button-grid .btn-admin:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
        text-decoration: none;
    }
    
    .admin-button-grid .btn-admin .btn-icon {
        margin-right: 0.6rem;
    }

    .admin-button-grid .btn-add-player,
    .admin-button-grid .btn-edit {
        background: #ffffff;
        color: var(--text-dark);
    }
     .admin-button-grid .btn-add-player:hover,
    .admin-button-grid .btn-edit:hover {
        background: #f8f9fa;
        color: var(--text-dark);
    }
    
    .admin-button-grid .btn-start {
        background: #ff9800;
        color: var(--text-dark);
    }
    .admin-button-grid .btn-start:hover {
        background: #e68900;
        color: var(--text-dark);
    }
    
    .admin-button-grid .btn-delete {
        background: #f44336;
        color: var(--text-primary);
    }
    .admin-button-grid .btn-delete:hover {
        background: #d32f2f;
        color: var(--text-primary);
    }
    
    /* --- End New Admin Panel Styles --- */

    /* ================================================= */
    /* ===== CROSSTABLE STYLES (COMPLETED PHASE) ===== */
    /* ================================================= */

    .crosstable-container {
        width: 100%;
        overflow-x: auto;
        background: #ffffff;
        border-radius: var(--bb-border-radius-default);
        box-shadow: var(--shadow-light);
        border: 1px solid rgba(0,0,0,0.1);
    }

    .crosstable-wrapper {
        min-width: 100%;
        padding: 0;
    }

    .crosstable {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        font-size: 0.9rem;
    }

          .crosstable th {
          background: #e9f7ef;
          color: var(--text-dark);
          font-weight: 700;
          padding: var(--bb-padding-md) var(--bb-padding-sm);
          text-align: center;
          border-bottom: 2px solid #dee2e6;
          white-space: nowrap;
          position: sticky;
          top: 0;
          z-index: 10;
      }

    .crosstable .player-header {
        text-align: left;
        min-width: 200px;
    }

    .crosstable .rating-header {
        min-width: 80px;
    }

    .crosstable .score-header {
        min-width: 60px;
        background: #f8f9fa;
        border-left: 2px solid #dee2e6;
    }

    .crosstable .round-header {
        min-width: 50px;
        font-size: 0.85rem;
        background: #f8f9fa;
    }

          .crosstable td {
          padding: var(--bb-padding-sm) var(--bb-padding-sm);
          text-align: center;
          border-bottom: 1px solid #dee2e6;
          vertical-align: middle;
      }

          .crosstable .player-cell {
          text-align: left;
          padding-left: var(--bb-padding-md);
          padding-right: var(--bb-padding-md);
      }

    .crosstable .rating-cell {
        font-weight: 600;
        color: var(--text-dark);
    }

    .crosstable .score-cell {
        background: #f8f9fa;
        border-left: 2px solid #dee2e6;
        font-weight: 700;
        color: var(--text-dark);
    }

    .crosstable .round-cell {
        background: #f8f9fa;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .crosstable tr:hover {
        background-color: #f8f9fa;
    }

    .crosstable tr:hover .round-cell {
        background-color: #e9ecef;
    }

    .crosstable tr:hover .score-cell {
        background-color: #e9ecef;
    }

    /* Player info styling */
    .player-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .player-rank {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 28px;
        height: 28px;
        background: var(--green-accent);
        color: var(--text-primary);
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.85rem;
        box-shadow: var(--shadow-light);
    }

    .player-details {
        flex: 1;
    }


    .final-score {
        font-weight: 700;
        color: var(--text-dark);
        font-size: 1rem;
    }

    /* Result indicators */
    .result-win {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px; /* allow two characters like 1W */
        padding: 0 2px;
        height: 24px;
        background: #28a745;
        color: white;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: var(--shadow-light);
    }

    .result-loss {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        padding: 0 2px;
        height: 24px;
        background: #dc3545;
        color: white;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: var(--shadow-light);
    }

    .result-draw {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 28px; /* ½W is slightly wider */
        padding: 0 2px;
        height: 24px;
        background: #6c757d;
        color: white;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: var(--shadow-light);
    }

    .result-bye {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        padding: 0 2px;
        height: 24px;
        background: #17a2b8;
        color: white;
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: var(--shadow-light);
    }

    .result-pending {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        padding: 0 2px;
        height: 24px;
        background: #ffc107;
        color: var(--text-dark);
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        box-shadow: var(--shadow-light);
    }

    .result-empty {
        color: #6c757d;
        font-weight: 400;
    }

    /* Winners row and medal styling */
    .winners-row {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 1.5rem;
        margin-bottom: 2rem;
        flex-wrap: wrap;
    }

          .medal-container {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
          padding: var(--bb-padding-lg);
          border-radius: var(--bb-border-radius-default);
          background: var(--dark-green-accent);
          border: 1px solid rgba(255, 255, 255, 0.1);
          min-width: 140px;
          transition: var(--transition);
      }

    .medal-container:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-medium);
    }

    .medal-container.first-place {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
        border-color: rgba(255, 215, 0, 0.3);
        order: 2;
    }

    .medal-container.second-place {
        background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(160, 160, 160, 0.2));
        border-color: rgba(192, 192, 192, 0.3);
        order: 1;
    }

    .medal-container.third-place {
        background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(184, 134, 11, 0.2));
        border-color: rgba(205, 127, 50, 0.3);
        order: 3;
    }

    .trophy-icon, .medal-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
        color: var(--text-primary);
    }

    .medal-container.first-place .trophy-icon {
        color: #FFD700;
    }

    .medal-container.second-place .medal-icon {
        color: #C0C0C0;
    }

    .medal-container.third-place .medal-icon {
        color: #CD7F32;
    }


    .player-performance {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.9rem;
    }

    .player-performance .points {
        font-weight: 700;
        color: var(--text-primary);
    }

    .player-performance .performance {
        color: var(--text-secondary);
        font-size: 0.85rem;
    }

    /* Tournament info grid for completed phase */
    .tournament-info-grid-custom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .info-item-custom {
        border-radius: var(--bb-border-radius-md);
        padding: var(--bb-padding-md);
        border: 1px solid var(--bb-color-border-default);
        transition: var(--bb-transition-normal);
    }

    .info-item-custom:hover {
        background: var(--bb-color-surface-system-success-hover);
        transform: translateY(-2px);
        box-shadow: var(--bb-shadow-sm);
    }

    .info-item-custom .info-label {
        font-size: var(--bb-text-size-sm);
        color: var(--bb-color-text-secondary);
        text-transform: uppercase;
        margin-bottom: var(--bb-space-sm);
    }

    .info-item-custom .info-value {
        font-weight: 600;
    }

    /* Mobile responsive for crosstable */
    @media (max-width: 767.98px) {
        .crosstable-container {
            font-size: 0.8rem;
        }
        
        .crosstable th {
            padding: 0.75rem 0.5rem;
            font-size: 0.8rem;
        }
        
        .crosstable td {
            padding: 0.5rem 0.25rem;
        }
        
        .crosstable .player-header {
            min-width: 150px;
        }
        
        .crosstable .rating-header {
            min-width: 60px;
        }
        
        .crosstable .score-header {
            min-width: 50px;
        }
        
        .crosstable .round-header {
            min-width: 40px;
            font-size: 0.75rem;
        }
        
        .player-rank {
            min-width: 24px;
            height: 24px;
            font-size: 0.75rem;
        }
        
        
        .result-win, .result-loss, .result-draw, .result-bye, .result-pending {
            width: 20px;
            height: 20px;
            font-size: 0.7rem;
        }

        .winners-row {
            gap: 1rem;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
        }

        .medal-container {
            min-width: 120px;
            padding: 1rem;
        }

        .trophy-icon, .medal-icon {
            font-size: 2rem;
        }


        .tournament-info-grid-custom {
            grid-template-columns: 1fr;
            gap: 0.75rem;
        }
    }

    @media (max-width: 480px) {
        .crosstable-container {
            font-size: 0.75rem;
        }
        
        .crosstable th {
            padding: 0.5rem 0.25rem;
            font-size: 0.75rem;
        }
        
        .crosstable td {
            padding: 0.4rem 0.2rem;
        }
        
        .crosstable .player-header {
            min-width: 120px;
        }
        
        .crosstable .rating-header {
            min-width: 50px;
        }
        
        .crosstable .score-header {
            min-width: 40px;
        }
        
        .crosstable .round-header {
            min-width: 35px;
            font-size: 0.7rem;
        }
        
        .player-rank {
            min-width: 20px;
            height: 20px;
            font-size: 0.7rem;
        }
        
        
        .result-win, .result-loss, .result-draw, .result-bye, .result-pending {
            width: 18px;
            height: 18px;
            font-size: 0.65rem;
        }

        .medal-container {
            min-width: 100px;
            padding: 0.75rem;
        }

        .trophy-icon, .medal-icon {
            font-size: 1.75rem;
        }


        .player-performance {
            font-size: 0.8rem;
        }
    }

    /* Info containers */
    .info-container { 
        width: 100%;
        background: transparent;
        border-radius: var(--bb-border-radius-default);
        box-shadow: none;
        border: none;
    }
    .registration-view .info-container {
        background: transparent;
        padding: 0;
        border: none;
        box-shadow: none;
        display: grid;
        gap: var(--bb-space-md);  
    }

          .info-item { 
          margin-bottom: var(--bb-space-lg); 
          padding: var(--bb-padding-md);
          border-radius: var(--bb-border-radius-subtle);
          background: var(--bb-color-surface-default);
          transition: var(--bb-transition-normal);
          border: 1px solid var(--bb-color-border-default);
      }
          .registration-view .info-item {
          padding: var(--bb-padding-md);
      }
    .registration-view .info-item:last-child {
        margin-bottom: 0;
    }

    .info-item:hover {
       border-color: var(--bb-color-border-hover);
    }

    .info-label { 
        font-size: 0.85rem; 
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }

  

    /* Description container */
          .description-container {
          width: 100%;
          background: var(--bb-color-surface-default); 
          border-radius: var(--bb-border-radius-default);      
          padding: var(--bb-padding-lg);
          margin: 1.5rem 0;
          color: var(--bb-color-text-default);
          box-shadow: none;
          border: 1px solid var(--bb-color-border-default);
      }

    .description-text { 
        font-size: 1rem; 
        color: var(--text-secondary);
        line-height: 1.6;
        margin: 0;
    }

    /* Tables */
    .tournament-table {
        width: 100%;
        background: none;
        border-radius: var(--bb-border-radius-default);
        overflow: hidden;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid var(--bb-color-border-default);
    }



    .tournament-table tr { 
        height: auto; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: var(--transition);
    }

    .tournament-table tr:hover {
        background-color: var(--bb-color-surface-hover);
    }

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

          .tournament-table td, .tournament-table th {
          padding: var(--bb-padding-sm) var(--bb-padding-sm);
          vertical-align: middle;
      }

    .tournament-table thead th { 
        background: none;
        border-bottom: 1px solid var(--bb-color-border-default);
    }

    /* Standings table */
    .standings-table-container {
        width: 100%;
        border-radius: var(--bb-border-radius-default);
        overflow: hidden;
        box-shadow: var(--shadow-light);
        border: 1px solid var(--bb-color-border-default);
    }
    .standings-table-container.two-columns {
        display: flex;
        gap: var(--bb-space-md);
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }
    .standings-table-container.two-columns > div {
        flex: 1;
        border-radius: var(--bb-border-radius-default);
        overflow: hidden;
        box-shadow: none;
        border: 1px solid var(--bb-color-border-default);
    }
    .standings-table-container.two-columns .table {
        margin-bottom: 0;
    }

    .standings-table { 
        width: 100%; 
        margin-bottom: 0; 
    }

    .standings-table tr { 
        transition: var(--transition); 
        cursor: pointer; 
    }

    .standings-table tr:hover { 
        background-color: #f8f9fa; 
        transform: none;
    }


    .standings-table tbody tr:first-child td {
        border-top: none;
    }

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

  



    /* Participant styling */
    .participant-number { 
        display: inline-flex; 
        align-items: center; 
        justify-content: center; 
        min-width: 32px; 
        height: 32px; 
        border-radius: 50%; 
        font-weight: 700; 
        color: var(--bb-color-text-contrast); 
        background: var(--bb-color-surface-active); 
        margin-right: 1rem; 
    }

    .participant-name { 
        flex-grow: 1; 
    }

    .participant-rating { 
        margin-right: 1rem; 
    }

    /* Buttons */
          .registration-btn { 
          border: none; 
          border-radius: var(--bb-border-radius-default); 
          padding: var(--bb-padding-md) var(--bb-padding-xl); 
          font-size: 1.1rem; 
          font-weight: 600; 
          margin-top: 1rem; 
          cursor: pointer; 
          transition: var(--transition); 
          display: inline-block; 
          text-decoration: none; 
          width: 100%; 
          text-align: center;
          box-shadow: var(--shadow-light);
      }

    .registration-btn.btn-warning { 
        background: linear-gradient(135deg, var(--warning-color), #ff8c00); 
        border-color: var(--warning-color); 
        color: var(--text-dark); 
    }

    .registration-btn.btn-warning:hover { 
        background: linear-gradient(135deg, #e68900, #ff8c00); 
        border-color: #e68900; 
        color: var(--text-dark); 
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
    }

    .registration-btn.btn-info { 
        background: linear-gradient(135deg, var(--info-color), #1976d2); 
        border-color: var(--info-color); 
        color: var(--text-primary); 
    }

    .registration-btn.btn-info:hover { 
        background: linear-gradient(135deg, #1976d2, #1565c0); 
        border-color: #1976d2; 
        color: var(--text-primary); 
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
    }

    /* Admin buttons */
    .admin-buttons { 
        display: flex; 
        margin-top: 2rem; 
        justify-content: center; 
        flex-wrap: wrap; 
        gap: 1rem; 
    }

          .edit-btn, .start-btn, .delete-btn { 
          display: flex; 
          align-items: center; 
          justify-content: center; 
          border: none; 
          border-radius: var(--bb-border-radius-subtle); 
          padding: var(--bb-padding-sm) var(--bb-padding-lg); 
          font-weight: 600; 
          text-decoration: none; 
          font-size: 1rem; 
          transition: var(--transition); 
          box-shadow: var(--shadow-light);
      }

    .edit-btn { 
        background: #ffffff; 
        color: var(--text-dark); 
    } 

    .start-btn { 
        background: #ff9800; 
        color: var(--text-dark); 
    }

    .delete-btn { 
        background: #f44336; 
        color: var(--text-primary); 
    }

    .edit-btn:hover, .start-btn:hover, .delete-btn:hover { 
        transform: translateY(-3px); 
        box-shadow: var(--shadow-medium); 
        text-decoration: none; 
    }

    .edit-btn:hover { 
        color: var(--text-dark) !important; 
        background: #f8f9fa !important; 
    }

    .start-btn:hover { 
        color: var(--text-dark) !important; 
        background: #e68900 !important; 
    }

    .delete-btn:hover { 
        color: var(--text-primary) !important; 
        background: #d32f2f !important; 
    }

    .btn-icon { 
        margin-right: 0.5rem; 
    }

    /* Alerts */
    .alert {
        border-radius: var(--bb-border-radius-default);
        border: none;
        box-shadow: var(--shadow-light);
    }

    .alert-permanent {
        background: var(--bb-color-surface-default);  
        border: 1px solid var(--bb-color-border-default);
        color: var(--bb-color-text-default);
    }
    .alert-permanent a {
        color: var(--bb-color-text-link-default);
        font-weight: 600;
        text-decoration: none;
    }
    .alert-permanent a:hover {
        text-decoration: underline;
    }

    /* Google Calendar container - entire box is clickable */
    .google-calendar-container {
        display: flex;
        align-items: center;
        gap: var(--bb-space-sm);
        text-decoration: none;
        color: var(--bb-color-text-action-tertiary-default);
        cursor: pointer;
        transition: var(--bb-transition-fast);
    }

    .google-calendar-container:hover {
        background: var(--bb-color-surface-action-tertiary-hover);
        color: var(--bb-color-text-action-tertiary-hover);
        border-color: var(--bb-color-border-hover);
        text-decoration: none;
    }

    .google-calendar-container:active {
        background: var(--bb-color-surface-action-tertiary-pressed);
        color: var(--bb-color-text-action-tertiary-pressed);
        border-color: var(--bb-color-border-pressed);
    }

    /* Waiting list section */
    .waiting-list-lock-section {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }

    .waiting-list-lock-section p {
        margin-bottom: 0.75rem;
        font-size: 1rem;
        display: flex;
        align-items: center;
    }

    .waiting-list-lock-section .fas {
        margin-right: 0.75rem;
        font-size: 1.2em;
    }

    .lock-status-locked .fas {
        color: var(--danger-color);
    }

    .lock-status-unlocked .fas {
        color: var(--success-color);
    }

    .lock-status-locked span, .lock-status-unlocked span {
        font-weight: 600;
    }

    .lock-status-description {
        font-size: 0.9rem;
        color: var(--text-secondary);
        margin-top: -0.25rem;
        margin-bottom: 1rem;
        padding-left: 2rem;
    }

          .btn-toggle-lock {
          font-weight: 600;
          padding: var(--bb-padding-sm) var(--bb-padding-lg);
          border-radius: var(--bb-border-radius-subtle);
          width: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: var(--transition);
          box-shadow: var(--shadow-light);
      }

    .btn-toggle-lock .fas {
        margin-right: 0.75rem;
    }

    .btn-lock-list {
        background: linear-gradient(135deg, var(--danger-color), #d32f2f);
        border-color: var(--danger-color);
        color: var(--text-primary);
    }

    .btn-lock-list:hover {
        background: linear-gradient(135deg, #d32f2f, #c62828);
        border-color: #c62828;
        color: var(--text-primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
    }

    .btn-unlock-list {
        background: linear-gradient(135deg, var(--success-color), #388e3c);
        border-color: var(--success-color);
        color: var(--text-primary);
    }

    .btn-unlock-list:hover {
        background: linear-gradient(135deg, #388e3c, #2e7d32);
        border-color: #2e7d32;
        color: var(--text-primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
    }
    
    .lock-help-text {
        font-size: 0.85em;
        color: var(--text-secondary);
        margin-top: 0.75rem;
        text-align: center;
    }

    /* Attendance checkbox */
    .attendance-checkbox {
        transform: scale(1.2);
        cursor: pointer;
        border-radius: 4px;
        border: 1px solid #ccc;
    }

    /* Mobile responsive */
    @media (max-width: 767.98px) {

    
        .live-indicator { 
            font-size: 1rem !important; 
        }
        
        .live-indicator::before { 
            width: 8px !important; 
            height: 8px !important; 
        }
        
        .tournament-location { 
            font-size: 1rem !important; 
            margin-bottom: 1.5rem !important; 
        }
        
     
        
        .tournament-panel-title { 
            margin-bottom: 1rem !important; 
        }
        
        
        .info-label { 
            font-size: 0.8rem !important; 
        }
        
    

        .registration-view .info-container .info-item {
            text-align: left !important; 
        }
        
        .registration-view .info-container .col-6 {
            padding-left: 0.75rem;
            padding-right: 0.75rem;
        }

        .registration-view .info-container .row {
            margin-bottom: 0.75rem;
        }

        .tournament-table td, .tournament-table th,
        .standings-table td, .standings-table th {
            white-space: normal !important; 
        }
        
        .tournament-table thead th, .standings-table thead th {
            font-weight: 600 !important; 
            font-size: 0.95rem !important;
        }


        .standings-table .player-score, .standings-table td:nth-child(3),
        .registration-view .standings-table .participant-rating,
        .registration-view .standings-table td[style*="text-align: right;"] { 
            font-size: 0.9rem !important; 
            font-weight: 600 !important; 
        }

      
        
        .participant-number { 
            font-size: 0.85rem !important; 
            min-width: 32px !important; 
            height: 32px !important; 
        }

        .admin-buttons { 
            flex-direction: column; 
            align-items: center; 
        }
        
        .edit-btn, .start-btn, .delete-btn { 
            width: 100%; 
            max-width: 300px; 
        }
    }

    @media (max-width: 480px) {

        .tournament-table td, .tournament-table th,
        .standings-table td, .standings-table th { 
            font-size: 0.85rem !important; 
        }
        
        
        .standings-table .player-score, .standings-table td:nth-child(3),
        .registration-view .standings-table .participant-rating,
        .registration-view .standings-table td[style*="text-align: right;"] { 
            font-size: 0.85rem !important; 
        }

       
        
        .participant-number { 
            font-size: 0.8rem !important; 
            min-width: 28px !important; 
            height: 28px !important; 
        }
    }

    /* Summary Section */
    .summary-details-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    .info-grid-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .tournament-info-grid-custom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
  

    /* Tiebreaker in Summary */
    .tiebreaker-container {
        background: var(--dark-green-accent);
        border-radius: var(--bb-border-radius-default);
        border: 1px solid rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }
    .tiebreaker-header {
        padding: 1rem 1.25rem;
        background: var(--green-highlight);
        color: var(--text-primary);
    }
    .tiebreaker-body {
        padding: 1.25rem;
    }
    .tiebreaker-body .table {
        --bs-table-bg: transparent;
        --bs-table-color: var(--text-primary);
        --bs-table-border-color: rgba(255, 255, 255, 0.15);
        --bs-table-hover-bg: rgba(255, 255, 255, 0.1);
        --bs-table-hover-color: var(--text-primary);
        margin-bottom: 0;
    }
    .tiebreaker-body .table thead {
        color: var(--text-secondary);
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    }
    .tiebreaker-body .table .rank-badge {
        background: transparent !important;
        box-shadow: none;
    }

    @media (min-width: 992px) {
        .summary-details-grid {
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        }
    }
/* RANKINGS STYLES CSS */


.page-title {
  text-align: center;
}

.bb-segmented-tabs {
  text-align: center;
  margin-bottom: var(--bb-space-md);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bb-color-background-default);
  border-radius: var(--bb-border-radius-default);
  padding: var(--bb-padding-sm);
  border: 1px solid var(--bb-color-border-default);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
      .bb-segmented-tabs .btn {
          flex-grow: 1;
          border-radius: var(--bb-border-radius-subtle);
          padding: var(--bb-padding-sm) var(--bb-padding-md);
          color: var(--bb-color-text-default);
          background: transparent;
          transition: var(--transition);
      }
.bb-segmented-tabs .btn:hover {
  background-color: var(--bb-color-surface-hover);
}
.bb-segmented-tabs .btn:active {
  background-color: var(--bb-color-surface-pressed);
  border: 1px solid var(--bb-color-border-pressed);
}
.bb-segmented-tabs .btn.active {
  background: var(--bb-color-surface-highlight);
  border: 1px solid var(--bb-color-border-highlight);
}
.bb-segmented-tabs .btn.active:hover {
  background: var(--bb-color-surface-hover);
}

      .rankings-panel {
          background: var(--bb-color-surface-default);
          border-radius: var(--bb-border-radius-default);
          padding: var(--bb-padding-md);
          border: 1px solid rgba(255, 255, 255, 0.1);
      }

.table-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--bb-border-radius-default);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

  


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

.rankings-table tbody tr {
  cursor: pointer;
}

.rankings-table tbody tr:hover {
  background-color: var(--bb-color-surface-hover);
}



.tournaments-played { font-weight: 500; color: var(--text-secondary); }

.rating-change .positive { color: #4caf50; font-weight: 600; }
.rating-change .negative { color: #f44336; font-weight: 600; }
.rating-change .neutral { color: var(--text-muted); }
.rating-change .na { color: var(--text-muted); font-style: italic; }

.pagination-container { margin-top: 2rem; display: flex; justify-content: center; }
.pagination { gap: var(--bb-space-sm); }
      .pagination .page-item .page-link { 
          background-color: var(--bb-color-surface-default); 
          color: var(--text-secondary); 
          border: 1px solid var(--bb-color-border-default); 
          border-radius: var(--bb-border-radius-subtle); 
          transition: var(--transition); 
          padding: var(--bb-padding-sm) var(--bb-padding-md); 
      }
.pagination .page-item .page-link:hover { 
  background-color: var(--bb-color-surface-hover); 
  color: var(--text-primary); 
  border-color: var(--bb-color-border-highlight); 
}
.pagination .page-item.active .page-link { 
  background: var(--bb-color-surface-highlight);
  border-color: var(--bb-color-border-highlight); 
}
.pagination .page-item.disabled .page-link { 
  color: var(--bb-color-text-disabled); 
  background-color: var(--bb-color-surface-default); 
  border-color: var(--bb-color-border-default);
  opacity: 0.5;
}

.pagination .page-select-item .page-link {
  display: flex;
  align-items: center;
  gap: var(--bb-space-xs);
  padding: var(--bb-padding-sm);
}

.pagination .page-select {
  background-color: transparent;
  color: var(--bb-color-text-default);
  border: 1px solid var(--bb-color-border-default);
  border-radius: var(--bb-border-radius-subtle);
  padding: var(--bb-padding-sm) var(--bb-padding-md);
  font-size: var(--bb-text-size-md);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 3L1 8h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--bb-padding-sm) center;
  padding-right: calc(var(--bb-padding-md) + 12px);
  transition: var(--bb-transition-normal);
}

.pagination .page-select:hover {
  background-color: var(--bb-color-surface-hover);
  border-color: var(--bb-color-border-hover);
}

.pagination .page-select:focus {
  border-color: var(--bb-color-border-highlight);

}

.pagination .page-of-total {
 
  white-space: nowrap;
}

@media (max-width: 576px) {
   
 
  /* Hide the Tourn. Played column (5th column) */
  .rankings-table th:nth-child(5),
  .rankings-table td:nth-child(5) {
      display: none;
  }
  .rankings-table th:nth-child(4),
  .rankings-table td:nth-child(4) {
      display: none;
  }
 
}

/* Style the browser's default clear button (x icon) */
.search-container .form-control::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231DF5AD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg>");
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

/* For Firefox */
.search-container .form-control::-moz-search-cancel-button {
  -moz-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231DF5AD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg>");
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

/* Override Bootstrap table variables with your design system */
.table {
  --bs-table-bg: var(--bb-color-surface-default);
  --bs-table-color: var(--bb-color-text-default);
  --bs-table-border-color: var(--bb-color-border-default);
  --bs-table-accent-bg: transparent;
  --bs-table-striped-color: var(--bb-color-text-default);
  --bs-table-striped-bg: var(--bb-color-surface-hover);
  --bs-table-active-color: var(--bb-color-text-default);
  --bs-table-active-bg: var(--bb-color-surface-active);
  --bs-table-hover-color: var(--bb-color-text-default);
  --bs-table-hover-bg: var(--bb-color-surface-hover);
}

/* Also override for specific table types */
.standings-table,
.rankings-table,
.tournament-table,
.crosstable {
  --bs-table-bg: var(--bb-color-surface-default);
  --bs-table-color: var(--bb-color-text-default);
  --bs-table-border-color: var(--bb-color-border-default);
  --bs-table-accent-bg: transparent;
  --bs-table-striped-color: var(--bb-color-text-default);
  --bs-table-striped-bg: var(--bb-color-surface-hover);
  --bs-table-active-color: var(--bb-color-text-default);
  --bs-table-active-bg: var(--bb-color-surface-active);
  --bs-table-hover-color: var(--bb-color-text-default);
  --bs-table-hover-bg: var(--bb-color-surface-hover);
}

/* Tournament Filters */
.tournament-filters {
    display: flex;
    gap: var(--bb-space-md);
    margin-bottom: var(--bb-space-lg);
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--bb-space-xs);
}

.filter-group label {
    font-size: var(--bb-text-size-sm);
    font-weight: var(--bb-text-weight-medium);
    color: var(--bb-color-text-default);
}

.filter-group select {
    background: var(--bb-color-surface-default);
    border: 1px solid var(--bb-color-border-default);
    border-radius: var(--bb-border-radius-default);
    padding: var(--bb-padding-sm) var(--bb-padding-md);
    color: var(--bb-color-text-default);
    font-size: var(--bb-text-size-sm);
    min-width: 150px;
    transition: var(--bb-transition-normal);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--bb-color-border-action-primary-default);
    box-shadow: 0 0 0 2px var(--bb-color-surface-action-primary-subtle);
}

.filter-group select:hover {
    border-color: var(--bb-color-border-strong);
}

/* Featured Tournament Component */
.featured-tournament-container {
    margin-bottom: var(--bb-space-lg);
    overflow: hidden;
    transition: var(--bb-transition-normal);
}


.featured-tournament-content {
    display: flex;
    min-height: 200px;
}

.featured-tournament-image {
    flex: 0 0 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 1;
    position: relative;
}



.featured-tournament-info {
    flex: 1;
    padding: var(--bb-padding-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tournament-header {
    margin-bottom: var(--bb-space-md);
}

.featured-tournament-title {
    font-size: var(--bb-text-size-2xl);
    color: var(--bb-color-text-default);
    margin-bottom: var(--bb-space-sm);
    line-height: 1.2;
}

.featured-tournament-title-link {
    color: var(--bb-color-text-primary);
    text-decoration: none;
    transition: var(--bb-transition-normal);
}

.featured-tournament-title-link:hover {
    color: var(--bb-color-text-link-default);
    text-decoration: underline;
}

.featured-tournament-details {
    display: flex;
    flex-direction: column;
    gap: var(--bb-space-sm);
    margin-bottom: var(--bb-space-md);
}

.featured-tournament-detail {
    display: flex;
    align-items: center;
    gap: var(--bb-space-sm);
    font-size: var(--bb-text-size-sm);
    color: var(--bb-color-text-secondary);
}

.featured-tournament-detail i {
    color: var(--bb-color-text-highlight);
    width: 16px;
    text-align: center;
}

.featured-tournament-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bb-space-md);
}

.featured-tournament-status {
    display: inline-flex;
    align-items: center;
    font-size: var(--bb-text-size-sm);
    font-weight: var(--bb-text-weight-medium);
    padding: var(--bb-padding-xs) var(--bb-padding-sm);
    border-radius: var(--bb-border-radius-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-tournament-status.live {
    background: var(--bb-color-surface-system-critical);
    color: var(--bb-color-text-system-critical);
    border: 1px solid var(--bb-color-border-system-critical);
}

.featured-tournament-status.full {
    background: var(--bb-color-surface-system-neutral);
    color: var(--bb-color-text-system-neutral);
    border: 1px solid var(--bb-color-border-system-neutral);
}

.featured-tournament-status.spots {
    background: var(--bb-color-surface-system-success);
    color: var(--bb-color-text-system-success);
    border: 1px solid var(--bb-color-border-system-success);
}

.featured-tournament-status.waitlist {
    background: var(--bb-color-surface-system-warning);
    color: var(--bb-color-text-system-warning);
    border: 1px solid var(--bb-color-border-system-warning);
}

.featured-tournament-status.registered {
    background: var(--bb-color-surface-system-personal);
    color: var(--bb-color-text-system-personal);
    border: 1px solid var(--bb-color-border-system-personal);
}

.featured-tournament-status.locked {
    background: var(--bb-color-surface-system-neutral);
    color: var(--bb-color-text-system-neutral);
    border: 1px solid var(--bb-color-border-system-neutral);
}

/* Featured tournament actions use official bb-button classes */
.featured-tournament-actions {
    display: flex;
    align-items: center;
    gap: var(--bb-space-md);
    flex-wrap: wrap;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .tournament-filters {
        flex-direction: column;
        align-items: stretch;
        gap: var(--bb-space-sm);
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
        min-width: auto;
    }

    .featured-tournament-content {
        flex-direction: column;
    }

    .featured-tournament-image {
        flex: none;
        aspect-ratio: 3/2;
        min-height: 200px;
    }

    .featured-tournament-info {
        padding: var(--bb-padding-md);
    }

    .featured-tournament-title {
        font-size: var(--bb-text-size-xl);
    }

    .featured-tournament-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--bb-space-sm);
    }

    .featured-register-btn {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .featured-tournament-info {
        padding: var(--bb-padding-md) 0px;
    }

    .featured-tournament-title {
        font-size: var(--bb-text-size-lg);
    }

    .featured-tournament-details {
        gap: var(--bb-space-xs);
    }

    .featured-tournament-detail {
        font-size: var(--bb-text-size-xs);
    }
}

/* Main Headline with Inline City Selector */
.main-headline-container {
    margin-bottom: var(--bb-space-lg);
}

.main-headline {
    font-size: var(--bb-text-size-4xl);
    color: var(--bb-color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bb-space-sm);
}

/* Custom City Selector */
.custom-city-selector {
    position: relative;
    display: inline-block;
}

.city-select-trigger {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--bb-color-text-link-default);
    color: var(--bb-color-text-link-default);
    font-weight: inherit;
    font-family: inherit;
    padding: var(--bb-space-xs);
    cursor: pointer;
    transition: var(--bb-transition-normal);
    outline: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: var(--bb-space-md);
    min-width: 120px;
    letter-spacing: 1px;
}

.city-select-trigger:hover {
    color: var(--bb-color-text-link-hover);
    border-bottom-color: var(--bb-color-text-link-hover);
}

.city-select-trigger:focus {
    color: var(--bb-color-text-link-hover);
    border-bottom-color: var(--bb-color-text-link-hover);
}

.dropdown-arrow {
    font-size: 12px;
    transition: var(--bb-transition-normal);
}

.city-select-trigger.open .dropdown-arrow {
    transform: rotate(180deg);
}

.city-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bb-color-surface-primary);
    border: 1px solid var(--bb-color-border-default);
    border-radius: var(--bb-radius-md);
    box-shadow: var(--bb-shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--bb-transition-normal);
    max-height: 200px;
    overflow-y: auto;
}

.city-select-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    padding: var(--bb-space-sm) var(--bb-space-md);
    cursor: pointer;
    transition: var(--bb-transition-normal);
    color: var(--bb-color-text-primary);
    border-bottom: 1px solid var(--bb-color-border-subtle);
    font-size: var(--bb-text-size-lg);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: var(--bb-color-surface-hover);
    color: var(--bb-color-text-link-hover);
}

.dropdown-option.active {
    background: var(--bb-color-surface-active);
    color: var(--bb-color-text-contrast);
}

/* Time Mode Tabs */
.time-mode-tabs {
    margin-bottom: var(--bb-space-lg);
}

.tab-list {
    display: flex;
    gap: var(--bb-space-lg);
    background: transparent;
    border: none;
    padding: 0;
}

.tab-button {
    padding: var(--bb-space-xs) 0;
    border: none;
    background: transparent;
    color: var(--bb-color-text-secondary);
    font-size: var(--bb-text-size-md);
    cursor: pointer;
    transition: var(--bb-transition-normal);
    outline: none;
    position: relative;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--bb-color-text-primary);
}

.tab-button:focus {
    color: var(--bb-color-text-link-default);
}

.tab-button.active {
    color: var(--bb-color-text-link-default);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bb-color-text-link-default);
    border-radius: 1px;
}

/* Responsive adjustments for headline */
@media (max-width: 768px) {
    .main-headline {
        font-size: var(--bb-text-size-xl);

        gap: var(--bb-space-xs);
    }
    
    .city-select-trigger {
        min-width: 100px;
        gap: var(--bb-space-xs);
    }
}