﻿/* ====== BODY GENERAL ====== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f0ff;
    color: #3a0ca3;
    margin: 0;
    padding: 0;
}

/* ====== TITULOS ====== */
.titulo-perfiles {
    text-align: center;
    font-size: 2rem;
    margin: 20px 0;
    color: #6a0dad;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

/* ====== BOTONES ====== */
.btn-agregar, .btn-guardar, .btn-cancelar, .btn-detalles, .btn-eliminar {
    cursor: pointer;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    transition: all 0.3s ease;
    min-width: 100px; /* Misma base para detalles y eliminar */
    text-align: center;
}

/* Botones principales */
.btn-agregar {
    background: linear-gradient(90deg, #a626d3, #6f2dbd);
    color: #fff;
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.4);
}

    .btn-agregar:hover {
        background: linear-gradient(90deg, #8c1bb5, #5a1a93);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(106, 13, 173, 0.5);
    }

.btn-guardar {
    background: linear-gradient(90deg, #9d4edd, #7b2cbf);
    color: #fff;
}

    .btn-guardar:hover {
        background: linear-gradient(90deg, #7b2cbf, #5a189a);
        transform: translateY(-2px);
    }

.btn-cancelar {
    background: #e63946;
    color: #fff;
}

    .btn-cancelar:hover {
        background: #d62828;
        transform: translateY(-2px);
    }

/* Botones de acciones de tarjeta */
.btn-detalles, .btn-eliminar {
    min-width: 80px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
}

.btn-detalles {
    background: #9d4edd;
}

    .btn-detalles:hover {
        background: #7b2cbf;
        transform: translateY(-2px);
    }

.btn-eliminar {
    background: #ff4d6d;
}

    .btn-eliminar:hover {
        background: #d43f5a;
        transform: translateY(-2px);
    }

/* ====== ESTADO DE TEXTO ====== */
.estado {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 20px;
    color: #6a0dad;
}

/* ====== CONTENEDORES ====== */
.contenedor-perfiles, .contenedor-perfil-detalle {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-items: center;
}

.contenedor-comentarios {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

/* ====== TARJETAS ====== */
.tarjeta-perfil, .tarjeta-perfil-detalle {
    background: linear-gradient(145deg, #f0e5ff, #d9b3ff);
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(106, 13, 173, 0.3);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 300px;
}

    .tarjeta-perfil:hover, .tarjeta-perfil-detalle:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(106, 13, 173, 0.5);
    }

/* ====== FOTO DE PERFIL ====== */
.foto-perfil {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #6a0dad;
}

/* ====== FORMULARIOS ====== */
.form-crear-perfil {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #d9b3ff, #f0e5ff);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.3);
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

    .form-group label {
        display: block;
        font-weight: bold;
        color: #6a0dad;
        margin-bottom: 5px;
    }

    .form-group input, .form-group textarea {
        width: 100%;
        padding: 10px;
        border: 2px solid #cdb4db;
        border-radius: 8px;
        outline: none;
        transition: border-color 0.3s;
    }

        .form-group input:focus, .form-group textarea:focus {
            border-color: #9d4edd;
        }

/* ====== PREVIEW DE IMAGEN ====== */
.preview-img {
    display: block;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 10px;
    border: 2px solid #6a0dad;
}

/* ====== SUBTITULOS ====== */
.subtitulo {
    margin-top: 30px;
    color: #6a0dad;
    font-weight: bold;
}

/* ====== TARJETAS DE COMENTARIO ====== */
.tarjeta-comentario {
    background: #f3e5ff;
    border-left: 4px solid #6a0dad;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(106, 13, 173, 0.2);
    position: relative;
}

/* Botón eliminar comentario dentro de la tarjeta */
.btn-eliminar-com {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #ff4d6d;
    font-size: 1rem;
    cursor: pointer;
}

    .btn-eliminar-com:hover {
        color: #d43f5a;
    }

/* ====== CONTENEDOR PRINCIPAL ====== */
.perfil-detalle-principal {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: #f3f0ff;
    min-height: 100vh;
}

/* Tarjeta unificada que contiene todo */
.tarjeta-perfil-unificada {
    width: 100%;
    max-width: 700px;
    background: linear-gradient(145deg, #f0e5ff, #d9b3ff);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(106, 13, 173, 0.3);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Información del perfil */
.info-perfil {
    text-align: center;
}

    .info-perfil .foto-perfil {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #6a0dad;
        margin-bottom: 15px;
    }

/* Formulario de comentario */
.form-comentario {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .form-comentario textarea {
        width: 100%;
        padding: 10px;
        border: 2px solid #cdb4db;
        border-radius: 8px;
        outline: none;
        resize: vertical;
        transition: border-color 0.3s;
    }

        .form-comentario textarea:focus {
            border-color: #9d4edd;
        }

/* Lista de comentarios */
.contenedor-comentarios {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tarjeta-comentario {
    background: #f3e5ff;
    border-left: 4px solid #6a0dad;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(106, 13, 173, 0.2);
    position: relative;
}

    .tarjeta-comentario small {
        display: block;
        color: #6a0dad;
        margin-top: 5px;
        font-size: 0.85rem;
    }

/* Botón eliminar comentario */
.btn-eliminar-com {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #ff4d6d;
    font-size: 1rem;
    cursor: pointer;
}

    .btn-eliminar-com:hover {
        color: #d43f5a;
    }

/* Botón volver */
.acciones-volver {
    display: flex;
    justify-content: flex-start;
}
