/* ==========================================
   PERFIL.CSS - ESTILOS DE LA TARJETA DE INVOCADOR
   ========================================== */

/* 1. CONTENEDOR DE AVATAR (Lógica de cambio) */
.avatar-container-large {
    position: relative;
    width: 180px;
    height: 180px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #d4af37; /* Color directo para evitar fallos de variable */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transition: 0.3s;
    margin: 0 auto 20px auto;
    z-index: 1;
}

.avatar-container-large:hover { 
    transform: scale(1.05); 
    box-shadow: 0 0 25px #d4af37; 
}

#profile-img-large { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.change-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    padding: 8px 0;
    text-align: center;
    opacity: 0;
    transition: 0.3s;
}

.avatar-container-large:hover .change-photo-overlay { 
    opacity: 1; 
}

/* 2. BLOQUES DE REGISTROS (Columna Derecha) */
.perfil-registro-bloque {
    margin-bottom: 20px;
    border-left: 2px solid rgba(212, 175, 55, 0.2);
    padding-left: 15px;
}

.registro-titulo {
    font-size: 0.7rem !important;
    color: #d4af37;
    letter-spacing: 2px;
    margin-bottom: 8px !important;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    opacity: 0.8;
}

.folder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    margin-bottom: 5px;
}

.folder-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: #d4af37;
}

.folder-item span {
    font-size: 0.8rem;
    color: #eee;
    font-family: 'Cinzel', serif;
}

/* 3. BOTÓN PORTAL AL SANTUARIO (Entrar al Santuario / Volver al Portal) */
.btn-dorado-perfil {
    background: linear-gradient(to bottom, #d4af37, #b8860b);
    color: #000;
    border: 1px solid #fff;
    padding: 12px 25px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: 0.3s;
    letter-spacing: 1px;
    width: 100%;
    margin-top: 10px;
    text-align: center;
    display: inline-block;
}

.btn-dorado-perfil:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px #d4af37;
    transform: translateY(-2px);
}

/* 4. MODAL DE GALERÍA DE AVATARES */
.avatar-gallery {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid #d4af37;
    padding: 30px;
    z-index: 9999; /* Por encima de todo */
    box-shadow: 0 0 100px #000;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

/* Scrollbar mística para la galería */
.avatar-grid::-webkit-scrollbar { width: 5px; }
.avatar-grid::-webkit-scrollbar-thumb { background: #d4af37; border-radius: 10px; }

.avatar-option {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    object-fit: cover;
}

.avatar-option:hover { 
    border-color: #d4af37; 
    transform: scale(1.1); 
    box-shadow: 0 0 10px #d4af37;
}

/* Estilo para los botones de Abortar / Cancelar en edición */
.btn-abortar-match {
    background: #8b1a1a !important;
    color: #fff !important;
    border: 1px solid #d4af37 !important;
    font-family: 'Cinzel', serif;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-abortar-match:hover {
    background: #ff0000 !important;
    box-shadow: 0 0 15px #ff0000;
}