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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Evita el scroll horizontal */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e0e0e0;
  overflow-x: hidden; /* Evita el scroll horizontal */
  width: 100%;
  max-width: 100vw;
}

/* Utilidades */
.hidden {
  display: none !important;
}

/* Pantalla de Login */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header i {
  font-size: 3rem;
  color: #4fc3f7;
  margin-bottom: 20px;
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #e0e0e0;
}

.login-header p {
  color: #b0b0b0;
  margin-bottom: 30px;
}

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

.input-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #4fc3f7;
}

.input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
}

.input-group input:focus {
  outline: none;
  border-color: #4fc3f7;
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.input-group input::placeholder {
  color: #888;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(79, 195, 247, 0.3);
}

.login-options {
  margin-top: 20px;
  text-align: center;
}

.manage-passwords-btn {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.manage-passwords-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #4fc3f7;
  color: #4fc3f7;
  transform: translateY(-1px);
}

.manage-passwords-btn i {
  font-size: 13px;
}

/* Estilos para el modal de contraseñas */
.password-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.password-modal-overlay input {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.password-modal-overlay input:focus {
  outline: none;
  border-color: #4fc3f7;
  box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
}

.password-modal-overlay input::placeholder {
  color: #888;
}

.password-modal-overlay button {
  transition: all 0.3s ease;
}

.password-modal-overlay button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive para modal de contraseñas */
@media (max-width: 768px) {
  .password-modal-overlay {
    padding: 15px;
  }
  
  .password-modal-overlay > div {
    max-width: 90%;
    padding: 20px;
  }
  
  .password-modal-overlay h2 {
    font-size: 1.3rem;
  }
  
  .password-modal-overlay input {
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .login-options {
    margin-top: 15px;
  }
  
  .manage-passwords-btn {
    font-size: 13px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .password-modal-overlay {
    padding: 10px;
  }
  
  .password-modal-overlay > div {
    max-width: 95%;
    padding: 15px;
  }
  
  .password-modal-overlay h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .password-modal-overlay h3 {
    font-size: 1rem;
  }
  
  .password-modal-overlay button {
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  color: #e0e0e0;
  font-size: 1.8rem;
}

.header h1 i {
  color: #4fc3f7;
  margin-right: 10px;
}

.logout-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Agregar estilos para el sidebar */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 30px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header i {
  color: #4fc3f7;
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

.sidebar-header h3 {
  color: #e0e0e0;
  font-size: 1.2rem;
  margin: 0;
}

.sidebar nav ul {
  list-style: none;
  padding: 20px 0;
}

.sidebar nav li {
  margin: 0;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: #b0b0b0;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
  border-left-color: #4fc3f7;
}

.sidebar nav a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
  transform: translateY(-2px);
}

/* Main content ajustado para el sidebar */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  max-width: none;
  scroll-margin-top: 20px;
}

.main-header {
  margin-bottom: 40px;
  text-align: center;
}

.main-header h1 {
  font-size: 2.5rem;
  color: #e0e0e0;
  margin-bottom: 10px;
}

.main-header p {
  font-size: 1.1rem;
  color: #b0b0b0;
}

/* Sección de deportes */
.sports-section {
  margin-bottom: 60px;
}

.sports-section h2 {
  font-size: 2rem;
  color: #e0e0e0;
  text-align: center;
  margin-bottom: 40px;
}

/* Overview cards */
.players-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.overview-card {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 195, 247, 0.3);
}

.overview-card i {
  font-size: 3rem;
  color: #4fc3f7;
  margin-bottom: 20px;
}

.overview-card h3 {
  color: #e0e0e0;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.overview-card p {
  color: #b0b0b0;
  line-height: 1.6;
}

.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.sports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
  justify-items: center;
}

.sport-card {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  flex: 1;
  max-width: 350px;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sport-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(79, 195, 247, 0.3);
}

.sport-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #4fc3f7;
}

.sport-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #e0e0e0;
}

.sport-card p {
  color: #b0b0b0;
  line-height: 1.6;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.9) 0%, rgba(41, 182, 246, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
}

