/* Hamburger icon */
#hamburger-menu {
  position: static;
  margin-left: 0;
  margin-right: 16px;
  align-self: center;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7em;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
#hamburger-menu:hover {
  background: #e3eafc;
}
.navbar-logo img {
  height: 38px;
  display: block;
}
.navbar-center {
  flex: 1;
  justify-content: center;
}
.navbar-right {
  flex: 1;
  justify-content: flex-end;
  margin-right: 0;
}
/* --- Flyout submenu styles --- */
.smgr-main {
  display: flex;
  flex-direction: row;
  position: relative;
}
#side-panel-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 270px;
  background: #fff;
  color: #222;
  z-index: 3000;
  box-shadow: -2px 0 8px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: block;
  overflow-y: auto;
}
#side-panel-menu.active {
  transform: translateX(0);
}
.submenu-flyout {
  position: fixed;
  top: 0;
  left: 270px;
  height: 100vh;
  width: 320px;
  background: #fff;
  box-shadow: 2px 0 12px rgba(25,118,210,0.10);
  z-index: 1250;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid #e0e0e0;
  animation: fadeIn 0.2s;
}
.submenu-flyout.open {
  display: flex;
}
.submenu-flyout-title {
  font-weight: 600;
  font-size: 1.15em;
  padding: 22px 28px 10px 28px;
  border-bottom: 1px solid #e0e0e0;
  background: #f7f7f7;
}
.submenu-flyout ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.submenu-flyout ul li {
  border-bottom: 1px solid #f0f0f0;
}
.submenu-flyout ul li a {
  display: block;
  color: #222;
  text-decoration: none;
  padding: 18px 32px;
  font-size: 1.08em;
  transition: background 0.2s, color 0.2s;
}
.submenu-flyout ul li a:hover, .submenu-flyout ul li a:focus {
  background: #e3eafc;
  color: #1976d2;
}
/* Highlight active parent menu item */
.side-panel-links > li.has-submenu.active > a {
  background: #e3eafc;
  color: #1976d2;
}
/* Responsive: mobile layout */
@media (max-width: 900px) {
  #side-panel-menu {
    width: 70vw;
    min-width: 0;
  }
  .submenu-flyout {
    left: 60vw;
    width: 40vw;
    min-width: 0;
    max-width: 100vw;
  }
}
@media (max-width: 600px) {
  #side-panel-menu {
    width: 70vw;
    min-width: 0;
  }
  .submenu-flyout {
    left: 60vw;
    width: 40vw;
    min-width: 0;
    max-width: 100vw;
  }
}
/* Hide flyouts by default */
.submenu-flyout { display: none; }
.submenu-flyout.open { display: flex; }

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px 18px;
  border-bottom: 1px solid #e0e0e0;
  background: #f7f7f7;
}
.side-panel-header img {
  height: 38px;
}
#close-side-panel {
  font-size: 2em;
  cursor: pointer;
  color: #888;
  margin-left: 10px;
  transition: color 0.2s;
}
#close-side-panel:hover {
  color: #d32f2f;
}

.side-panel-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-panel-links > li {
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.side-panel-links a {
  display: flex;
  align-items: center;
  color: #222;
  text-decoration: none;
  padding: 16px 24px;
  font-size: 1.1em;
  transition: background 0.2s, color 0.2s;
  background: none;
}
.side-panel-links a:hover, .side-panel-links a:focus {
  background: #f7f7f7;
  color: #1976d2;
}
.side-panel-links > li > a > .fa {
  margin-right: 10px;
  font-size: 1.1em;
  vertical-align: middle;
}

/* Chevron indicator for submenu */
.side-panel-links > li.has-submenu > a:after {
  content: '\25B6';
  font-size: 0.8em;
  margin-left: auto;
  color: #888;
  transition: transform 0.2s;
}
/* Remove hover logic, add .submenu-open for click */
.side-panel-links > li.has-submenu.submenu-open > a:after {
  transform: rotate(90deg);
  color: #1976d2;
}

/* Submenu styles */
.submenu {
  background: #f7f7f7;
  padding-left: 0;
  display: none;
  position: static;
  box-shadow: none;
}
.side-panel-links > li.has-submenu.submenu-open > .submenu {
  display: block;
}
.submenu li {
  border-bottom: none;
}
.submenu a {
  font-size: 0.98em;
  padding: 12px 36px;
  color: #444;
  background: none;
}
.submenu a:hover, .submenu a:focus {
  background: #e3eafc;
  color: #1976d2;
}
.submenu > li > a > .fa {
  margin-right: 7px;
  font-size: 0.95em;
  vertical-align: middle;
}

.login-menu-item {
  padding: 24px 24px 12px 24px;
  background: #e3eafc;
  border-bottom: 1px solid #d0d7e6;
  text-align: center;
}
#login-menu-toggle {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 32px;
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
  transition: background 0.2s, color 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#login-menu-toggle:focus, #login-menu-toggle:hover {
  background: #1251a3;
  color: #fff;
}
.side-login-form-container {
  display: none;
  margin-top: 10px;
  animation: fadeIn 0.2s;
}
.side-login-form-container.open {
  display: block;
}
.side-login-input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid #b6c6e3;
  border-radius: 6px;
  font-size: 1em;
  background: #f7faff;
  color: #222;
  outline: none;
  transition: border 0.2s;
}
.side-login-input:focus {
  border: 1.5px solid #1976d2;
}
.side-login-btn {
  width: 100%;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 0;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.2s;
}
.side-login-btn:hover, .side-login-btn:focus {
  background: #1251a3;
}
.side-login-btn.logout {
  background: #d32f2f;
  margin-top: 10px;
}
.side-login-btn.logout:hover, .side-login-btn.logout:focus {
  background: #a31515;
}
.side-login-register {
  margin-top: 6px;
}
.side-login-register a {
  color: #1976d2;
  text-decoration: underline;
  font-size: 0.98em;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-avatar, .side-profile-btn, .side-logout-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(25,118,210,0.10);
  border: none;
  margin: 0;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.side-profile-btn {
  background: #f7f7f7;
  color: #1976d2;
  border: 1.5px solid #1976d2;
  margin-left: 0;
}
.side-profile-btn:hover, .side-profile-btn:focus {
  background: #e3eafc;
  color: #1251a3;
  border-color: #1251a3;
}
.side-logout-btn {
  background: #f7f7f7;
  color: #d32f2f;
  border: 1.5px solid #d32f2f;
  margin-left: 0;
}
.side-logout-btn:hover, .side-logout-btn:focus {
  background: #ffeaea;
  color: #a31515;
  border-color: #a31515;
}
.logged-in-user {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.logged-in-link {
  display: flex;
  align-items: center;
  background: none;
  color: #1976d2;
  border-radius: 18px;
  padding: 6px 0 6px 0;
  margin: 0 0 2px 0;
  font-size: 0.98em;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  vertical-align: middle;
  gap: 8px;
}
.logged-in-link:hover, .logged-in-link:focus {
  background: #e3eafc;
  color: #1251a3;
}
.profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-section-divider {
  height: 1px;
  background: linear-gradient(to right, #e0e7ef, #f7faff);
  margin: 16px 0 10px 0;
  border: none;
}
.login-menu-item.logged-in {
  background: #e8f5e9;
  color: #222;
  font-weight: 500;
  padding: 24px 24px 12px 24px;
  border-bottom: 1px solid #c8e6c9;
  text-align: center;
}
.user-avatar {
  display: inline-block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1976d2 60%, #42a5f5 100%);
  color: #fff;
  text-align: center;
  line-height: 38px;
  font-size: 1.5em;
  vertical-align: middle;
  margin-right: 10px;
  box-shadow: 0 2px 8px rgba(25,118,210,0.10);
}
.logged-in-user {
  font-weight: 600;
  font-size: 1.08em;
  margin-right: 0;
  vertical-align: middle;
}
.logged-in-link {
  display: flex;
  align-items: center;
  background: none;
  color: #1976d2;
  border-radius: 18px;
  padding: 6px 0 6px 0;
  margin: 0 0 2px 0;
  font-size: 0.98em;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  vertical-align: middle;
  gap: 8px;
}
.logged-in-link:hover, .logged-in-link:focus {
  background: #e3eafc;
  color: #1251a3;
}
.profile-actions {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  gap: 4px;
}
.side-profile-btn {
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2;
  border-radius: 50%;
  padding: 6px 10px !important;
  font-size: 1.1em;
  cursor: pointer;
  margin-right: 4px;
  transition: background 0.2s, color 0.2s, border 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.side-profile-btn:hover, .side-profile-btn:focus {
  background: #e3eafc;
  color: #1251a3;
  border-color: #1251a3;
}
.side-logout-btn {
  background: #fff;
  color: #d32f2f;
  border: 1.5px solid #d32f2f;
  border-radius: 50%;
  padding: 6px 10px;
  font-size: 1.1em;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.2s, color 0.2s, border 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.side-logout-btn:hover, .side-logout-btn:focus {
  background: #ffeaea;
  color: #a31515;
  border-color: #a31515;
}
.login-menu-item.logged-in .fa-user-circle {
  color: #388e3c;
  font-size: 1.5em;
  margin-right: 8px;
  vertical-align: middle;
}
input:-webkit-autofill,
input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #f7faff inset !important;
  -webkit-text-fill-color: #222 !important;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
} 
.profile-actions .side-profile-btn,
.profile-actions .side-login-btn.logout {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 1.1em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.user-section-divider {
  height: 1px;
  background: #e0e7ef;
  margin: 8px 0 6px 0;
  border: none;
}
.login-menu-item.logged-in {
  padding: 16px 16px 8px 16px;
}
.search-main {
  display: flex;
  align-items: center;
  max-width: 350px;
  margin: 0 8px;
  background: #fff;
  border-radius: 24px;
  box-shadow: none;
  padding: 2px 8px;
  border: 1px solid #e0e7ef;
}
.search-main input[type="text"] {
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 24px;
  flex: 1;
  font-size: 1em;
}
.search-main input[type="text"]:focus {
  box-shadow: none;
  border: 1.5px solid #1976d2;
  background: transparent;
}
.search-main button.search-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 1.1em;
  transition: background 0.2s;
  cursor: pointer;
}
.search-main button.search-btn i {
  color: #fff !important;
}
.search-main button.search-btn:hover,
.search-main button.search-btn:focus {
  background: #1565c0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
} 
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 2000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25,118,210,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 60px;
}
.navbar-left, .navbar-center, .navbar-right {
  display: flex;
  align-items: center;
}
.top-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 12px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1200px) {
  .top-navbar-inner {
    max-width: 100vw;
    width: 100vw;
    margin: 0;
    padding: 0 6px;
  }
}
.navbar-left {
  order: 1;
  justify-content: flex-start;
  flex: 0 0 auto;
  margin: 0;
}
.navbar-center {
  order: 2;
  justify-content: center;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
.navbar-right {
  order: 3;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-right: 0;
  display: flex;
  align-items: center;
}
body {
  padding-top: 60px;
}
@media (max-width: 600px) {
  body {
    padding-top: 48px;
  }
} 
.ui-autocomplete {
  z-index: 4000 !important;
}
.top-navbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
#hamburger-menu {
  margin: 0 auto;
  align-self: center;
}
.navbar-logo img {
  display: block;
  height: 38px;
  margin: 0 auto;
}

/* Teams scroll container for mobile horizontal scrolling */
.logo-main {
  display: block !important;
}

.teams-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 5px 0;
}

.teams-scroll-container::-webkit-scrollbar {
  display: none;
}

.teams-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: max-content;
}

