/* ===== ESTILOS PROFESIONALES PARA TODOS LOS MODALES ===== */

/* Estilos base para todos los modales */
.professional-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.professional-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

/* Header profesional para todos los modales */
.professional-modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
}

.professional-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.professional-modal-icon {
    background: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.professional-modal-title-text h3 {
    color: #333;
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
}

.professional-modal-title-text p {
    color: #555;
    margin: 0;
    font-size: 1em;
}

.professional-modal-close {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.3em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.professional-modal-close:hover {
    transform: scale(1.1);
    background: #c0392b;
}

/* Contenido del modal */
.professional-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: calc(90vh - 100px);
}

/* Botones profesionales */
.professional-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
}

.professional-btn:hover {
    transform: translateY(-2px);
}

.professional-btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.professional-btn-primary:hover {
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.professional-btn-secondary {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    color: white;
}

.professional-btn-secondary:hover {
    box-shadow: 0 6px 12px rgba(102, 102, 102, 0.4);
}

.professional-btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.professional-btn-danger:hover {
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

/* Contenedor de botones */
.professional-btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #444;
}

/* Inputs profesionales */
.professional-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #444;
    background: #333;
    color: white;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.professional-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    outline: none;
}

/* Labels profesionales */
.professional-label {
    color: #ffd700;
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: bold;
}

/* Scrollbars personalizados */
.professional-modal ::-webkit-scrollbar {
    width: 8px;
}

.professional-modal ::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.professional-modal ::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

.professional-modal ::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

.professional-modal {
    animation: fadeInUp 0.3s ease-out;
}

/* Efectos hover para elementos interactivos */
.professional-hover {
    transition: all 0.3s ease;
}

.professional-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Gradientes de fondo para secciones */
.professional-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid #444;
}

/* Badges profesionales */
.professional-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.professional-badge-primary {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.professional-badge-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.professional-badge-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Grid layouts profesionales */
.professional-grid {
    display: grid;
    gap: 15px;
}

.professional-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.professional-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.professional-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive design */
@media (max-width: 768px) {
    .professional-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .professional-btn {
        min-width: 120px;
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .professional-modal-header {
        padding: 8px 12px;
    }

    .professional-modal-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .professional-modal-title-text h3 {
        font-size: 1.1em;
    }

    .professional-modal-title-text p {
        font-size: 0.85em;
    }

    .professional-modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.1em;
    }
}

/* Efectos especiales */
.professional-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.professional-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Estilos para notificaciones */
.professional-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    animation: fadeInUp 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.professional-notification.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.professional-notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.professional-notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.professional-notification.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* ===== ESTILOS UNIFICADOS PARA LOS 3 MODALES PRINCIPALES ===== */
/* Referrals, Leaderboard y Lottery - Diseño Profesional Unificado */

/* Modal de Referrals */
#referralModal.professional-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#referralModal.professional-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

#referralModal .professional-modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
}

#referralModal .professional-modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#referralModal .professional-modal-icon {
    background: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#referralModal .professional-modal-title-text h3 {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
}

#referralModal .professional-modal-title-text p {
    color: #555;
    margin: 5px 0 0 0;
    font-size: 1em;
}

#referralModal .professional-modal-close {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#referralModal .professional-modal-close:hover {
    transform: scale(1.1);
    background: #c0392b;
}

#referralModal .professional-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Modal de Leaderboard */
#leaderboardModal.professional-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#leaderboardModal.professional-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

#leaderboardModal .professional-modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
}

#leaderboardModal .professional-modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#leaderboardModal .professional-modal-icon {
    background: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#leaderboardModal .professional-modal-title-text h3 {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
}

#leaderboardModal .professional-modal-title-text p {
    color: #555;
    margin: 5px 0 0 0;
    font-size: 1em;
}

#leaderboardModal .professional-modal-close {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#leaderboardModal .professional-modal-close:hover {
    transform: scale(1.1);
    background: #c0392b;
}

#leaderboardModal .professional-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Lista del leaderboard con diseño profesional */
#leaderboardModal #leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#leaderboardModal #leaderboard-list li {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

#leaderboardModal #leaderboard-list li:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

#leaderboardModal #leaderboard-list li:last-child {
    margin-bottom: 0;
}

.leaderboard-pos {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaderboard-user {
    flex: 1;
    font-weight: 600;
    color: #fff;
    margin: 0 15px;
}

.leaderboard-power {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Medallas para el leaderboard */
.leaderboard-gold .leaderboard-pos {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    animation: goldPulse 2s infinite;
}

.leaderboard-silver .leaderboard-pos {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    animation: silverPulse 2s infinite;
}

.leaderboard-bronze .leaderboard-pos {
    background: linear-gradient(135deg, #cd7f32, #e8b86b);
    animation: bronzePulse 2s infinite;
}

@keyframes goldPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes silverPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes bronzePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Modal de Lottery */
#lotteryModal.professional-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none !important;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#lotteryModal.professional-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 1800px !important;
    width: 95% !important;
    min-width: 1600px !important;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
    margin: 0 auto;
}

#lotteryModal .professional-modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
}

#lotteryModal .professional-modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#lotteryModal .professional-modal-icon {
    background: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#lotteryModal .professional-modal-title-text h3 {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
}