.sport-card:hover .card-overlay {
  opacity: 1;
}

/* Chat Section */
.chat-section {
  background: rgba(15, 52, 96, 0.3);
  padding: 60px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-section-container {
  max-width: 800px;
  margin: 0 auto;
}

.chat-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.chat-section-header h2 {
  font-size: 2.5rem;
  color: #e0e0e0;
  margin-bottom: 15px;
}

.chat-section-header h2 i {
  color: #4fc3f7;
  margin-right: 15px;
}

.chat-section-header p {
  font-size: 1.1rem;
  color: #b0b0b0;
}

.chat-interface {
    width: 90%;
    max-width: 1200px;
    height: 80vh; /* Aumentado de 70vh a 80vh */
    min-height: 500px; /* Reducido para mejor ajuste en pantallas pequeñas */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.chat-interface.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    z-index: 9999;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(15, 52, 96, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h3 {
    color: #e0e0e0;
    margin: 0;
    font-size: 1.1rem;
}

.chat-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    color: #4fc3f7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.control-btn:hover {
    background: rgba(79, 195, 247, 0.2);
    transform: translateY(-1px);
}

.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: rgba(15, 52, 96, 0.2);
    scrollbar-width: thin;
    scrollbar-color: #4fc3f7 rgba(255, 255, 255, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4fc3f7;
    border-radius: 10px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 16px;
    animation: fadeIn 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
    text-align: right;
}

.bot-message {
    justify-content: flex-start;
    text-align: left;
}

.message i {
    font-size: 20px;
    margin-top: 3px;
    color: #4fc3f7;
    min-width: 20px;
    flex-shrink: 0;
}

.message span {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    padding: 15px 22px; /* Aumentado el padding */
    border-radius: 18px;
    max-width: 85%;
    display: inline-block;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.user-message span {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.bot-message span {
    background: rgba(26, 26, 46, 0.6);
    border-color: rgba(79, 195, 247, 0.2);
    padding-left: 2vw;
}

/* Estilos para bloques de código */
.message .code-block {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 10px;
}

.message .code-block code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #f1f1f1;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-input-container {
    display: flex;
    align-items: center;
    padding: 25px 30px;
    background: rgba(15, 52, 96, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
}

.chat-input-container input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    transition: all 0.3s ease;
    min-width: 0;
}

.chat-input-container input:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.chat-input-container input::placeholder {
    color: #888;
}

.chat-input-container button {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
    border: none;
    padding: 0;
    width: 50px;
    height: 50px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
    flex-shrink: 0;
}

.chat-input-container button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
}

/* Responsive para el chat */
@media (max-width: 768px) {
    .chat-section {
        padding: 30px 15px;
    }
    
    .chat-section-header {
        margin-bottom: 25px;
    }
    
    .chat-section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .chat-section-header p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .chat-interface {
        width: 100%;
        height: 70vh;
        min-height: 450px;
        border-radius: 15px;
        margin: 0 auto;
    }
    
    .chat-interface.fullscreen {
        border-radius: 0;
        height: 100vh;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-header h3 {
        font-size: 1rem;
    }
    
    .control-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .message i {
        font-size: 16px;
        min-width: 16px;
    }
    
    .message span {
        max-width: 85%;
        font-size: 14px;
        padding: 12px 16px;
        border-radius: 15px;
        line-height: 1.4;
    }
    
    .bot-message span {
        padding-left: 16px;
    }
    
    .chat-input-container {
        padding: 15px;
        gap: 8px;
    }
    
    .chat-input-container input {
        font-size: 14px;
        padding: 12px 16px;
        border-radius: 20px;
    }
    
    .chat-input-container button {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

.mobile-header {
  display: none;
  flex-direction: column;
  background: rgba(26, 26, 46, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
}

.mobile-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 52, 96, 0.2);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #b0b0b0;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 60px;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: #4fc3f7;
  background: rgba(79, 195, 247, 0.1);
}

.mobile-nav a i {
  font-size: 18px;
  margin-bottom: 4px;
}

.mobile-nav a span {
  font-size: 11px;
  font-weight: 500;
}

.menu-btn {
  display: none; /* Ocultar el botón de menú hamburguesa */
}

.mobile-header h3 {
  color: #e0e0e0;
  font-size: 1.2rem;
  margin: 0;
}

/* Responsive para el sidebar */
@media (max-width: 1024px) {
  .sidebar {
    display: none; /* Ocultar sidebar en tablets y móviles */
  }

  .sidebar-overlay {
    display: none; /* Ocultar overlay */
  }

  .main-content {
    margin-left: 0;
    padding: 20px 15px;
    padding-top: 120px; /* Espacio para el header móvil con navbar */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mobile-header {
    display: flex;
  }

  .main-header {
    margin-top: 0;
    margin-bottom: 30px;
  }

  .main-header h1 {
    font-size: 2.2rem;
  }

  .main-header p {
    font-size: 1rem;
  }

  .sports-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
  }

  .sport-card {
    height: 250px;
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .sport-icon {
    font-size: 3rem;
  }

  .sport-card h3 {
    font-size: 1.3rem;
  }

  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
  }

  .overview-card {
    height: 240px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .overview-card h3 {
    font-size: 1.2rem;
  }

  .modal {
    max-width: 95%;
    margin: 20px;
    border-radius: 15px;
  }

  .chat-section {
    padding: 30px 15px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .chat-interface {
    width: 100%;
    max-width: 100%;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  max-width: 1000px; /* Aumentado de 600px a 1000px */
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlide 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  color: #e0e0e0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #b0b0b0;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #4fc3f7;
}

.modal-body {
  padding: 30px;
}

/* Estilos para el contenido extendido de los modales */
.sport-info {
  line-height: 1.8;
}

.sport-info h3 {
  color: #4fc3f7;
  margin: 30px 0 20px 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sport-info h3 i {
  font-size: 1.2rem;
}

.sport-info h4 {
  color: #e0e0e0;
  margin: 15px 0 10px 0;
  font-size: 1.1rem;
}

.sport-info p {
  margin-bottom: 20px;
  color: #b0b0b0;
  text-align: justify;
}

.sport-info ul {
  margin: 20px 0 20px 20px;
}

.sport-info li {
  margin-bottom: 12px;
  color: #b0b0b0;
  line-height: 1.6;
}

/* Estilos para contenido enriquecido de deportes */
.sport-intro {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.sport-intro h3 {
  color: white !important;
  margin-bottom: 15px;
  font-size: 1.8em;
}

.sport-intro p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.sport-rules {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

.sport-rules h3 {
  color: white !important;
  margin-bottom: 15px;
  font-size: 1.6em;
}

.sport-rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sport-rules li {
  margin-bottom: 12px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  border-left: 4px solid #fff;
  color: white !important;
  backdrop-filter: blur(10px);
}

.sport-competitions {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.sport-competitions h3 {
  color: white !important;
  margin-bottom: 15px;
  font-size: 1.6em;
}

.competition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.competition-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  border-left: 4px solid #fff;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.competition-item:hover {
  transform: translateY(-5px);
}

.competition-item h4 {
  color: white !important;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.competition-item p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9em;
  line-height: 1.4;
}

.sport-positions {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(67, 233, 123, 0.3);
}

.sport-positions h3 {
  color: white !important;
  margin-bottom: 15px;
  font-size: 1.6em;
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.position-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  border-left: 4px solid #fff;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.position-item:hover {
  transform: translateY(-5px);
}

.position-item h4 {
  color: white !important;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.position-item p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9em;
  line-height: 1.4;
}

.sport-benefits {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(250, 112, 154, 0.3);
}

.sport-benefits h3 {
  color: white !important;
  margin-bottom: 15px;
  font-size: 1.6em;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.benefit-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  text-align: center;
  border-left: 4px solid #fff;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-5px);
}

.benefit-item i {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: white;
}

.benefit-item h4 {
  color: white !important;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.benefit-item p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Responsive para modales enriquecidos */
@media (max-width: 768px) {
  .modal {
    width: 95%;
    margin: 20px auto;
    max-height: 85vh;
  }
  
  .modal-header {
    padding: 20px 20px 15px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .competition-grid,
  .positions-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .sport-intro h3 {
    font-size: 1.5em;
  }
  
  .sport-rules h3,
  .sport-competitions h3,
  .sport-positions h3,
  .sport-benefits h3 {
    font-size: 1.4em;
  }
  
  .sport-intro,
  .sport-rules,
  .sport-competitions,
  .sport-positions,
  .sport-benefits {
    padding: 20px;
  }
}

.sport-info li strong {
  color: #4fc3f7;
}

/* Grids para organizar contenido */
.competition-grid,
.benefits-grid,
.positions-grid,
.variants-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.competition-item,
.benefit-item,
.position-item,
.variant-item,
.skill-item {
  background: rgba(15, 52, 96, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.competition-item:hover,
.benefit-item:hover,
.position-item:hover,
.variant-item:hover,
.skill-item:hover {
  border-color: rgba(79, 195, 247, 0.3);
  transform: translateY(-3px);
}

.benefit-item i {
  color: #4fc3f7;
  font-size: 2rem;
  margin-bottom: 15px;
  display: block;
}

.sport-info {
  line-height: 1.8;
}

.sport-info h3 {
  color: #4fc3f7;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.sport-info p {
  margin-bottom: 20px;
  color: #b0b0b0;
}

.sport-info ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.sport-info li {
  margin-bottom: 8px;
  color: #b0b0b0;
}

/* Responsive */
@media (max-width: 768px) {
  .sports-grid {
    flex-direction: column;
    align-items: center;
  }

  .sport-card {
    max-width: 100%;
    width: 100%;
    padding: 30px;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .modal {
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .chat-section-header h2 {
    font-size: 2rem;
  }

  .chat-messages {
    height: 300px;
    padding: 20px;
  }

/* Responsive para el sidebar */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10001;
    width: 280px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 15px;
    padding-top: 80px;
  }

  .mobile-header {
    display: flex;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  .main-header {
    margin-top: 0;
    margin-bottom: 30px;
  }

  .main-header h1 {
    font-size: 2.2rem;
  }

  .main-header p {
    font-size: 1rem;
  }

  .sports-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .sport-card {
    height: 250px;
    padding: 25px;
  }

  .sport-icon {
    font-size: 3rem;
  }

  .sport-card h3 {
    font-size: 1.3rem;
  }

  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .overview-card {
    height: 240px;
    padding: 20px;
  }

  .overview-card h3 {
    font-size: 1.2rem;
  }

  .modal {
    max-width: 95%;
    margin: 20px;
    border-radius: 15px;
  }
}

/* Responsive móvil mejorado */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    width: 100%;
    max-width: 100vw;
  }

  .main-content {
    padding: 15px 10px;
    padding-top: 110px; /* Espacio para el header móvil con navbar */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .main-header {
    margin-bottom: 25px;
    padding: 0 5px;
  }

  .main-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .main-header p {
    font-size: 0.9rem;
  }

  .sports-section {
    margin-bottom: 40px;
    width: 100%;
    overflow-x: hidden;
  }

  .sports-section h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
  }

  .sports-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
  }

  .sport-card {
    max-width: 100%;
    width: 100%;
    height: 200px;
    padding: 20px;
    margin: 0;
  }

  .sport-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .sport-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .sport-card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .players-section {
    margin-bottom: 25px;
    width: 100%;
    overflow-x: hidden;
  }

  .players-section h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .players-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
  }

  .overview-card {
    height: 180px;
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .overview-card i {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }

  .overview-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .overview-card p {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .modal {
    width: 95%;
    max-width: 95%;
    margin: 15px;
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 20px 20px 15px;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 20px;
  }

  .close-btn {
    font-size: 1.3rem;
  }

  .competition-grid,
  .benefits-grid,
  .positions-grid,
  .variants-grid,
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .competition-item,
  .benefit-item,
  .position-item,
  .variant-item,
  .skill-item {
    padding: 15px;
    font-size: 0.9rem;
  }

  .benefit-item i {
    font-size: 1.5rem;
  }

  .chat-section {
    padding: 20px 10px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .chat-section-container {
    width: 100%;
    max-width: 100%;
  }

  .chat-interface {
    width: 100%;
    max-width: 100%;
    height: 70vh;
    min-height: 450px;
    border-radius: 15px;
    margin: 0;
  }
}

/* Pequeños dispositivos móviles */
@media (max-width: 480px) {
  .mobile-header-top {
    padding: 8px 12px;
  }

  .mobile-header-top h3 {
    font-size: 1rem;
  }

  .mobile-nav {
    padding: 8px 10px;
  }

  .mobile-nav a {
    padding: 6px 8px;
    min-width: 50px;
  }

  .mobile-nav a i {
    font-size: 16px;
  }

  .mobile-nav a span {
    font-size: 10px;
  }

  .main-content {
    padding: 10px 8px;
    padding-top: 100px;
  }

  .main-header h1 {
    font-size: 1.5rem;
  }

  .main-header p {
    font-size: 0.85rem;
  }

  .sports-section h2 {
    font-size: 1.4rem;
  }

  .players-section h2 {
    font-size: 1.4rem;
  }

  .sport-card {
    height: 180px;
    padding: 15px;
  }

  .sport-icon {
    font-size: 2rem;
  }

  .sport-card h3 {
    font-size: 1.1rem;
  }

  .sport-card p {
    font-size: 0.8rem;
  }

  .overview-card {
    height: 160px;
    padding: 12px;
  }

  .overview-card i {
    font-size: 2rem;
  }

  .overview-card h3 {
    font-size: 1rem;
  }

  .overview-card p {
    font-size: 0.8rem;
  }

  .chat-interface {
    height: 65vh;
    min-height: 400px;
  }

  .chat-messages {
    padding: 12px;
  }

  .message span {
    font-size: 13px;
    padding: 10px 14px;
  }

  .chat-input-container {
    padding: 12px;
  }

  .chat-input-container input {
    font-size: 13px;
    padding: 10px 14px;
  }

  .chat-input-container button {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .modal {
    margin: 10px;
    max-height: 95vh;
  }

  .modal-header {
    padding: 15px 15px 10px;
  }

  .modal-body {
    padding: 15px;
  }
}

/* Mejoras generales para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .sport-card:hover {
    transform: none;
  }

  .sport-card:active {
    transform: scale(0.98);
  }

  .overview-card:hover {
    transform: none;
  }

  .overview-card:active {
    transform: scale(0.98);
  }

  .control-btn:hover {
    transform: none;
  }

  .control-btn:active {
    transform: scale(0.95);
  }

  .menu-btn:hover {
    background-color: transparent;
  }

  .menu-btn:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Estilos para mejorar la legibilidad en móviles */
@media (max-width: 768px) {
  /* Mejorar el contraste y legibilidad */
  .message span {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .bot-message span {
    background: rgba(26, 26, 46, 0.85);
    border-color: rgba(79, 195, 247, 0.25);
  }

  /* Optimizar el scroll en móviles */
  .chat-messages {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Mejorar los botones en móviles */
  .chat-input-container button {
    min-width: 42px;
    min-height: 42px;
    touch-action: manipulation;
  }

  .control-btn {
    min-height: 32px;
    touch-action: manipulation;
  }

  .menu-btn {
    min-width: 40px;
    min-height: 40px;
    touch-action: manipulation;
  }

  /* Optimizar las cards para touch */
  .sport-card, .overview-card {
    touch-action: manipulation;
    user-select: none;
  }

  /* Mejorar el sidebar en móviles */
  .sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  .sidebar nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    touch-action: manipulation;
  }

  /* Mejorar el modal en móviles */
  .modal {
    touch-action: manipulation;
  }

  .modal-overlay {
    touch-action: manipulation;
  }
}

section {
  scroll-margin-top: 40px;
}

.players-section {
  margin-bottom: 40px;
  text-align: center;
}

.players-section h2 {
  font-size: 2rem;
  color: #e0e0e0;
  margin-bottom: 20px;
}}