.teams-list li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 0 !important;
}

.teams-list li a {
  display: block;
  padding: 3px;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.teams-list li a:hover {
  background-color: rgba(0,0,0,0.1);
  transform: scale(1.05);
}

/* Desktop view - wrap teams and center them with minimal spacing */
@media (min-width: 768px) {
  .teams-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }
  
  .teams-scroll-container {
    overflow-x: visible;
    padding: 6px 0;
  }
  
  .teams-list li a {
    padding: 1px;
  }
}

/* Ensure all 18 teams fit on 1200px+ screens */
@media (min-width: 1200px) {
  .teams-list {
    gap: 3px;
  }
  
  .teams-list li a {
    padding: 2px;
  }
}

/* Container for mode toggle and filters */
.broker-controls {
  margin-bottom: 20px;
}

.filters-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 15px;
}

/* Desktop layout - same row for game selector and filters */
@media (min-width: 1200px) {
  .broker-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
  }
  
  .filters-panel {
    margin-top: 0;
    flex: 1;
    justify-content: flex-end;
  }
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-weight: 500;
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}

/* Modern mode toggle for SuperManager/Ring Fantasy */
.mode-toggle {
  background: #f8f9fa;
  border-radius: 25px;
  padding: 4px;
  display: flex;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mode-btn {
  padding: 12px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
  margin: 2px;
  white-space: nowrap;
}

.mode-btn:hover {
  text-decoration: none;
  color: #1976d2;
  background: rgba(25, 118, 210, 0.1);
}

.mode-btn.active {
  background: #1976d2;
  color: white;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* Modern position filters */
.position-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  padding: 0;
  color: #666;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.filter-btn:hover {
  border-color: #1976d2;
  color: #1976d2;
  background: rgba(25, 118, 210, 0.05);
}

.filter-btn.active {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .broker-controls {
    flex-direction: column;
    gap: 15px;
  }
  
  .mode-toggle {
    width: 100%;
    justify-content: center;
  }
  
  .mode-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
  }
  
  .position-filters {
    width: 100%;
    justify-content: center;
  }
  
  .filter-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
  }
  
  .filters-panel {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .position-filters {
    justify-content: flex-end;
  }
  
  .condition-filters {
    justify-content: flex-end;
  }
}

/* Condition filters */
.condition-filters {
  display: flex;
  gap: 6px;
}

.condition-btn {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.condition-btn:hover {
  border-color: #1976d2;
  background: rgba(25, 118, 210, 0.05);
}

.condition-btn.active {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* Team filter with checkboxes */
.team-filter-container {
  position: relative;
}

.team-dropdown-btn {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #666;
  outline: none;
  transition: border-color 0.3s ease;
  min-width: 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.team-dropdown-btn:hover {
  border-color: #1976d2;
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.team-dropdown-btn.open .dropdown-arrow {
  transform: rotate(180deg);
}

.team-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
  scrollbar-width: thin;
}

.team-dropdown.open {
  display: block;
}

.team-dropdown-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.clear-all-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  width: 100%;
  text-align: left;
}

.clear-all-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.team-checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  gap: 8px;
  margin: 0;
  font-weight: normal;
}

.team-checkbox-label:hover {
  background: #f5f5f5;
}

.team-checkbox {
  margin: 0;
}

.team-shield {
  flex-shrink: 0;
}

.team-name {
  font-size: 14px;
  color: #666;
}

/* Modern table design - reusable across the site */
.states-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  border: none;
}

/* DataTables wrapper styling */
.dataTables_wrapper {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dataTables_scrollBody {
  overflow-x: auto;
  overflow-y: visible;
}

.states-table {
  width: auto !important;
  min-width: 100%;
}

.dataTables_scrollHead,
.dataTables_scrollBody {
  border: none;
}

.dataTables_scrollHead .states-table,
.dataTables_scrollBody .states-table {
  margin-bottom: 0;
  box-shadow: none;
  border-radius: 0;
}

/* Ensure rounded corners on DataTables header */
.dataTables_scrollHead {
  border-radius: 8px 8px 0 0;
}

.dataTables_scrollHead .states-table thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}

.dataTables_scrollHead .states-table thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

.dataTables_scrollBody {
  border-radius: 0 0 8px 8px;
}

/* Mobile specific rounded corner fixes */
@media (max-width: 768px) {
  .dataTables_scrollHead {
    border-radius: 8px 8px 0 0 !important;
  }
  
  .dataTables_scrollHead .states-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px !important;
  }
  
  .dataTables_scrollHead .states-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px !important;
  }
}