#lotteryModal .professional-modal-title-text p {
    color: #555;
    margin: 5px 0 0 0;
    font-size: 1em;
}

#lotteryModal .professional-modal-close {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#lotteryModal .professional-modal-close:hover {
    transform: scale(1.1);
    background: #c0392b;
}

/* Cuando el modal esté visible, aplicar flexbox para centrar */
#lotteryModal.professional-modal[style*="display: block"],
#lotteryModal.professional-modal[style*="display: flex"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* FORZAR ancho del modal en todas las pantallas */
#lotteryModal.professional-modal-content {
    max-width: 1800px !important;
    width: 95% !important;
    min-width: 1600px !important;
}

#lotteryModal .professional-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Máquina de slots - estilos movidos a lottery_fixes.css */

/* Botones de lottery - estilos movidos a lottery_fixes.css */

/* Premios de lottery - estilos movidos a lottery_fixes.css */

/* ===== RESPONSIVE DESIGN PARA LOS 3 MODALES ===== */

@media (max-width: 768px) {

    /* Modales en móviles */
    #referralModal.professional-modal-content,
    #leaderboardModal.professional-modal-content,
    #lotteryModal.professional-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }

    /* Lottery modal - estilos movidos a lottery_fixes.css */

    #referralModal .professional-modal-header,
    #leaderboardModal .professional-modal-header,
    #lotteryModal .professional-modal-header {
        padding: 15px;
    }

    #referralModal .professional-modal-icon,
    #leaderboardModal .professional-modal-icon,
    #lotteryModal .professional-modal-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #referralModal .professional-modal-title-text h3,
    #leaderboardModal .professional-modal-title-text h3,
    #lotteryModal .professional-modal-title-text h3 {
        font-size: 1.3em;
    }

    #referralModal .professional-modal-close,
    #leaderboardModal .professional-modal-close,
    #lotteryModal .professional-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }

    #referralModal .professional-modal-body,
    #leaderboardModal .professional-modal-body,
    #lotteryModal .professional-modal-body {
        padding: 20px;
        max-height: calc(95vh - 100px);
    }

    /* Slot machine responsive - estilos movidos a lottery_fixes.css */
}

@media (max-width: 480px) {

    /* Modales en pantallas muy pequeñas */
    #referralModal.professional-modal-content,
    #leaderboardModal.professional-modal-content,
    #lotteryModal.professional-modal-content {
        width: 98%;
        max-height: 98vh;
        margin: 5px;
        border-radius: 15px;
    }

    #referralModal .professional-modal-header,
    #leaderboardModal .professional-modal-header,
    #lotteryModal .professional-modal-header {
        padding: 12px;
        border-radius: 15px 15px 0 0;
    }

    #referralModal .professional-modal-title-text h3,
    #leaderboardModal .professional-modal-title-text h3,
    #lotteryModal .professional-modal-title-text h3 {
        font-size: 1.1em;
    }

    #referralModal .professional-modal-body,
    #leaderboardModal .professional-modal-body,
    #lotteryModal .professional-modal-body {
        padding: 15px;
        max-height: calc(98vh - 80px);
    }

    /* Slot machine extra small - estilos movidos a lottery_fixes.css */
}

/* Modal de lottery - configuración movida a lottery_fixes.css */

/* ===== ESTILOS PARA TEMA CLARO ===== */

/* Tema claro para todos los modales */
body:not([data-theme="dark"]) .professional-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
}

body:not([data-theme="dark"]) .professional-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom-color: #dee2e6 !important;
}

body:not([data-theme="dark"]) .professional-modal-icon {
    background: #6c757d !important;
    color: #f8f9fa !important;
}

body:not([data-theme="dark"]) .professional-modal-title-text h3 {
    color: #212529 !important;
}

body:not([data-theme="dark"]) .professional-modal-title-text p {
    color: #6c757d !important;
}

body:not([data-theme="dark"]) .professional-modal-close {
    background: #dc3545 !important;
    color: white !important;
}

body:not([data-theme="dark"]) .professional-modal-close:hover {
    background: #c82333 !important;
}

/* Tema claro específico para modal de Referrals */
body:not([data-theme="dark"]) #referralModal.professional-modal-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

body:not([data-theme="dark"]) #referralModal .professional-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body:not([data-theme="dark"]) #referralModal .professional-modal-icon {
    background: #ffc107 !important;
    color: #212529 !important;
}

/* Tema claro específico para modal de Leaderboard */
body:not([data-theme="dark"]) #leaderboardModal.professional-modal-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

