/* =========================================================
   ESTILOS GENERALES - IDENTIDAD MORTIÑÓN
   Paleta basada en la publicidad:
   Morado oscuro + Púrpura + Magenta + Lavanda
   ========================================================= */

/* =========================================================
   ESTILOS BASE
   ========================================================= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #21051F;
    color: #4A3D4A;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}


/* =========================================================
   CONTENEDOR DE VIDEO DE FONDO
   ========================================================= */

.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.page-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.5;
}


/* =========================================================
   LOGO SUPERIOR
   ========================================================= */

.header-logo {
    text-align: center;
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(59, 10, 69, 0.25);
    position: relative;
    z-index: 10;
}

.header-logo img {
    max-height: 80px;
    max-width: 80%;
}


/* =========================================================
   CRÉDITOS LATERALES DERECHA
   ========================================================= */

.side-credits {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 5;
    width: 180px;
}

.credits-box {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(59, 10, 69, 0.20);
    text-align: center;
    border: 1px solid #E8B7DE;
}

.credits-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #64136F;
    font-size: 1rem;
}

.credits-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.credits-logos img {
    max-width: 100%;
    max-height: 50px;
}


/* =========================================================
   IMAGEN LATERAL IZQUIERDA
   ========================================================= */

.side-image-left {
    position: fixed;
    top: 120px;
    left: 20px;
    z-index: 5;
    width: 180px;
}

.image-box {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(59, 10, 69, 0.20);
    text-align: center;
    border: 1px solid #E8B7DE;
}

.image-box img {
    max-width: 100%;
    border-radius: 5px;
}


/* =========================================================
   LOGO FOOTER
   ========================================================= */

.footer-logo {
    text-align: center;
    padding: 15px 0;
    background-color: #FFFFFF;
    box-shadow: 0 -2px 8px rgba(59, 10, 69, 0.20);
    position: relative;
    margin-top: 40px;
}

.footer-logo img {
    max-height: 60px;
    max-width: 90%;
}


/* =========================================================
   CONTENIDO PRINCIPAL
   ========================================================= */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}


/* =========================================================
   RESPONSIVE GENERAL
   ========================================================= */

@media (max-width: 1200px) {

    .side-credits,
    .side-image-left {
        display: none;
    }

    .main-content {
        padding: 20px 10px;
    }
}


/* =========================================================
   HEADER DE ACCIONES
   ========================================================= */

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions h1 {
    margin: 0;
    color: #64136F;
}


/* =========================================================
   GRUPOS DE BOTONES
   ========================================================= */

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   BOTONES
   ========================================================= */

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #7B247F;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #64136F;
    transform: translateY(-1px);
}


/* Botón principal */

.btn-primary {
    background-color: #64136F;
}

.btn-primary:hover {
    background-color: #3B0A45;
}


/* Botón secundario */

.btn-secondary {
    background-color: #7A687A;
}

.btn-secondary:hover {
    background-color: #5E4D5E;
}


/* Botón eliminar */

.btn-danger {
    background-color: #A62C5C;
}

.btn-danger:hover {
    background-color: #7E1F47;
}


/* Botón de acento */

.btn-accent {
    background-color: #B83D8E;
}

.btn-accent:hover {
    background-color: #8E2D6D;
}


/* Botón editar participante */

.btn-edit {
    background-color: #B83D8E;
    color: #FFFFFF;
}

.btn-edit:hover {
    background-color: #8E2D6D;
}


/* Botón de ancho completo */

.btn-full {
    width: 100%;
    text-align: center;
}


/* =========================================================
   TARJETAS GENERALES
   ========================================================= */

.card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #E8B7DE;
}

.form-card {
    max-width: 600px;
    margin: 0 auto;
}


/* =========================================================
   FORMULARIOS
   ========================================================= */

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #4A3D4A;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 95%;
    padding: 8px;
    border: 2px solid #DCC9DA;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #FFFFFF;
    color: #4A3D4A;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #B83D8E;
    box-shadow: 0 0 0 3px rgba(184, 61, 142, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}


/* =========================================================
   HERO
   ========================================================= */

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

.hero h1 {
    color: #E8B7DE;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #FFFFFF;
    margin-bottom: 20px;
}


/* =========================================================
   GRID DE TARJETAS
   ========================================================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}


/* =========================================================
   ICONOS DE TARJETAS
   ========================================================= */

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #B83D8E;
}


/* =========================================================
   TÍTULOS DE TARJETAS
   ========================================================= */

.card h2 {
    color: #64136F;
    margin-top: 0;
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 20px;
}


/* =========================================================
   SECCIÓN DE INFORMACIÓN
   ========================================================= */

.info-section {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    border: 1px solid #E8B7DE;
}

.info-section h2 {
    color: #64136F;
    margin-top: 0;
}