.states-table thead {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: white;
}

.states-table thead th {
  border: none;
  padding: 12px 8px;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  background: inherit;
}

.states-table thead th:hover {
  /* background-color: rgba(255,255,255,0.1);*/
}

.states-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.states-table tbody tr:hover {
  background-color: #f8f9fa;
}

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

.states-table tbody td {
  padding: 10px 8px;
  border: none;
  vertical-align: middle !important;
  font-size: 12px;
  text-align: center;
}

/* Player name styling with ellipsis */
.states-table .jugador {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.states-table .jugador a {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.states-table .jugador a:hover {
  color: #1976d2;
  text-decoration: underline;
}

/* Removed DataTables scrollBody overrides since we're not using DataTables scrolling */
  
  /* Reduce padding on mobile */
  .states-table th,
  .states-table td {
    padding: 8px 4px;
    font-size: 11px;
  }
  
  /* Ensure DataTables scroll wrapper doesn't interfere */
  .dataTables_wrapper {
    overflow: visible;
  }


/* Broker value highlighting - higher specificity to override style.css */
.states-table td.green {
  color: #2e7d32 !important;
  font-weight: 700 !important;
  background: rgba(76, 175, 80, 0.1) !important;
  padding: 2px 4px;
  border-radius: 3px;
}

.states-table td.red {
  color: #c62828 !important;
  font-weight: 700 !important;
  background: rgba(244, 67, 54, 0.1) !important;
  padding: 2px 4px;
  border-radius: 3px;
}

/* DataTables sorting indicators */
.dataTables_wrapper .states-table thead th.sorting:after,
.dataTables_wrapper .states-table thead th.sorting_asc:after,
.dataTables_wrapper .states-table thead th.sorting_desc:after {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.7;
  color: white;
}

.dataTables_wrapper .states-table thead th.sorting:after {
  content: "⇅";
  opacity: 0.3;
}

.dataTables_wrapper .states-table thead th.sorting_asc:after {
  content: "▲";
  opacity: 1;
}

.dataTables_wrapper .states-table thead th.sorting_desc:after {
  content: "▼";
  opacity: 1;
}

/* Team and position badges */
.states-table td:nth-child(3),
.states-table td:nth-child(4) {
  font-weight: 500;
  text-align: center;
}

/* Responsive table wrapper */
.table-responsive {
  border: none;
  border-radius: 8px;
  box-shadow: none;
  max-height: 70vh !important; /* Fixed height for vertical scrolling */
  overflow-y: auto !important;
  scrollbar-width: thin;
}

/* Number formatting */
.states-table tbody td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Flag indicators - restored original absolute positioning */
.nac {
  background: url('../images/bnac.gif') no-repeat right;
  position: absolute;
  right: 5px;
  top: 0;
  bottom: 0;
  width: 20px;
  height: 100%;
  pointer-events: none;
}

.extra {
  background: url('../images/bextra.gif') no-repeat right;
  position: absolute;
  right: 5px;
  top: 0;
  bottom: 0;
  width: 20px;
  height: 100%;
  pointer-events: none;
}

/* Ring Fantasy specific styling */
body.ring-fantasy .states-table thead {
  background: linear-gradient(135deg, #02c7ab, #4dd0c2);
}

body.ring-fantasy .mode-btn.active {
  background: #02c7ab;
  box-shadow: 0 2px 8px rgba(2, 199, 171, 0.3);
}

body.ring-fantasy .mode-btn:hover {
  color: #02c7ab;
  background: rgba(2, 199, 171, 0.1);
}

body.ring-fantasy .filter-btn.active,
body.ring-fantasy .filter-btn.active:focus,
body.ring-fantasy .filter-btn.active:active {
  background: #02c7ab !important;
  border-color: #02c7ab !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(2, 199, 171, 0.3);
}

body.ring-fantasy .filter-btn:hover {
  border-color: #02c7ab;
  color: #02c7ab;
  background: rgba(2, 199, 171, 0.05);
}

body.ring-fantasy .condition-btn.active,
body.ring-fantasy .condition-btn.active:focus,
body.ring-fantasy .condition-btn.active:active {
  background: #02c7ab !important;
  border-color: #02c7ab !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(2, 199, 171, 0.3);
}

body.ring-fantasy .condition-btn:hover {
  border-color: #02c7ab;
  background: rgba(2, 199, 171, 0.05);
}

body.ring-fantasy .team-dropdown-btn:hover {
  border-color: #02c7ab;
}

body.ring-fantasy .title-border {
  background: linear-gradient(to right, #02c7ab, #4dd0c2);
  height: 3px;
  border: none;
}

body.ring-fantasy h2 {
  color: #02c7ab;
}

/* Ring Fantasy DataTables header styling */
body.ring-fantasy .dataTables_scrollHead .states-table thead {
  background: linear-gradient(135deg, #02c7ab, #4dd0c2) !important;
}

body.ring-fantasy .dataTables_scrollHead .states-table thead {
  background: linear-gradient(135deg, #02c7ab, #4dd0c2) !important;
}

body.ring-fantasy .dataTables_scrollHead .states-table thead {
  background: linear-gradient(135deg, #02c7ab, #4dd0c2) !important;
}

body.ring-fantasy .dataTables_scrollHead .states-table thead {
  background: linear-gradient(135deg, #02c7ab, #4dd0c2) !important;
}


/* Fix vertical alignment for red and green broker cells */
.states-table td.red,
.states-table td.green {
  vertical-align: middle;
}

/* Using existing working CSS from styles.css for #avanzada */

/* Simple table sorting indicators */
.states-table th {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.states-table th:hover {
  /* background-color: rgba(0,0,0,0.05);*/
}

.states-table th.asc::after {
  content: ' ↑';
  position: absolute;
  right: 8px;
  font-size: 12px;
}

.states-table th.desc::after {
  content: ' ↓';
  position: absolute;
  right: 8px;
  font-size: 12px;
}

/* Valoracion page specific styling */
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.filters-toggle-btn {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-toggle-btn:hover {
  background: #e9ecef;
  border-color: #1976d2;
  color: #1976d2;
}

.filters-toggle-btn.active {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.filters-toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

.valoracion-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 30px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.valoracion-controls.collapsed {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
}

.valoracion-controls.expanded {
  max-height: 1000px;
  opacity: 1;
}

.range-filters {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}

.range-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.range-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0;
  font-size: 14px;
}

.range-group .form-control {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  height: auto;
  min-height: 42px;
  line-height: 1.4;
}

.range-group .form-control:focus {
  border-color: #1976d2;
  box-shadow: none;
  outline: none;
}

.range-group .live-btn {
  background: #1976d2;
  border: 2px solid #1976d2;
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-height: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.range-group .live-btn:hover {
  background: #1565c0;
  border-color: #1565c0;
  transform: translateY(-2px);
}

.valoracion-filters {
  margin-bottom: 24px;
}

/* Sticky column styles for valoracion tables */
@media (max-width: 768px) {
  .range-filters {
    flex-direction: column;
    gap: 16px;
  }
  
  .range-group {
    min-width: 100%;
  }
  
  .valoracion-controls {
    gap: 16px;
  }
  
  .valoracion-controls.collapsed {
    padding: 0;
  }
  
  }

/* TEST 1: Check if the problem is sticky vs non-sticky context */
/* First, let's create a non-sticky version to compare */
#avanzada .states-table thead {
  background: linear-gradient(135deg, #1976d2, #42a5f5) !important;
  position: sticky !important;
  z-index: 10 !important;
}

/* FINAL SOLUTION: Viewport-wide gradient for sticky headers */
#avanzada .tab-content .states-table thead th::before,
#avanzada .states-table thead th::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  background-size: 100vw 100%; /* Use viewport width to cover any screen size */
  background-attachment: fixed; /* Keep gradient position fixed relative to viewport */
  z-index: -1;
}

#avanzada .tab-content .states-table thead th,
#avanzada .states-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  background: transparent !important;
  color: white !important;
}

/* Mobile: Sticky first column + header combination */
@media (max-width: 768px) {
  /* Sticky first column (horizontal scroll) - high specificity to override style.css */
  #avanzada .tab-content .states-table th:first-child,
  #avanzada .tab-content .states-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 4 !important; /* Higher than regular headers */
    max-width: 120px !important;
    width: 120px !important;
  }
  
  /* First column cells - ensure proper sticky positioning and background */
  #avanzada .tab-content .states-table tr:nth-of-type(even) td:first-child,
  #avanzada .tab-content .states-table tr:nth-of-type(odd) td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 4 !important;
  }
  
  /* First column header - combines both sticky behaviors (vertical + horizontal) */
  #avanzada .tab-content .states-table th:first-child {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    background: linear-gradient(135deg, #1976d2, #42a5f5) !important;
    color: white !important;
    z-index: 5 !important; /* Highest z-index for corner cell */
  }
  
  /* Visual indicator for sticky column */
  #avanzada .tab-content .states-table th:first-child::after,
  #avanzada .tab-content .states-table td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    box-shadow: 2px 0 4px rgba(0,0,0,0.15);
    z-index: 1;
  }
  
  /* Darker border for header */
  #avanzada .tab-content .states-table th:first-child::after {
    background: #1565c0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
  }
  
  #avanzada .tab-content .states-table td:first-child .jugador {
    position: static !important;
  }
}

/* User Teams Section - Compact horizontal cards for logged in users */
.user-teams-section {
  margin-bottom: 30px;
  margin-top: 20px;
}

.teams-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0;
}

.teams-header h2 {
  margin-bottom: 0;
}

.manage-teams-link {
  color: #1976d2;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.manage-teams-link:hover {
  text-decoration: underline;
  color: #1565c0;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: inline;
}

.teams-grid {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0 15px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

.teams-grid::-webkit-scrollbar {
  display: none;
}

.team-card {
  flex: 0 0 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.12);
  border-color: #1976d2;
  text-decoration: none;
  color: inherit;
}

.team-card-header {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: white;
  padding: 12px 15px;
  text-align: center;
}

.team-card-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card-body {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-stat {
  text-align: center;
  flex: 1;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1976d2;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  font-weight: 500;
}

/* Mobile responsiveness */
/* Enhanced Team Stats Cards */
.team-stat-card {
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-bottom: 10px;
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Team stat card stat-values - inline display for score-like values (10-5) */
.team-stat-card .stat-values {
    display: inline;
    align-items: center;
    justify-content: center;
    /* margin-bottom: 5px;*/
    white-space: nowrap;
    flex-wrap: nowrap;
}

.team-stat-card .stat-main {
    font-size: 16px;
    font-weight: bold;
    /* margin-bottom: 5px; */
    color: #333;
    white-space: nowrap;
}

.team-stat-card .stat-separator {
    margin: 0 4px;
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}

/* Rival display - simple inline layout */
.rival-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.rival-display i {
    color: #666;
    font-size: 14px;
}

.stat-subtext {
    font-size: 11px;
    color: #888;
    text-align: center;
}

.broker-value {
    font-size: 16px !important;
    color: #28a745;
}

/* Next Game Card - simplified */
.team-stat-card.next-game {
    border-left-color: #28a745;
}

/* Dual stats display styling - for user team cards in index.php */
.stat-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.stat-values .stat-value {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-values .total {
  color: #1976d2;
  font-weight: 700;
}

.stat-values .last {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.stat-values .negative {
  color: #d32f2f !important;
  font-weight: 700 !important;
}

.stat-values .positive {
  color: #2e7d32 !important;
  font-weight: 600 !important;
}

/* Responsive adjustments for team stat cards */
@media (max-width: 768px) {
  .team-stat-card {
    height: 75px;
    padding: 10px 8px;
  }
  
  .team-stat-card .stat-main {
    font-size: 16px;
  }
  
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .teams-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .team-card {
    flex: 0 0 180px;
  }
  
  .team-card-header h4 {
    font-size: 14px;
  }
  
  .stat-values .stat-value {
    font-size: 15px;
  }
  
  .stat-values .last {
    font-size: 13px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .teams-grid {
    gap: 12px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
  }
  
  .teams-header {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
  }
  
  .manage-teams-link {
    font-size: 12px;
    text-align: right;
  }
}

/* Próxima Jornada Section - Horizontal scrolling tables */
.proxima-jornada-section {
  margin-bottom: 30px;
  margin-top: 20px;
}

.proxima-tables-container {
  position: relative;
  overflow: hidden;
}

.proxima-tables-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0 20px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.proxima-tables-scroll::-webkit-scrollbar {
  display: none;
}

.proxima-table-wrapper {
  flex: 0 0 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 400px; /* Fixed height to ensure consistent alignment */
}

.proxima-table-header {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: white;
  padding: 12px 16px;
  text-align: center;
}

.proxima-table-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.proxima-table-wrapper .table-responsive {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}

.proxima-table {
  margin-bottom: 0;
  font-size: 12px;
  flex: none;
}

.proxima-table thead th {
  background: #f8f9fa;
  border: none;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  color: #666;
}

.proxima-table tbody td {
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 11px;
  vertical-align: middle;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proxima-table tbody tr:hover {
  background-color: #f8f9fa;
}

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

.proxima-table a {
  color: #333;
  text-decoration: none;
}

.proxima-table a:hover {
  color: #1976d2;
  text-decoration: underline;
}

/* Special styling for game links in Jornada table */
.proxima-table .game-link {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  margin: -8px -10px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.2s ease;
}

.proxima-table .game-link:hover {
  background-color: rgba(25, 118, 210, 0.1);
  color: #1976d2;
  text-decoration: none;
}

/* Center align for Jornada table */
.proxima-table .text-center {
  text-align: center;
  vertical-align: middle;
}

/* Table footer with "see more" links */
.proxima-table-footer {
  background: #f8f9fa;
  padding: 10px 12px;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  margin-top: auto; /* Push to bottom */
  flex-shrink: 0; /* Don't shrink */
}

.proxima-table-footer .manage-teams-link {
  font-size: 11px;
  display: block;
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.proxima-table-footer .manage-teams-link:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* Mobile specific - show peek of next table */
@media (max-width: 768px) {
  .proxima-tables-scroll {
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
  }
  
  .proxima-table-wrapper {
    flex: 0 0 calc(100vw - 60px); /* Almost full width but show peek of next */
    min-width: 280px;
    height: 350px; /* Slightly shorter on mobile */
  }
  
  .proxima-table-wrapper:last-child {
    margin-right: 30px; /* Extra margin for last table */
  }
  
  .proxima-table-header h4 {
    font-size: 13px;
  }
  
  .proxima-table {
    font-size: 11px;
  }
  
  .proxima-table thead th {
    /* font-size: 10px; */
    padding: 6px 8px;
  }
  
  .proxima-table tbody td {
    /* font-size: 10px; */
    padding: 6px 8px;
  }
}

/* Desktop - 4 tables in grid */
@media (min-width: 1200px) {
  .proxima-tables-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    overflow-x: visible;
  }
  
  .proxima-table-wrapper {
    flex: none;
  }
}

/* Medium desktop - 2x2 grid */
@media (min-width: 769px) and (max-width: 1199px) {
  .proxima-tables-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow-x: visible;
  }
  
  .proxima-table-wrapper {
    flex: none;
  }
}

@media (min-width: 1200px) {
  .proxima-3-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow-x: visible;
  }
}

/* Medium desktop - 3 tables in single row (might be tight) */
@media (min-width: 769px) and (max-width: 1199px) {
  .proxima-3-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    overflow-x: visible;
  }
  
  .proxima-3-tables .proxima-table-wrapper {
    flex: none;
  }
}

/* Position badges for Equipo ideal */
.position-badge {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  text-align: center;
  line-height: 15px;
  font-size: 11px;
  font-weight: bold;
  color: white;
  margin-right: 8px;
  vertical-align: middle;
}

.position-badge.base {
  background-color: #2E7D32; /* Dark Green for Bases */
}

.position-badge.alero {
  background-color: #1565C0; /* Dark Blue for Aleros */
}

.position-badge.pivot {
  background-color: #BF360C; /* Dark Orange/Red for Pívots */
}

/* Results table styling */
.team-link {
  /* display: inline-flex; */
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.team-link:hover {
  text-decoration: none;
  color: #007bff;
  transform: translateY(-1px);
}

.team-selection-table .team-link:hover {
  text-decoration: underline;
  transform: translateY(-1px);
}

.team-link:hover img {
  transform: scale(1.1);
}

.team-result.winner {
  /* background-color: rgba(40, 167, 69, 0.1);*/
  font-weight: bold;
}

.team-result.loser {
  opacity: 0.7;
}

.team-result.tie {
  background-color: rgba(255, 193, 7, 0.1);
  font-weight: bold;
}

.result-score {
  font-weight: bold;
  font-size: 12px !important;
}

.winning-score {
  color: #28a745;
  font-weight: bold;
}

.score-separator {
  margin: 0 4px;
  color: #666;
}

.team-name {
  white-space: nowrap;
}

/* Prevent word wrap for long player names */
.no-wrap {
  white-space: nowrap;
}

/* Specific rules for ideales table to prevent text wrapping and alignment issues */

.ideales-table td:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.ideales-table td:first-child .player-name-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 120px;
}

/* Totals section for Equipo ideal */
.ideales-totals {
  display: flex;
  justify-content: space-around;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  margin-top: 10px;
  border-radius: 0 0 8px 8px;
}

.ideales-totals .total-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 14px;
}

.total-item i {
  font-size: 16px;
  color: #007bff;
}

.total-item i.fa-trophy {
  color: #ffc107;
}

.total-item i.fa-money {
  color: #28a745;
}

/* Adjust height to fit all 10 players in Equipo ideal without making tables wider */
.proxima-table-wrapper {
  height: 500px; /* Increased height to accommodate 10 players + totals + headers + footer */
}

.proxima-table-wrapper .table-responsive {
  max-height: none; /* Remove height restriction to show all rows */
}

.proxima-table tbody td {
  padding: 6px 8px; /* Slightly reduce padding to fit more rows */
  vertical-align: middle;
}

.proxima-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (max-width: 768px) {
  .proxima-table-wrapper {
    height: 500px;
    overflow-y: auto;
  }
  
  .proxima-table tbody td {
    padding: 5px 6px;
  }
  
  .ideales-totals {
    padding: 12px 15px;
  }
  
  .total-item {
    font-size: 13px;
    gap: 6px;
  }
}

/* Last 5 Games Visual Component */
.last-games-container {
  width: 350px;
  flex-shrink: 0;
}

.last-games-flex {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2px;
  height: 100px;
}

.last-game-item {
  text-align: center;
  flex: 1;
}

.game-rival-info {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  gap: 4px;
}

.game-rival-info .fa-home {
  color: #28a745;
  font-size: 13px;
}

.game-rival-info .fa-plane {
  color: #007bff;
  font-size: 13px;
}

.game-team-shield, .game-rival-shield {
  width: 17px;
  height: 19px;
}

.game-team-name {
  font-size: 10px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.game-sm-bar-container {
  height: 50px;
  display: flex;
  align-items: end;
  justify-content: center;
  margin-bottom: 4px;
}

.game-sm-bar {
  width: 30px;
  height: 50px;
  background: #f8f9fa;
  border: 1px solid #adb5bd;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-sm-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.game-sm-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0 0 3px 3px;
  transition: all 0.3s ease;
}

.game-sm-value {
  font-size: 14px;
  font-weight: 600;
  background: transparent !important; /* Remove background from text */
}

/* SM Performance Colors - background for bars, color for text */
.sm-excellent {
  background: #28a745;
  color: #28a745;
}

.sm-very-good {
  background: #17a2b8;
  color: #17a2b8;
}

.sm-good {
  background: #007bff;
  color: #007bff;
}

.sm-regular {
  background: #ffc107;
  color: #ffc107;
}

.sm-bad {
  background: #dc3545;
  color: #dc3545;
}

/* Datos Curiosos 3-Table Layout */
/* Medium desktop - 3 tables in a row */
@media (min-width: 769px) and (max-width: 1199px) {
  .curiosos-section .proxima-tables-scroll {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop - 3 tables in a row */
@media (min-width: 1200px) {
  .curiosos-section .proxima-tables-scroll {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Team Selection Styles */
.team-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.team-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-add-team {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  font-weight: 600;
}

.btn-add-team:hover {
  background: linear-gradient(135deg, #218838, #1ba68c);
}

.btn-toggle-view {
  border: 2px solid #6c757d;
}

/* Enhanced Table View */
.team-selection-table {
  margin-bottom: 0;
}

/* Sticky first column - copying exactly from #avanzada pattern */
@media (max-width: 768px) {
  .team-selection-table th:first-child,
  .team-selection-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 4 !important;
    max-width: 120px !important;
    width: 120px !important;
  }
  
  .team-selection-table tr:nth-of-type(even) td:first-child,
  .team-selection-table tr:nth-of-type(odd) td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 4 !important;
    background: #fff !important;
  }
  
  .team-selection-table th:first-child {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    background: linear-gradient(135deg, #1976d2, #42a5f5) !important;
    color: white !important;
    z-index: 5 !important;
  }
  
  .team-selection-table th:first-child::after,
  .team-selection-table td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    box-shadow: 2px 0 4px rgba(0,0,0,0.15);
    z-index: 1;
  }
  
  .team-selection-table th:first-child::after {
    background: #1565c0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
  }
}

/* Actions column styling */
.actions-col {
  white-space: normal;
  text-align: center;
}

.actions-col .btn {
  margin: 1px;
  padding: 2px 6px;
  font-size: 11px;
  display: inline-block;
}

/* Card View - Horizontal Scroll */
.team-cards-scroll {
  display: flex !important;
  grid-template-columns: none !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #007bff #f1f3f4;
}

.team-cards-scroll::-webkit-scrollbar {
  height: 8px;
  display: block;
}

.team-cards-scroll::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 4px;
}

.team-cards-scroll::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 4px;
  transition: background 0.2s;
}

.team-cards-scroll::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}

.team-card.proxima-table-wrapper {
  flex: 0 0 280px;
  height: auto;
  min-height: auto;
}

.team-card-header.proxima-table-header {
  text-align: center;
  padding: 12px 16px;
}

.team-card-header .team-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white !important;
}

.team-card-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #6c757d;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.team-card-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feature-label {
  font-weight: 600;
  color: #6c757d;
  font-size: 13px;
}

.feature-value {
  font-weight: 600;
  font-size: 14px;
}

.feature-value.sm-value {
  color: #007bff;
}

.feature-value.broker-value.positive {
  color: #28a745;
}

.feature-value.broker-value.negative {
  color: #dc3545;
}

.team-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.secondary-actions {
  display: flex;
  gap: 6px;
}

.secondary-actions .btn {
  flex: 1;
  font-size: 11px;
  padding: 4px 6px;
}

/* Basketball Formation Visual */
.formation-toggle-section {
  margin-bottom: 20px;
  text-align: center;
}

.basketball-formation {
  margin-bottom: 30px;
}

.court-container {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.basketball-court {
  position: relative;
  background: linear-gradient(135deg, #f8f9fa, #fff);
  border-radius: 8px;
  min-height: 320px;
  border: 1px solid #dee2e6;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.court-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
}

.position-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  position: relative;
}

.bases-zone {
  background: rgba(46, 125, 50, 0.1);
  border: 2px solid rgba(46, 125, 50, 0.3);
  flex: 0.5;
}

.aleros-zone {
  background: rgba(21, 101, 192, 0.1);
  border: 2px solid rgba(21, 101, 192, 0.3);
  flex: 1;
}

.pivots-zone {
  background: rgba(191, 54, 12, 0.1);
  border: 2px solid rgba(191, 54, 12, 0.3);
  flex: 0.5;
}

.zone-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bases-zone .zone-label {
  color: #2E7D32;
  border: 2px solid #2E7D32;
}

.aleros-zone .zone-label {
  color: #1565C0;
  border: 2px solid #1565C0;
}

.pivots-zone .zone-label {
  color: #BF360C;
  border: 2px solid #BF360C;
}

.player-slot {
  flex: 1;
  min-width: 100px;
  max-width: 130px;
}

.player-card {
  background: white;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
  height: 75px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 12px;
}

.player-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.player-card.has-player {
  border-color: #dee2e6;
  background: #f8f9fa;
  color: #495057;
}

.player-card.has-player:hover {
  border-color: #007bff;
  background: #e3f2fd;
}

/* Formation Input Styling */
.player-input-container {
  position: relative;
  width: 100%;
}

.formation-input {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  word-wrap: break-word;
  resize: none;
}

.formation-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 3px 8px rgba(0,123,255,0.25);
  transform: translateY(-1px);
}

.formation-input::placeholder {
  color: #6c757d;
  font-size: 10px;
  font-weight: 500;
}

.position-label {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Fix alert spacing to prevent collision */
.team-guidance {
  margin-bottom: 20px;
}

.team-guidance + .formation-toggle-section {
  margin-top: 10px;
}

/* Add spacing between alerts */
.alert + .team-guidance {
  margin-top: 15px;
}

.col-md-12 .alert {
  margin-bottom: 15px;
  margin-top: 15px;
}

/* Team selection table improvements */
.team-name-link {
  color: #005a8c;
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

.team-name-link:hover {
  color: #007bff;
  text-decoration: none;
}

.team-name-col {
  text-align: left !important;
}

.btn-team-action {
  background-color: #5a8db8;
  border-color: #5a8db8;
  color: white;
  margin: 0 2px;
  min-width: 20px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-team-action:hover {
  background-color: #4a7ba8;
  border-color: #4a7ba8;
  color: white;
}

/* Striped table with sticky column fix */
@media (max-width: 768px) {
  .team-selection-table.table-striped tbody tr:nth-of-type(odd) .team-name-col {
    background-color: #f9f9f9 !important;
  }
  
  .team-selection-table.table-striped tbody tr:nth-of-type(even) .team-name-col {
    background-color: white;
  }
}

/* Planifica tus cambios table - sticky column striped fix for both desktop and mobile */
.states-table.table-striped tbody tr:nth-of-type(odd) .player-col.sticky-left {
  background-color: #f9f9f9 !important;
}

.states-table.table-striped tbody tr:nth-of-type(even) .player-col.sticky-left {
  background-color: white !important;
}

/* Tuequipo.php table sticky column for mobile */
@media (max-width: 768px) {
  .team-view-container .states-table .sticky-left {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
  }
  
  .team-view-container .states-table.table-striped tbody tr:nth-of-type(odd) .sticky-left {
    background-color: #f9f9f9 !important;
  }
  
  .team-view-container .states-table.table-striped tbody tr:nth-of-type(even) .sticky-left {
    background-color: white !important;
  }
  
  .team-view-container .states-table thead th.sticky-left {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
  }
  
  /* Estadísticas en directo table sticky column striped fix for mobile */
  #datos .states-table.table-striped tbody tr:nth-of-type(odd) .sticky-left {
    background-color: #f9f9f9 !important;
  }
  
  #datos .states-table.table-striped tbody tr:nth-of-type(even) .sticky-left {
    background-color: white !important;
  }
}

/* Improved Team Modal Styles */
/* Modal dialog sizing */
.modal-lg {
  max-width: 800px;
}

#teamModal .modal-dialog {
  margin-top: 10vh;
  margin-bottom: 5%;
}

.team-modal-improved {
  padding: 20px 15px;
  overflow: auto;
  max-height: 80vh;
}

.team-totals-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #007bff;
}

.totals-row {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.total-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.total-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.total-value {
  font-size: 18px;
  font-weight: 700;
}

.total-value.sm-value {
  color: #007bff;
}

.total-value.broker-value.positive {
  color: #28a745;
}

.total-value.broker-value.negative {
  color: #dc3545;
}

/* Substitution impact styling */
.substitution-impact {
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
}

.impact-label {
  font-size: 11px;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.impact-value {
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}

.impact-value.positive {
  color: #28a745;
}

.impact-value.negative {
  color: #dc3545;
}

.position-group {
  margin-bottom: 25px;
}

.position-header {
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.players-grid {
  gap: 15px;
}

.player-modal-card {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.player-header {
  margin-bottom: 12px;
}

.player-stats .main-stats {
  margin-bottom: 10px;
}

.player-stats .value.broker-value.positive {
  color: #28a745;
  font-weight: 600;
}

.player-stats .value.broker-value.negative {
  color: #dc3545;
  font-weight: 600;
}

.player-stats .value.sm-value {
  color: #007bff;
  font-weight: 600;
}

.secondary-stats {
  gap: 8px;
}

.player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.player-details {
  text-align: center;
}

.player-name {
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  margin-bottom: 2px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 32px;
  text-align: center;
}

.player-team {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 500;
}

.player-position {
  font-size: 11px;
  opacity: 0.9;
}

.player-team {
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.player-stats {
  margin-top: 4px;
  font-size: 10px;
}

.player-stats.loading {
  opacity: 0.7;
  font-style: italic;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.stat-label {
  opacity: 0.8;
}

.stat-value {
  font-weight: 600;
}

/* Modal z-index and positioning fix */
#playerModal {
  z-index: 9999 !important;
}

#playerModal .modal-dialog {
  margin-top: 5%;
  margin-bottom: 5%;
}

/* Autocomplete dropdown z-index fix */
.ui-autocomplete {
  z-index: 10000 !important;
}

.ui-menu {
  z-index: 10000 !important;
}

/* Player Preview Styling */
.player-preview-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

.player-preview-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 15px 20px;
  text-align: center;
}

.player-preview-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.player-preview-body {
  padding: 20px;
}

.player-basic-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f1f3f4;
}

.info-item {
  text-align: center;
  flex: 1;
}

.info-label {
  display: block;
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.stat-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.stat-card .stat-label {
  font-size: 11px;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.stat-card .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #495057;
}

.stat-card .stat-value.primary {
  color: #007bff;
}

.stat-card .stat-value.success {
  color: #28a745;
}

.stat-card .stat-value.danger {
  color: #dc3545;
}

/* Mobile responsive for player preview */
@media (max-width: 576px) {
  .player-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .stat-card {
    padding: 8px;
  }
  
  .stat-card .stat-value {
    font-size: 14px;
  }
  
  .player-basic-info {
    flex-direction: column;
    gap: 10px;
  }
}

/* Planning Table Styling */
.planning-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.planning-table {
  margin-bottom: 0;
  white-space: nowrap;
}


.planning-table td {
  padding: 10px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f4;
}

/* Planning table sticky left column */
#datos .sticky-left {
  position: sticky;
  left: 0;
  background: white;
  z-index: 10;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

#datos .states-table thead th.sticky-left {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: white;
}

/* Desktop striped table fix for #datos table */
#datos .states-table.table-striped tbody tr:nth-of-type(odd) .sticky-left {
  background-color: #f9f9f9 !important;
}

#datos .states-table.table-striped tbody tr:nth-of-type(even) .sticky-left {
  background-color: white !important;
}

/* Chart section styling */
.chart-subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.chart-subtitle a {
  color: #1976d2;
  text-decoration: none;
}

.chart-subtitle a:hover {
  text-decoration: underline;
}

/* Chart containers responsive spacing */
#datos, #datos2 {
  margin-bottom: 20px;
}

/* Table actions dropdown */
.actions-col .dropdown-toggle {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

.actions-col .dropdown-toggle:focus,
.actions-col .dropdown-toggle:active {
  outline: none !important;
  box-shadow: none !important;
}

.actions-col .dropdown-toggle:hover {
  color: #495057 !important;
}

.actions-col .dropdown-menu {
  min-width: 120px;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: 0.5rem 0;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

.actions-col .dropdown-item {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: block;
  width: 100%;
  clear: both;
  font-weight: 400;
  color: #212529;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
}

.actions-col .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #16181b;
}

.actions-col .dropdown-item i {
  margin-right: 10px;
  width: 16px;
  text-align: center;
  font-size: 14px;
}


@media (max-width: 768px) {
  #datos, #datos2 {
    margin-bottom: 20px;
  }
  
  .chart-container {
    height: 180px !important;
  }
}



.player-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.player-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Performance Timeline Styling */
.performance-timeline {
  margin: 20px 0;
}

.timeline-scroll {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 12px;
  scroll-behavior: smooth;
}

.gameweek-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  min-width: 280px;
  flex-shrink: 0;
}