body:not([data-theme="dark"]) #leaderboardModal .professional-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body:not([data-theme="dark"]) #leaderboardModal .professional-modal-icon {
    background: #ffc107 !important;
    color: #212529 !important;
}

body:not([data-theme="dark"]) #leaderboardModal #leaderboard-list li {
    background: rgba(255, 215, 0, 0.1) !important;
    color: #212529 !important;
    border-color: rgba(255, 215, 0, 0.3) !important;
}

body:not([data-theme="dark"]) .leaderboard-pos {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    color: white !important;
}

body:not([data-theme="dark"]) .leaderboard-user {
    color: #212529 !important;
}

body:not([data-theme="dark"]) .leaderboard-power {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

/* Tema claro específico para modal de Lottery */
body:not([data-theme="dark"]) #lotteryModal.professional-modal-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

body:not([data-theme="dark"]) #lotteryModal .professional-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body:not([data-theme="dark"]) #lotteryModal .professional-modal-icon {
    background: #ffc107 !important;
    color: #212529 !important;
}

/* Tema oscuro para lottery prizes - mejorado */
body[data-theme="dark"] .lottery-prizes {
    background: rgba(255, 215, 0, 0.05) !important;
    border-color: rgba(255, 215, 0, 0.2) !important;
}

body[data-theme="dark"] .lottery-prizes h3 {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

body[data-theme="dark"] .prize-item {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #ffffff !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

body[data-theme="dark"] .prize-item:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    border-color: #ffed4e !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-2px) !important;
}

body[data-theme="dark"] .prize-name {
    color: #ffffff !important;
}

body[data-theme="dark"] .prize-chance {
    background: rgba(255, 215, 0, 0.2) !important;
    color: #ffd700 !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
}

/* FORZAR tema oscuro para slot machine en lottery modal - estilos movidos a lottery_fixes.css */



/* Tema oscuro para slot machine - estilos movidos a lottery_fixes.css */

/* ===== MODALES PROFESIONALES - CREATE TEAM, TEAMS Y EDIT TEAM ===== */

/* Modal Create Team - Diseño Profesional */
#createTeamModal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#createTeamModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    max-width: 1200px !important;
    width: 90% !important;
    max-height: 90vh !important;
    height: 90vh !important;
    border: 3px solid #ffd700 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideInUp 0.4s ease-out !important;
}

/* Create Team modal header - usar estilos generales */

/* Estilos adicionales para todos los headers de modales */
#createTeamModal .modal-header,
#teamsModal .modal-header,
#editTeamModal .modal-header,
#teamModal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* FORZAR COLOR AMARILLO EN HEADERS - MÁXIMA ESPECIFICIDAD */
body #teamsModal .modal-header,
html #teamsModal .modal-header,
#teamsModal.modal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
}

#createTeamModal .modal-title,
#teamsModal .modal-title,
#editTeamModal .modal-title,
#teamModal .modal-title {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#createTeamModal .modal-title h3,
#teamsModal .modal-title h3,
#editTeamModal .modal-title h3,
#teamModal .modal-title h3 {
    color: #2c5aa0;
    margin: 0 0 3px 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#createTeamModal .modal-title p,
#teamsModal .modal-title p,
#editTeamModal .modal-title p,
#teamModal .modal-title p {
    color: #555;
    margin: 0;
    font-size: 0.9em;
    font-weight: 500;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

#createTeamModal .modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#createTeamModal .modal-title h3 {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#createTeamModal .modal-title p {
    color: #555;
    margin: 5px 0 0 0;
    font-size: 1em;
    font-weight: 500;
}

#createTeamModal .modal-close {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

#createTeamModal .modal-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#createTeamModal .modal-close:hover::before {
    left: 100%;
}

/* Estilos adicionales para todos los botones de cerrar */
#createTeamModal .modal-close,
#teamsModal .modal-close,
#editTeamModal .modal-close,
#teamModal .modal-close {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

#createTeamModal .modal-close:hover,
#teamsModal .modal-close:hover,
#editTeamModal .modal-close:hover,
#teamModal .modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

#createTeamModal .modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

#createTeamModal .modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

#createTeamModal .form-group {
    margin-bottom: 25px;
}

#createTeamModal .form-label {
    color: #ffd700;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
    position: relative;
}

#createTeamModal .form-label::before {
    content: '🏀';
    margin-right: 8px;
    font-size: 0.9em;
}

#createTeamModal .form-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #444;
    background: #333;
    color: white;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

#createTeamModal .form-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    outline: none;
}

#createTeamModal .form-select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    background: #333;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

#createTeamModal .form-select:focus {
    border-color: #ffed4e;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    outline: none;
}

#createTeamModal .sort-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

#createTeamModal .sort-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
    animation: shimmer 4s infinite;
    pointer-events: none;
}

#createTeamModal .player-list {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    max-height: 300px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid #444;
    backdrop-filter: blur(5px);
    position: relative;
}

#createTeamModal .player-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.05) 50%, transparent 70%);
    animation: shimmer 5s infinite;
    pointer-events: none;
    border-radius: 12px;
}