.info-section h3 {
    color: #B83D8E;
    margin-top: 20px;
}

.info-section ul {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 10px;
}


/* =========================================================
   GRID DE PARTICIPANTES
   ========================================================= */

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}


/* =========================================================
   TARJETA DE PARTICIPANTE
   ========================================================= */

.participant-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    display: flex;
    flex-direction: column;
    border: 1px solid #E8B7DE;
}

.participant-image {
    height: 200px;
    overflow: hidden;
}

.participant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-content {
    padding: 15px;
    flex-grow: 1;
}

.participant-content h2 {
    color: #64136F;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.participant-author {
    color: #7A687A;
    font-style: italic;
    margin-bottom: 10px;
}

.participant-description {
    margin-bottom: 15px;
}

.participant-footer {
    padding: 15px;
    border-top: 1px solid #E8D9E6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* =========================================================
   ESTADO DE CALIFICACIÓN
   ========================================================= */

.rating-display {
    background-color: #F3DDEE;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #E8B7DE;
}

.rating-text {
    color: #64136F;
    font-weight: 600;
}

.no-rating {
    color: #7A687A;
    font-style: italic;
}


/* =========================================================
   ESTADO VACÍO
   ========================================================= */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    border: 1px solid #E8B7DE;
}

.empty-state h2 {
    color: #64136F;
    margin-top: 0;
}

.empty-state p {
    margin-bottom: 20px;
    color: #7A687A;
}


/* =========================================================
   TÍTULOS DE SECCIÓN
   ========================================================= */

.section-title {
    color: #64136F;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}


/* =========================================================
   RESUMEN DEL PARTICIPANTE
   ========================================================= */

.participant-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    align-items: center;
    border: 1px solid #E8B7DE;
}

.participant-summary .participant-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.participant-summary h2 {
    color: #64136F;
    margin-top: 0;
    margin-bottom: 5px;
}


/* =========================================================
   CRITERIOS
   ========================================================= */

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

.criterio {
    background-color: #FBF5FA;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E8D4E5;
}

.criterio h3 {
    color: #7B247F;
    margin-top: 0;
    margin-bottom: 15px;
}


/* =========================================================
   SLOGAN
   ========================================================= */

.slogan-container {
    text-align: center;
    margin-bottom: 20px;
}

.slogan-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}


/* =========================================================
   MENSAJES
   ========================================================= */


/* Mensaje de éxito */

.success-message {
    background-color: #F3DDEE;
    color: #64136F;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #D96AB0;
}


/* Mensaje informativo */

.info-message {
    background-color: #EDE3F2;
    color: #64136F;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #CBA8D2;
}


/* Banner de jurado */

.jurado-banner {
    background-color: #F3DDEE;
    color: #64136F;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #D96AB0;
}


/* Información del jurado */

.jurado-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #F3DDEE;
    color: #64136F;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid #E8B7DE;
}


/* Texto informativo */

.info-text {
    text-align: center;
    color: #7A687A;
    margin-bottom: 20px;
}


/* =========================================================
   BOTÓN PEQUEÑO
   ========================================================= */

.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}


/* =========================================================
   PREVISUALIZACIÓN DE IMÁGENES
   ========================================================= */

.image-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed #D7B9D4;
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #FBF7FB;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* =========================================================
   INPUT DE TIPO FILE
   ========================================================= */

input[type="file"] {
    padding: 8px;
    border: 1px solid #D7B9D4;
    border-radius: 6px;
    width: 100%;
    background-color: #FFFFFF;
    color: #4A3D4A;
}


/* =========================================================
   TABLA DE RESULTADOS
   ========================================================= */

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #FFFFFF;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #E8D9E6;
}

.results-table th {
    background-color: #64136F;
    color: #FFFFFF;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.results-table tr:nth-child(even) {
    background-color: #FBF7FB;
}

.results-table tr:hover {
    background-color: #F3DDEE;
}


/* =========================================================
   GRÁFICO DE RESULTADOS
   ========================================================= */

.chart-container {
    margin: 0 auto 30px;
    max-width: 800px;
    height: 400px;
}


/* =========================================================
   DETALLES DEL PARTICIPANTE
   ========================================================= */

.participant-details {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(59, 10, 69, 0.15);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #E8B7DE;
}

.participant-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.participant-info {
    flex: 1;
    min-width: 300px;
}

.participant-info h2 {
    color: #64136F;
    margin-top: 0;
    margin-bottom: 10px;
}


/* =========================================================
   CABECERA DE INFORMACIÓN DEL PARTICIPANTE
   ========================================================= */

.participant-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.participant-info-header h2 {
    margin: 0;
}


/* =========================================================
   RESUMEN DE CALIFICACIÓN
   ========================================================= */

.rating-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #FBF3FA;
    border-radius: 8px;
    border: 1px solid #E8B7DE;
}

