/* Modal Tournament Register - Classes Específicas */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.modal-container {
    border-radius: 25px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    width: 90%;
    max-width: 450px;
    max-height: 100%;
    position: relative;
    overflow-y: hidden;
    transform: scale(.95);
    transition: all 0.4s ease;
    border: 2px solid #FF00FF;
    background: linear-gradient(145deg, #2D2D44, #1A1A2E);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 15px 5px 5px;
    text-align: center;
    position: relative;
    background: linear-gradient(145deg, #2D2D44, #1A1A2E);
}

.modal-icon {
    font-size: 3rem;
    color: #FF00FF;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    color: #FFFFFF;
    font-size: 1.65rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 255, 0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.close-modal:hover {
    background: #FF00FF;
    transform: rotate(-45deg);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}

.modal-body {
    padding: 15px 20px;
    max-height: 50vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #2D2D44, #1A1A2E);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    border: 1px solid #00BFFF;
    margin: 8px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-input {
    position: absolute;
    left: 15px;
    color: #00BFFF;
    font-size: 1.2rem;
    z-index: 1;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

.retro-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #00BFFF;
    border-radius: 15px;
    background: rgba(45, 45, 68, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #FFFFFF;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.3),
        0 3px 8px rgba(0,0,0,0.2);
}

.retro-input:focus {
    outline: none;
    border-color: #00FF7F;
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.3),
        0 0 15px rgba(0, 255, 127, 0.5);
    background: rgba(45, 45, 68, 0.9);
}

.retro-input::placeholder {
    color: #CCCCCC;
    font-style: italic;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 25px;
    padding-block: 20px;
    background: linear-gradient(145deg, #2D2D44, #1A1A2E);
}

.login-btn {
    width: 65%;
    background: linear-gradient(135deg, #FF00FF, #00BFFF);
    border: none;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    padding: 18px 15px;
    border-radius: 50px;
    font-size: 1.02rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(255, 0, 255, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: auto;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(255, 0, 255, 0.6),
        0 0 20px rgba(0, 191, 255, 0.4);
}

.modal-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(0, 191, 255, 0.1) 0%, transparent 20%);
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

/* Container Principal da Escalação */
#escalacaoContainer {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #333;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

/* Título e Contador */
.escalacao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.escalacao-header p {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Grid de Membros */
.membros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
}

/* Estilo de cada Item (Card do Jogador) */
.member-item {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.member-item:hover {
    border-color: var(--disco-cyan);
    background: #222;
}

/* Quando o checkbox está marcado */
.member-item.selected {
    border-color: var(--disco-cyan);
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

/* Item travado (Capitão) */
.member-item.locked {
    background: #111;
    border-style: dashed;
    cursor: not-allowed;
    opacity: 0.9;
}

.member-item.locked span {
    color: var(--disco-cyan);
    font-weight: bold;
}

/* Checkbox Customizado */
.member-item input[type="checkbox"] {
    accent-color: var(--disco-cyan);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Texto do Nome */
.member-item span {
    font-size: 0.85rem;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar estilizada para a lista */
.membros-grid::-webkit-scrollbar {
    width: 4px;
}
.membros-grid::-webkit-scrollbar-thumb {
    background: var(--disco-cyan);
    border-radius: 10px;
}

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

/* Classes adicionais específicas do formulário */
.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-icon {
    color: #FFC107;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content h4 {
    color: #FFC107;
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.warning-content p {
    color: #FFFFFF;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsividade - CORRIGIDO para mobile */
@media (max-width: 1024px) {
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-icon {
        font-size: 2.5rem;
    }
    
    .modal-body {
        max-height: 60vh; /* Altura máxima de 60% da tela */
        overflow-y: auto;
        padding: 20px;
        justify-content: flex-start; /* Alinha conteúdo no topo */
        margin: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .input-wrapper {
        margin-bottom: 5px;
    }
    
    .retro-input {
        padding: 12px 12px 12px 45px;
        font-size: 0.9rem;
    }
    
    .icon-input {
        font-size: 1.1rem;
        left: 12px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        gap: 15px;
    }
    
    .login-btn {
        width: 85%;
        padding: 16px 20px;
        font-size: 0.95rem;
    }
    
    .warning-box {
        flex-direction: column;
        text-align: center;
        padding: 7px;
        margin: 10px 0;
    }
    
    .warning-icon {
        align-self: center;
        margin-bottom: 0;
    }
    
    .warning-content h4 {
        font-size: 0.95rem;
    }
    
    .warning-content p {
        font-size: 0.85rem;
    }
    
    .close-modal {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
        top: 15px;
        right: 15px;
    }
}

/* Estilos extras para telas muito pequenas */
@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        max-width: 350px;
        margin: 10px;
    }
    
    .modal-body {
        max-height: 65vh; /* Um pouco mais de altura em telas muito pequenas */
        padding: 15px;
    }
    
    .login-btn {
        width: 90%;
        padding: 14px 18px;
        font-size: 0.9rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
        padding: 0 10px;
    }
}