#createTeamModal .form-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #444;
}

#createTeamModal .btn-save {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 160px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

#createTeamModal .btn-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#createTeamModal .btn-save:hover::before {
    left: 100%;
}

#createTeamModal .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

/* Modal Teams - Diseño Profesional */
#teamsModal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#teamsModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    max-width: 900px !important;
    width: 90% !important;
    max-height: 90vh !important;
    height: 90vh !important;
    border: 3px solid #ffd700 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideInUp 0.4s ease-out !important;
}

#teamsModal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Teams modal header - usar estilos generales */

#teamsModal .modal-title {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#teamsModal .modal-close {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

#teamsModal .modal-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#teamsModal .modal-close:hover::before {
    left: 100%;
}

#teamsModal .modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

#teamsModal .modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

#teamsModal .teams-list {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #444;
    backdrop-filter: blur(5px);
}

/* Estilos para las tarjetas de equipos */
#teamsModal .team-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#teamsModal .team-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* Modal Edit Team - Diseño Profesional */
#editTeamModal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.3s ease-out;
}

#editTeamModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.4s ease-out;
}

#editTeamModal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#editTeamModal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

#editTeamModal .modal-title {
    color: #333;
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#editTeamModal .modal-close {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#editTeamModal .modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

#editTeamModal .modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Estilos para formularios del modal Edit Team */
#editTeamModal .form-group {
    margin-bottom: 25px;
}

#editTeamModal .form-label {
    color: #ffd700;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
    position: relative;
}

#editTeamModal .form-label::before {
    content: '✏️';
    margin-right: 8px;
    font-size: 0.9em;
}

#editTeamModal .form-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #444;
    background: #333;
    color: white;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

#editTeamModal .form-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    outline: none;
    transform: scale(1.02);
}

#editTeamModal .btn-save {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 160px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

#editTeamModal .btn-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#editTeamModal .btn-save:hover::before {
    left: 100%;
}

/* Estilos para listas de jugadores del modal Edit Team */
#editTeamModal .player-list {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    max-height: 400px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid #444;
    backdrop-filter: blur(5px);
    position: relative;
}

#editTeamModal .player-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.05) 50%, transparent 70%);
    animation: shimmer 5s infinite;
    pointer-events: none;
    border-radius: 12px;
}

/* Modal My Players (teamModal) - Usar estilos generales */

#teamModal .fusion-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.4);
}

/* Modal My Players (teamModal) - Usar estilos generales */

/* Modal My Players (teamModal) - Estilos básicos */
#teamModal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#teamModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    max-width: 1200px !important;
    width: 90% !important;
    max-height: 90vh !important;
    border: 3px solid #ffd700 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 90vh !important;
}

#teamModal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

#teamModal .modal-title h3 {
    color: #2c5aa0 !important;
    margin: 0 0 2px 0 !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) !important;
}

#teamModal .modal-title p {
    color: #555 !important;
    margin: 0 !important;
    font-size: 0.65em !important;
    font-weight: 500 !important;
}

#teamModal .fusion-button {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#teamModal .sort-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#teamModal .sort-label {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#teamModal .sort-select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    background: #333;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#teamModal .player-list {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 15px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 12px !important;
    border: 1px solid #444 !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* ===== ESTILOS FORZADOS PARA EL HEADER DEL MODAL MY PLAYERS ===== */
/* Asegurar que el header ocupe todo el ancho */
#teamModal .modal-header {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0 0 0 !important;
    padding: 15px 20px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
}

/* ===== ESTILOS FORZADOS PARA CREATE TEAM Y TEAMS ===== */
/* Asegurar que el header ocupe todo el ancho */
#createTeamModal .modal-header,
#teamsModal .modal-header {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0 0 0 !important;
    padding: 15px 20px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
}

/* Asegurar que el modal-content no tenga padding que interfiera */
#teamModal .modal-content {
    padding: 0 !important;
    overflow: hidden !important;
}

/* Asegurar que el modal-content de Create Team y Teams no tenga padding que interfiera */
#createTeamModal .modal-content,
#teamsModal .modal-content {
    padding: 0 !important;
    overflow: hidden !important;
}

/* Asegurar que el modal-body tenga el padding correcto y scroll funcional */
#teamModal .modal-body {
    padding: 20px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* Asegurar que el modal-body de Create Team y Teams tenga el padding correcto */
#createTeamModal .modal-body,
#teamsModal .modal-body {
    padding: 20px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* ===== ESTILOS MÓVILES PARA TODOS LOS MODALES ===== */