.rating-summary h3 {
    margin-top: 0;
    color: #64136F;
}

.rating-bars {
    margin-top: 15px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rating-label {
    flex: 0 0 120px;
    font-weight: bold;
}


/* Barra vacía */

.progress-bar {
    flex: 1;
    height: 10px;
    background-color: #EADCE8;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
}


/* Barra de progreso */

.progress {
    height: 100%;
    background: linear-gradient(
        90deg,
        #64136F,
        #B83D8E
    );
    border-radius: 5px;
}


/* Valor de calificación */

.rating-value {
    font-weight: 700;
    color: #64136F;
    min-width: 35px;
    text-align: right;
}


/* =========================================================
   SIN CALIFICACIONES
   ========================================================= */

.no-ratings {
    background-color: #FBF5FA;
    border: 1px solid #E8B7DE;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.no-ratings p {
    color: #7A687A;
    margin-bottom: 15px;
}


/* =========================================================
   ESTADO DE VOTACIÓN DE JURADOS
   ========================================================= */

.jurados-section {
    margin-top: 30px;
}

.jurados-section h3 {
    color: #64136F;
    margin-bottom: 20px;
}

.jurados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.jurado-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E8B7DE;
}

.jurado-card.voted {
    background-color: #E7F5EF;
    border-color: #B7DFCE;
}

.jurado-card.pending {
    background-color: #F3DDEE;
    border-color: #E8B7DE;
}

.jurado-status {
    flex-shrink: 0;
}

.status-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.voted .status-icon {
    background-color: #3B8F6B;
    color: #FFFFFF;
}

.pending .status-icon {
    background-color: #B83D8E;
    color: #FFFFFF;
}

.jurado-info h4 {
    margin: 0;
    color: #64136F;
}

.jurado-info p {
    margin: 2px 0 0;
    color: #7A687A;
    font-size: 0.9rem;
}


/* =========================================================
   FORMULARIO DE EDICIÓN
   ========================================================= */

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.edit-header h1 {
    color: #64136F;
    margin-bottom: 5px;
}

.edit-header p {
    margin-top: 0;
    color: #7A687A;
}


/* Imagen actual en edición */

.current-image {
    margin-bottom: 15px;
}

.current-image p {
    margin-bottom: 8px;
}

.current-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #E8B7DE;
    box-shadow: 0 4px 10px rgba(59, 10, 69, 0.15);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #7A687A;
    font-size: 13px;
}


/* =========================================================
   BOTÓN DESHABILITADO
   ========================================================= */

.btn-disabled {
    background-color: #E5DDE5;
    color: #7A687A;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: not-allowed;
}


/* =========================================================
   ESTADOS DE CALIFICACIÓN EN PARTICIPANTES
   ========================================================= */

.rating-status {
    margin-top: 10px;
}

.rating-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.rating-display.voted {
    background-color: #E7F5EF;
    border: 1px solid #B7DFCE;
}

.rating-display.pending {
    background-color: #F3DDEE;
    border: 1px solid #E8B7DE;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.voted {
    background-color: #3B8F6B;
    color: #FFFFFF;
}

.status-badge.pending {
    background-color: #B83D8E;
    color: #FFFFFF;
}


/* =========================================================
   TARJETA DE PARTICIPANTE - BOTONES
   ========================================================= */

.participant-card {
    position: relative;
}

.participant-card .btn-group {
    display: flex;
    gap: 8px;
}

.participant-footer .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-summary .participant-image {
        width: 100%;
        height: 200px;
    }

    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .form-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .participant-info-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-info-header .btn-edit {
        width: auto;
    }

    .rating-bar {
        flex-wrap: wrap;
        gap: 5px;
    }

    .rating-label {
        flex: 0 0 100%;
    }

    .progress-bar {
        margin-left: 0;
    }

    .participant-header {
        flex-direction: column;
    }

    .participant-details .participant-image {
        width: 100%;
        height: 300px;
        flex: none;
    }

    .edit-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .current-image img {
        width: 150px;
        height: 150px;
    }

    .jurados-grid {
        grid-template-columns: 1fr;
    }

    .participant-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .participant-footer .btn-group {
        width: 100%;
    }

    .participant-footer .btn {
        text-align: center;
    }
}


/* =========================================================
   PANTALLAS MUY PEQUEÑAS
   ========================================================= */

@media (max-width: 480px) {

    .main-content,
    .container {
        padding: 15px 10px;
    }

    .card {
        padding: 15px;
    }

    .header-actions h1 {
        font-size: 1.6rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .participants-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        width: 100%;
    }

    .btn-group .btn {
        flex: 1;
        text-align: center;
    }

    .participant-info {
        min-width: 0;
    }

    .participant-info-header h2 {
        font-size: 1.4rem;
    }
}