.gameweek-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.gameweek-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
}

.gameweek-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.gameweek-content {
  padding: 16px;
}

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

.gameweek-stats-grid .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f8f9fa;
}

.gameweek-stats-grid .stat-label {
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  min-width: 40px;
  text-align: left;
}

.gameweek-stats-grid .stat-value {
  color: #495057;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  min-width: 30px;
}

.gameweek-features {
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
  margin-bottom: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feature-label {
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  min-width: 50px;
}

.feature-value {
  font-weight: 600;
  font-size: 16px;
}

.sm-value {
  color: #007bff;
}

.broker-value.positive {
  color: #28a745;
}

.broker-value.negative {
  color: #dc3545;
}

.feature-change {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.feature-change.positive {
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.feature-change.negative {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

.gameweek-actions {
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
}

.secondary-actions {
  margin-top: 8px;
  text-align: center;
}

/* Team Management Button Styling */
.team-creation-section,
.team-save-section {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  margin-top: 20px;
}

.team-submit-btn {
  font-weight: 600;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.team-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Team Guidance Styling */
.team-guidance {
  margin: 20px 0;
}

.team-guidance .alert {
  margin-bottom: 0;
  border-radius: 8px;
  border: none;
  padding: 16px 20px;
  font-size: 14px;
}

.team-guidance .alert-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left: 4px solid #2196f3;
  color: #1565c0;
}

.team-guidance .alert-success {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

@media (max-width: 768px) {
  .team-creation-section,
  .team-save-section {
    margin: 15px -15px 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  
  .team-submit-btn {
    padding: 16px 20px;
    font-size: 17px;
  }
}

.stat-item.secondary .stat-value {
  font-size: 16px;
  color: #6c757d;
}

.stat-item.secondary .stat-label {
  font-size: 10px;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.stat-change.positive {
  color: #28a745;
}

.stat-change.negative {
  color: #dc3545;
}

.gameweek-details {
  border-top: 1px solid #e9ecef;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.team-changes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.changes-section h5 {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-changes {
  font-size: 13px;
  line-height: 1.5;
}

.player-changes.in {
  color: #28a745;
}

.player-changes.out {
  color: #dc3545;
}

/* Season Summary Card */
.season-summary-card {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(0,123,255,0.3);
}

@media (max-width: 768px) {
  .season-summary-card {
    padding: 16px;
    margin: 15px 0;
  }
}

.season-summary-card h4 {
  margin: 0 0 20px 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-stats {
  display: grid;
  grid-template-columns: 2fr 2fr repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}

.summary-stat {
  text-align: center;
}

.summary-stat.main-summary {
  text-align: left;
  padding-left: 20px;
  border-left: 4px solid rgba(255,255,255,0.3);
}

.summary-stat .stat-value {
  color: white;
  font-size: 24px;
}

.main-summary .stat-value {
  font-size: 32px;
}

.broker-summary .stat-value {
  font-size: 28px;
}

.summary-stat.secondary .stat-value {
  font-size: 18px;
  opacity: 0.8;
}

.summary-stat.secondary .stat-label {
  font-size: 10px;
  opacity: 0.7;
}

.summary-stat .stat-label {
  color: rgba(255,255,255,0.8);
}

.summary-stat .stat-change {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline-scroll {
    margin: 0 -15px;
    border-radius: 0;
    padding: 10px 15px;
  }
  
  .gameweek-card {
    min-width: 260px;
  }
  
  .gameweek-content {
    padding: 12px;
  }
  
  .gameweek-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .gameweek-features {
    padding-top: 12px;
    margin-bottom: 12px;
  }
  
  .feature-value {
    font-size: 14px;
  }
  
  .gameweek-actions {
    padding-top: 12px;
  }
  
  .stat-item.main-stat {
    grid-column: 1 / -1;
    text-align: center;
    border-left: none;
    border-top: 4px solid #007bff;
    padding-left: 0;
    padding-top: 16px;
  }
  
  .summary-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .summary-stat.main-summary {
    grid-column: 1;
    text-align: center;
    border-left: none;
    border-top: 4px solid rgba(255,255,255,0.3);
    padding-left: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
  }
  
  .summary-stat.broker-summary {
    grid-column: 2;
    text-align: center;
    border-left: none;
    padding-left: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
  }
  
  .summary-stat.secondary {
    display: none;
  }
  
  .summary-stat.main-summary .stat-value {
    font-size: 24px;
  }
  
  .summary-stat.broker-summary .stat-value {
    font-size: 20px;
  }
  
  .summary-stat .stat-change {
    font-size: 10px;
    margin-top: 2px;
    white-space: nowrap;
    display: block;
  }
  
  .summary-stat .stat-value {
    font-size: 18px !important;
    white-space: nowrap;
    display: block;
    line-height: 1.2;
  }
  
  .summary-stat .stat-label {
    font-size: 10px;
    white-space: nowrap;
    display: block;
    margin-bottom: 4px;
    order: -1;
  }
  
  .team-changes {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Team Modal Styling */
#teamModal {
  z-index: 1060;
}

#teamModal .modal-header {
  position: relative;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
}

#teamModal .modal-header .close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #999;
  opacity: 1;
}

#teamModal .modal-header .close:hover {
  color: #333;
}

.team-modal-content {
  padding: 10px;
}

.position-group {
  margin-bottom: 25px;
}

.position-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.player-modal-card.player-signed {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.player-modal-card.player-sold {
  border-color: #dc3545;
  background: linear-gradient(135deg, #fff8f8 0%, #f8e8e8 100%);
}

.player-modal-card.status-played {
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.player-modal-card.status-zero {
  opacity: 0.7;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.player-modal-card.status-not-played {
  opacity: 0.5;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.player-name {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
  line-height: 1.3;
}

.change-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.change-badge.signed {
  background: #28a745;
  color: white;
}

.change-badge.sold {
  background: #dc3545;
  color: white;
}

.player-stats {
  margin-bottom: 10px;
}

.main-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.main-stats .stat-item {
  text-align: center;
  flex: 1;
}

.main-stats .value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 2px;
}

.main-stats .label {
  font-size: 11px;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
}

.secondary-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
}

.secondary-stats .stat {
  font-size: 11px;
  color: #6c757d;
}

.secondary-stats .stat span {
  font-weight: 600;
  color: #495057;
}

.player-price {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #28a745;
  padding-top: 8px;
  border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
  .players-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-dialog {
    margin: 10px;
  }
  
  .secondary-stats {
    justify-content: center;
    gap: 8px;
  }
}

.fixtures-col {
  text-align: left;
}

.fixtures-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fixture-item {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.fixture-item.home {
  background: #e8f5e8;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.fixture-item.away {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.position-col {
  text-align: center;
}


.broker-col {
  text-align: center;
  font-size: 11px;
}

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

/* Mobile enhancements */
@media (max-width: 768px) {
  .planning-table-container {
    margin: 0 -15px;
    border-radius: 0;
  }
  
  .planning-table th,
  .planning-table td {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  .fixtures-list {
    gap: 1px;
  }
  
  .fixture-item {
    font-size: 9px;
    padding: 1px 4px;
  }
}

.empty-slot {
  color: #6c757d;
  font-size: 12px;
}

.empty-slot i {
  font-size: 16px;
  margin-bottom: 5px;
  opacity: 0.6;
}

.empty-slot:hover {
  color: #495057;
}

/* Traditional Form Styling */
.traditional-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  margin-bottom: 30px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .court-container {
    padding: 15px;
  }
  
  .basketball-court {
    min-height: 350px;
    padding: 15px;
  }
  
  .position-zone {
    padding: 10px;
    margin: 8px 0;
  }
  
  .player-slot {
    min-width: 100px;
    max-width: 120px;
  }
  
  .player-card {
    padding: 8px;
    min-height: 60px;
  }
  
  .player-name {
    font-size: 12px;
  }
  
  .player-position {
    font-size: 10px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .team-selection-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .team-actions {
    justify-content: space-between;
  }
  
  .team-cards-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .team-card-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
  }
  
  .stat-value {
    font-size: 16px;
  }
}

/* Registration Form Styles */
.registration-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 20px;
  margin-top: 5px;
  margin-bottom: 20px;
}

.registration-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f8f9fa;
}

.registration-header h2 {
  color: #2c3e50;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.registration-header h2 i {
  color: #007bff;
  margin-right: 10px;
}

.registration-subtitle {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.registration-alert {
  border-radius: 8px;
  border: none;
  padding: 15px 20px;
  margin-bottom: 25px;
  font-size: 14px;
}

.registration-alert i {
  margin-right: 8px;
  font-size: 16px;
}

.registration-form {
  margin-top: 20px;
}

.registration-form .form-group {
  margin-bottom: 18px;
}

.registration-form label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 14px;
}

.registration-form label i {
  color: #007bff;
  margin-right: 6px;
  width: 16px;
}

.registration-form .form-control {
  height: 44px;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 10px 14px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.registration-form .form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.registration-form .form-text {
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
}

.terms-group {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
}

.terms-group .checkbox {
  margin: 0;
}

.terms-group label {
  font-size: 14px;
  color: #495057;
  padding-left: 35px;
  cursor: pointer;
  line-height: 1.4;
}

.terms-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.terms-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.form-actions {
  margin-top: 20px;
  margin-bottom: 20px;
}

.registration-submit {
  height: 45px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.registration-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.4);
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.registration-submit i {
  margin-right: 8px;
}

.registration-footer {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid #e9ecef;
}

.login-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-link, .forgot-link {
  color: #6c757d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 0;
}

.login-link:hover {
  color: #007bff;
  text-decoration: none;
}

.forgot-link:hover {
  color: #dc3545;
  text-decoration: none;
}

.login-link i, .forgot-link i {
  margin-right: 6px;
  font-size: 13px;
}

/* Responsive design for registration */
@media (max-width: 768px) {
  .registration-card {
    padding: 25px 20px;
    margin-top: 5px;
  }
  
  .registration-header h2 {
    font-size: 20px;
  }
  
  .registration-subtitle {
    font-size: 12px;
  }
  
  .registration-form .form-control {
    height: 44px;
    font-size: 14px;
  }
  
  .registration-submit {
    height: 40px;
    font-size: 14px;
  }
}

/* Terms of Service Page Styles */
.terms-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  margin-top: 20px;
  margin-bottom: 30px;
  overflow: hidden;
}

.terms-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.terms-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: white;
}

.terms-header h1 i {
  margin-right: 12px;
  opacity: 0.9;
}

.terms-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

.terms-content {
  padding: 40px;
}

.terms-section {
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
}

.terms-section:last-child {
  border-bottom: none;
}

.terms-section h2 {
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.terms-section h2 i {
  color: #007bff;
  margin-right: 8px;
  width: 20px;
}

.terms-section p {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 15px;
}

.terms-section ul {
  margin: 15px 0;
  padding-left: 0;
}

.terms-section li {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 25px;
  position: relative;
}

.terms-section li:before {
  content: "•";
  color: #007bff;
  font-weight: bold;
  position: absolute;
  left: 8px;
}

.company-info {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 15px 20px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
}

.company-info p {
  margin: 0;
  font-family: 'Roboto', monospace;
  font-size: 14px;
}

.contact-info {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 15px 0;
}

.contact-info p {
  margin: 0;
  font-size: 14px;
}

.terms-footer {
  background: #f8f9fa;
  padding: 25px 40px;
  border-top: 1px solid #e9ecef;
}

.terms-footer .alert {
  margin-bottom: 20px;
  border-radius: 8px;
}

.terms-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.terms-actions .btn {
  padding: 10px 20px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.terms-actions .btn i {
  margin-right: 6px;
}

/* Responsive terms page */
@media (max-width: 768px) {
  .terms-container {
    margin-top: 10px;
    border-radius: 8px;
  }
  
  .terms-header {
    padding: 20px 15px;
  }
  
  .terms-header h1 {
    font-size: 24px;
  }
  
  .terms-content {
    padding: 25px 20px;
  }
  
  .terms-section h2 {
    font-size: 18px;
  }
  
  .terms-footer {
    padding: 20px 15px;
  }
  
  .terms-actions {
    flex-direction: column;
  }
  
  .terms-actions .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Tuequipo.php Live Teams Page Styles */
.lideres-container {
  margin-top: 20px;
}

.lideres-grid {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.lideres-grid .lider-category {
  flex: 1;
  min-width: 0;
}

.lider-category {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.lider-category-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 12px 15px;
  text-align: center;
}

.lider-category-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.lider-category-content {
  padding: 0;
}

.lider-table {
  margin: 0;
  font-size: 13px;
}

.lider-table tbody tr {
  border-bottom: 1px solid #f8f9fa;
}

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

.lider-table td {
  padding: 8px 12px;
  border: none;
  vertical-align: middle;
}

.lider-table td:first-child {
  font-weight: 500;
}

.lider-table td:last-child {
  font-weight: 600;
  color: #007bff;
}

.lider-table a {
  color: #495057;
  text-decoration: none;
  transition: color 0.3s ease;
}

.lider-table a:hover {
  color: #007bff;
  text-decoration: none;
}

/* Prediction value styling */
.prediction-value {
  color: #6f42c1;
  font-weight: 600;
}

/* Live page specific team cards */
.team-cards-container .team-card .feature-item .prediction-value {
  color: #6f42c1;
}

/* Live page info section */
.live-page-info {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 15px;
  border-left: 4px solid #007bff;
}

.live-page-info p {
  margin: 0;
  font-size: 14px;
  color: #495057;
}

/* Responsive for líderes */
@media (max-width: 768px) {
  .lideres-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .lideres-grid {
    flex-wrap: nowrap;
    gap: 15px;
    min-width: fit-content;
    padding-bottom: 10px;
  }
  
  .lideres-grid .lider-category {
    flex: 0 0 250px;
    min-width: 250px;
  }
  
  .lider-category-header h4 {
    font-size: 13px;
  }
  
  .lider-table {
    font-size: 12px;
  }
  
  .lider-table td {
    padding: 6px 10px;
  }
}

/* Live stats table styling - compatible with sticky positioning */
.broker-positive {
    color: #28a745 !important;
    font-weight: bold;
}

.broker-negative {
    color: #dc3545 !important;
    font-weight: bold;
}

.broker-neutral {
    color: #6c757d !important;
}

#tabla_directo thead th:first-child {
    border-top-left-radius: 8px !important;
}

#tabla_directo thead th:last-child {
    border-top-right-radius: 8px !important;
}

.player-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    display: inline-block;
}

.jugador-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    max-width: 120px;
}

.jugador-desktop img {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.jugador-mobile {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: space-between;
    width: 100%;
}

.status-badge {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.status-badge.playing {
    background-color: transparent;
    color: #28a745;
    font-size: 12px;
}

.status-badge.finished {
    background-color: transparent;
    color: #6c757d;
    font-size: 12px;
}

.player-row[data-playing="1"] {
    background-color: #f8fff9 !important;
    border-left: 3px solid #28a745;
}

.sm-value {
    font-weight: bold;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.team-info img {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}


 