/* Media queries para dispositivos móviles */
@media (max-width: 768px) {

    /* Modales generales en móvil */
    #createTeamModal.modal,
    #teamsModal.modal,
    #editTeamModal.modal,
    #teamModal.modal {
        padding: 10px;
    }

    #createTeamModal .modal-content,
    #teamsModal .modal-content,
    #editTeamModal .modal-content,
    #teamModal .modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
        border-radius: 15px;
        border-width: 2px;
    }

    #createTeamModal .modal-header,
    #teamsModal .modal-header,
    #editTeamModal .modal-header,
    #teamModal .modal-header {
        padding: 15px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    #createTeamModal .modal-title,
    #teamsModal .modal-title,
    #editTeamModal .modal-title,
    #teamModal .modal-title {
        flex-direction: column;
        gap: 5px;
        flex: 1;
        margin-right: 10px;
    }

    #createTeamModal .modal-title h3,
    #teamsModal .modal-title h3,
    #editTeamModal .modal-title h3,
    #teamModal .modal-title h3 {
        font-size: 1.2em !important;
    }

    #createTeamModal .modal-title p,
    #teamsModal .modal-title p,
    #editTeamModal .modal-title p,
    #teamModal .modal-title p {
        font-size: 0.8em !important;
    }

    #createTeamModal .modal-close,
    #teamsModal .modal-close,
    #editTeamModal .modal-close,
    #teamModal .modal-close {
        padding: 10px 15px;
        min-width: 120px;
        font-size: 0.9em;
        border-radius: 8px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
        flex-shrink: 0;
        z-index: 10;
        position: relative;
    }

    #createTeamModal .modal-body,
    #teamsModal .modal-body,
    #editTeamModal .modal-body,
    #teamModal .modal-body {
        padding: 20px;
    }

    /* Formularios en móvil */
    #createTeamModal .form-group,
    #editTeamModal .form-group {
        margin-bottom: 20px;
    }

    #createTeamModal .form-label,
    #editTeamModal .form-label,
    #teamModal .sort-label {
        font-size: 1em;
        margin-bottom: 8px;
    }

    #createTeamModal .form-input,
    #editTeamModal .form-input {
        padding: 12px;
        font-size: 1em;
    }

    #createTeamModal .form-select,
    #editTeamModal .form-select,
    #teamModal .sort-select {
        padding: 10px 12px;
        min-width: 100%;
        font-size: 0.95em;
    }

    /* Contenedores de ordenamiento en móvil */
    #createTeamModal .sort-container,
    #teamModal .sort-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }

    #createTeamModal .sort-container label,
    #teamModal .sort-container label {
        margin-bottom: 5px;
    }

    /* Botones en móvil */
    #createTeamModal .btn-save,
    #editTeamModal .btn-save,
    #teamModal .fusion-button {
        padding: 12px 20px;
        min-width: 140px;
        font-size: 0.95em;
    }

    /* Listas de jugadores en móvil */
    #createTeamModal .player-list,
    #editTeamModal .player-list,
    #teamModal .player-list {
        padding: 10px;
        max-height: 250px;
    }

    /* Form actions en móvil */
    #createTeamModal .form-actions,
    #editTeamModal .form-actions {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* Media queries para dispositivos muy pequeños */
@media (max-width: 480px) {

    #createTeamModal.modal,
    #teamsModal.modal,
    #editTeamModal.modal,
    #teamModal.modal {
        padding: 5px;
    }

    #createTeamModal .modal-content,
    #teamsModal .modal-content,
    #editTeamModal .modal-content,
    #teamModal .modal-content {
        width: 98%;
        border-radius: 10px;
        border-width: 1px;
    }

    #createTeamModal .modal-header,
    #teamsModal .modal-header,
    #editTeamModal .modal-header,
    #teamModal .modal-header {
        padding: 12px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    #createTeamModal .modal-close,
    #teamsModal .modal-close,
    #editTeamModal .modal-close,
    #teamModal .modal-close {
        padding: 8px 12px;
        min-width: 100px;
        font-size: 0.8em;
        border-radius: 6px;
    }

    #createTeamModal .modal-title h3,
    #teamsModal .modal-title h3,
    #editTeamModal .modal-title h3,
    #teamModal .modal-title h3 {
        font-size: 1.0em !important;
    }

    #createTeamModal .modal-title p,
    #teamsModal .modal-title p,
    #editTeamModal .modal-title p,
    #teamModal .modal-title p {
        font-size: 0.7em !important;
    }

    #createTeamModal .modal-body,
    #teamsModal .modal-body,
    #editTeamModal .modal-body,
    #teamModal .modal-body {
        padding: 15px;
    }

    #createTeamModal .form-input,
    #editTeamModal .form-input {
        padding: 10px;
        font-size: 0.95em;
    }

    #createTeamModal .form-select,
    #editTeamModal .form-select,
    #teamModal .sort-select {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    #createTeamModal .btn-save,
    #editTeamModal .btn-save,
    #teamModal .fusion-button {
        padding: 10px 15px;
        min-width: 120px;
        font-size: 0.9em;
    }

    /* Botones de cerrar optimizados para móvil */
    #createTeamModal .modal-close,
    #teamsModal .modal-close,
    #editTeamModal .modal-close,
    #teamModal .modal-close {
        padding: 10px 16px;
        min-width: 130px;
        font-size: 0.9em;
        border-radius: 6px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* ===== SCROLLBARS PERSONALIZADOS PARA TODOS LOS MODALES ===== */

/* Scrollbar para listas de jugadores */
#createTeamModal .player-list::-webkit-scrollbar,
#editTeamModal .player-list::-webkit-scrollbar,
#teamModal .player-list::-webkit-scrollbar {
    width: 8px;
}

#createTeamModal .player-list::-webkit-scrollbar-track,
#editTeamModal .player-list::-webkit-scrollbar-track,
#teamModal .player-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#createTeamModal .player-list::-webkit-scrollbar-thumb,
#editTeamModal .player-list::-webkit-scrollbar-thumb,
#teamModal .player-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

#createTeamModal .player-list::-webkit-scrollbar-thumb:hover,
#editTeamModal .player-list::-webkit-scrollbar-thumb:hover,
#teamModal .player-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

/* Scrollbar para selects */
#createTeamModal .form-select::-webkit-scrollbar,
#teamModal .sort-select::-webkit-scrollbar {
    width: 6px;
}

#createTeamModal .form-select::-webkit-scrollbar-track,
#teamModal .sort-select::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

#createTeamModal .form-select::-webkit-scrollbar-thumb,
#teamModal .sort-select::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 3px;
}

/* ===== ANIMACIONES Y EFECTOS ADICIONALES ===== */

/* Efectos de hover para botones */
#createTeamModal .btn-save:hover,
#editTeamModal .btn-save:hover,
#teamModal .fusion-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* Efectos de focus mejorados */
#createTeamModal .form-input:focus,
#editTeamModal .form-input:focus,
#teamModal .sort-select:focus {
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Sombras y efectos de profundidad */
#createTeamModal .sort-container,
#teamModal .sort-container {
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

#createTeamModal .sort-container:hover,
#teamModal .sort-container:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

/* Tema claro para los modales */
body:not([data-theme="dark"]) #createTeamModal .modal-content,
body:not([data-theme="dark"]) #teamsModal .modal-content,
body:not([data-theme="dark"]) #editTeamModal .modal-content,
body:not([data-theme="dark"]) #teamModal .modal-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

body:not([data-theme="dark"]) #createTeamModal .modal-header,
body:not([data-theme="dark"]) #teamsModal .modal-header,
body:not([data-theme="dark"]) #editTeamModal .modal-header,
body:not([data-theme="dark"]) #teamModal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body:not([data-theme="dark"]) #createTeamModal .modal-title,
body:not([data-theme="dark"]) #teamsModal .modal-title,
body:not([data-theme="dark"]) #editTeamModal .modal-title,
body:not([data-theme="dark"]) #teamModal .modal-title {
    color: #212529 !important;
}

body:not([data-theme="dark"]) #createTeamModal .form-label,
body:not([data-theme="dark"]) #teamModal .sort-label {
    color: #fd7e14 !important;
}

body:not([data-theme="dark"]) #createTeamModal .form-input,
body:not([data-theme="dark"]) #createTeamModal .form-select,
body:not([data-theme="dark"]) #teamModal .sort-select {
    background: #ffffff !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

body:not([data-theme="dark"]) #createTeamModal .form-input:focus,
body:not([data-theme="dark"]) #createTeamModal .form-select:focus,
body:not([data-theme="dark"]) #teamModal .sort-select:focus {
    border-color: #fd7e14 !important;
    box-shadow: 0 0 15px rgba(253, 126, 20, 0.3) !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA EL CENTRO DE JUEGO ===== */

/* Modal del centro de juego */
/* ===== MODAL DEL CENTRO DE JUEGO - ESTILOS INDEPENDIENTES ===== */
#gameCenterModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

#gameCenterModal .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 25px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    min-height: 400px;
    max-height: 95vh;
    border: 3px solid #ffd700;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: auto;
    text-align: center;
    animation: slideInUp 0.4s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    margin: 0 auto;
}

#gameCenterModal h2 {
    color: #ffd700;
    font-size: 2.2em;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
    display: block;
}

/* Display del partido */
#modalMatchDisplay {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid #3498db;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    min-height: 300px;
}

/* Mostrar matchDisplay cuando el modal esté activo */
#gameCenterModal.active #modalMatchDisplay {
    display: block !important;
}

/* Asegurar que el matchDisplay sea visible cuando el modal esté abierto */
#gameCenterModal[style*="display: flex"] #modalMatchDisplay {
    display: block !important;
}

/* Asegurar que el matchDisplay sea visible cuando el modal esté abierto con display flex */
#gameCenterModal[style*="display: flex"] #modalMatchDisplay,
#gameCenterModal.active #modalMatchDisplay {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#modalMatchDisplay.live {
    border-color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
    animation: pulse 2s infinite;
}

#modalMatchDisplay .match-title {
    color: #ecf0f1 !important;
    font-size: 1.5em !important;
    margin-bottom: 20px !important;
    font-weight: bold !important;
    text-align: center !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    width: 100% !important;
    display: block !important;
}

/* Display del marcador */
#modalScoreDisplay {
    font-size: 3.2em !important;
    font-weight: bold !important;
    color: #ffd700 !important;
    margin: 20px auto !important;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    letter-spacing: 2px !important;
    width: 100% !important;
    display: block !important;
}

#modalScoreDisplay.flash {
    animation: glow 0.5s ease-in-out;
}

/* Display del tiempo */
#modalTimeDisplay {
    font-size: 1.6em !important;
    font-weight: bold !important;
    color: #e74c3c !important;
    margin: 12px auto !important;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5) !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}

/* Contenedor del tiempo */
#modalMatchDisplay>div:has(#modalTimeDisplay) {
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Log del partido */
#modalMatchLog {
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin: 20px auto !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    text-align: left !important;
    border: 1px solid #555 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
    min-height: 100px !important;
}

#modalMatchLog div {
    color: #ecf0f1 !important;
    margin: 6px 0 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 0.95em !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
}

#modalMatchLog div:first-child {
    background: rgba(52, 152, 219, 0.3) !important;
    border-left: 3px solid #3498db !important;
    animation: slideInRight 0.3s ease-out !important;
}

/* Botón de cerrar */
#closeGameCenterModalBtn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 1.1em !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    min-width: 140px !important;
    margin: 15px auto 0 auto !important;
    display: block !important;
}

#closeGameCenterModalBtn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.5) !important;
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    letter-spacing: 1.5px !important;
}

/* Estilos para botón deshabilitado durante partido */
#closeGameCenterModalBtn:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
    pointer-events: none !important;
}

#closeGameCenterModalBtn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.5 !important;
}

/* Estilos adicionales para botón durante partido */
#closeGameCenterModalBtn[style*="background-color: #6c757d"] {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Clase específica para botón deshabilitado durante partido */
#closeGameCenterModalBtn.disabled-during-match {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
}

#closeGameCenterModalBtn.disabled-during-match:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
}

/* Estilos para el tiempo - mejor espaciado */
.time-display {
    color: #ffd700 !important;
    font-weight: bold !important;
    font-size: 1.6em !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
    margin-left: 0px !important;
    padding-left: 0px !important;
}

.time-container {
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 12px 0 !important;
}

#modalMatchDisplay>div:has(#modalTimeDisplay) {
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 12px 0 !important;
}

/* Estilos específicos para el contenedor del tiempo */
#modalMatchDisplay .time-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0px !important;
    margin: 12px 0 !important;
    white-space: nowrap !important;
    font-size: 1.2em !important;
}

#modalMatchDisplay .time-container span:first-child {
    margin-right: 0px !important;
    padding-right: 0px !important;
}

#modalMatchDisplay .time-container .time-display {
    margin-left: 0px !important;
    padding-left: 0px !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA CENTRADO PERFECTO ===== */
#gameCenterModal[style*="display: flex"] {
    justify-content: center;
    align-items: center;
}

#gameCenterModal .modal-content {
    position: relative;
    margin: 0 auto;
}

/* Animaciones específicas para el partido */
@keyframes matchPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
    }

    50% {
        box-shadow: 0 0 30px rgba(231, 76, 60, 0.8);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#modalMatchDisplay.live {
    animation: matchPulse 2s infinite;
}

/* Responsive design para el centro de juego */
@media (max-width: 768px) {
    #gameCenterModal {
        padding: 15px;
    }

    #gameCenterModal .modal-content {
        width: 100%;
        padding: 20px;
        max-width: 100%;
        max-height: 100%;
    }

    #gameCenterModal h2 {
        font-size: 1.8em;
        margin-bottom: 15px;
        text-align: center;
    }

    #modalScoreDisplay {
        font-size: 2.5em;
        margin: 15px auto;
        text-align: center;
    }

    #modalMatchDisplay {
        padding: 15px;
        margin: 10px auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #modalMatchLog {
        max-height: 160px;
        padding: 12px;
        margin: 15px auto;
        width: 100%;
    }

    #modalTimeDisplay {
        font-size: 1.4em;
        margin: 10px auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #gameCenterModal {
        padding: 10px;
    }

    #gameCenterModal .modal-content {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
    }

    #gameCenterModal h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
        text-align: center;
    }

    #modalScoreDisplay {
        font-size: 2.2em;
        margin: 12px auto;
        text-align: center;
    }

    #modalMatchDisplay {
        padding: 12px;
        margin: 8px auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #modalMatchLog {
        max-height: 140px;
        padding: 10px;
        margin: 12px auto;
        width: 100%;
    }

    #modalTimeDisplay {
        font-size: 1.3em;
        margin: 8px auto;
        text-align: center;
    }
}

/* ===== ESTILOS PARA EL MODAL DE SELECCIÓN DE EQUIPOS DE LIGA ===== */

/* Modal de selección de equipos */
#leagueTeamModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

#leagueTeamModal .modal-content {
    background: var(--color-card, #ffffff);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    border: 3px solid #ffd700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

#leagueTeamModal h2 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Tema oscuro para el modal de selección de equipos */
body[data-theme="dark"] #leagueTeamModal .modal-content {
    background: var(--color-card);
    color: var(--color-text);
}

body[data-theme="dark"] #leagueInfo {
    background: rgba(35, 43, 62, 0.8);
    border-color: var(--color-card-border);
    color: var(--color-text);
}

body[data-theme="dark"] #teamSelectionList {
    background: transparent;
    color: var(--color-text);
}

body[data-theme="dark"] .team-selection-item {
    background: var(--color-card-player);
    border-color: var(--color-card-border);
    color: var(--color-text);
}

body[data-theme="dark"] .team-selection-item .team-name {
    color: var(--color-text);
}

body[data-theme="dark"] .team-selection-item .team-stats {
    color: var(--color-secondary-text);
}

body[data-theme="dark"] .team-selection-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

body[data-theme="dark"] .team-selection-item.selected {
    border-color: var(--color-primary);
    background: rgba(34, 197, 94, 0.2);
}

body[data-theme="dark"] .team-selection-item.selected .team-name,
body[data-theme="dark"] .team-selection-item.selected .team-stats {
    color: var(--color-text);
}

/* Elementos del modal de equipos */
#leagueInfo {
    background: #f7f7f7;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #e3e3e3;
    box-shadow: none;
}

#teamSelectionList {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e6e6e6;
}

/* Elementos de selección de equipo */
.team-selection-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e6e6e6;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.team-selection-item:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.team-selection-item.selected {
    border-color: #27ae60;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.15);
    background: #eaf8ef;
}

.team-selection-item .team-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #222222;
    margin-bottom: 5px;
}

.team-selection-item .team-stats {
    font-size: 0.9em;
    color: #666666;
}

.team-selection-item.selected .team-name,
.team-selection-item.selected .team-stats {
    color: white;
}

/* Botones del modal */
#confirmLeagueTeamBtn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#confirmLeagueTeamBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

#confirmLeagueTeamBtn:disabled {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive design para el modal de equipos */
@media (max-width: 768px) {
    #leagueTeamModal .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    #leagueTeamModal h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    #leagueInfo {
        padding: 12px;
        margin: 10px 0;
        font-size: 0.9em;
    }

    #teamSelectionList {
        max-height: 50vh;
        overflow-y: auto;
        padding: 10px;
    }

    .team-selection-item {
        padding: 12px;
        margin: 8px 0;
    }

    .team-selection-item .team-name {
        font-size: 1.1em;
    }

    .team-selection-item .team-stats {
        font-size: 0.85em;
    }

    #confirmLeagueTeamBtn {
        padding: 10px 20px;
        font-size: 1em;
        margin: 10px 5px;
    }
}

@media (max-width: 480px) {
    #leagueTeamModal {
        padding: 10px;
    }

    #leagueTeamModal .modal-content {
        width: 98%;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 15px;
    }

    #leagueTeamModal h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    #leagueInfo {
        padding: 10px;
        margin: 8px 0;
        font-size: 0.85em;
        border-radius: 8px;
    }

    #teamSelectionList {
        max-height: 45vh;
        overflow-y: auto;
        padding: 8px;
        border-radius: 8px;
    }

    .team-selection-item {
        padding: 10px;
        margin: 6px 0;
        border-radius: 8px;
    }

    .team-selection-item .team-name {
        font-size: 1em;
        margin-bottom: 3px;
    }

    .team-selection-item .team-stats {
        font-size: 0.8em;
    }

    #confirmLeagueTeamBtn {
        padding: 8px 16px;
        font-size: 0.9em;
        margin: 8px 3px;
        border-radius: 8px;
    }

    /* Botón de cancelar también */
    #leagueTeamModal .modal-content button {
        padding: 8px 16px;
        font-size: 0.9em;
        margin: 8px 3px;
        border-radius: 8px;
    }
}

/* ===== ESTILOS FORZADOS PARA TODOS LOS MODALES ===== */
#teamModal.modal .modal-header,
#createTeamModal.modal .modal-header,
#teamsModal.modal .modal-header,
#editTeamModal.modal .modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    padding: 15px 20px !important;
    min-height: 60px !important;
    max-height: 80px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

#teamModal.modal .modal-title h3,
#createTeamModal.modal .modal-title h3,
#teamsModal.modal .modal-title h3,
#editTeamModal.modal .modal-title h3 {
    color: #2c5aa0 !important;
    font-size: 1.6em !important;
    margin: 0 0 3px 0 !important;
}

#teamModal.modal .modal-title p,
#createTeamModal.modal .modal-title p,
#teamsModal.modal .modal-title p,
#editTeamModal.modal .modal-title p {
    color: #555 !important;
    font-size: 0.9em !important;
    margin: 0 !important;
}