﻿/* ===== TROFEOS (estilo tipo Pilotos con scroll central) ===== */

/* Wrapper principal con scroll propio */
.trophies-container-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* altura dinámica para dejar espacio al footer */
    height: calc(100vh - 390px);
    padding: 20px 0;
    overflow-y: auto;
    box-sizing: border-box;
}

    /* Scrollbar personalizado */
    .trophies-container-wrapper::-webkit-scrollbar {
        width: 12px;
    }

    .trophies-container-wrapper::-webkit-scrollbar-button {
        width: 0;
        height: 0;
        display: none;
    }

    .trophies-container-wrapper::-webkit-scrollbar-track {
        border-radius: 8px;
        background: #808080;
    }

    .trophies-container-wrapper::-webkit-scrollbar-thumb {
        background: #9EF01A;
        border-radius: 10px;
    }

        .trophies-container-wrapper::-webkit-scrollbar-thumb:hover {
            background: #9EF01A;
        }

/* Contenedor de tarjetas (2 columnas, centradas) */
.trophies-container {
    width: 95%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
}

/* Encabezados */
.title-counter {
    width: 300px;
    margin: 5px auto;
    background: #000;
    color: #38B000;
    padding: 8px 14px;
    border: 2px solid #38B000;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 0 8px rgba(158, 240, 26, .5); /* resplandor verde */
}

.trophies-counter {
    color: #28a745;
    margin-bottom: 10px;
    font-family: Arial;
    font-weight: bold;
    text-align: center;
    background-color: black;
}

/* Tarjeta (similar a .piloto-card) */
.trophy-card {
    width: 40%;
    background-color: #1f1f1f;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
    font-family: Arial;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .trophy-card:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

/* Estado bloqueado */
.trophy-locked {
    opacity: 0.65;
}

/* Columna izquierda: texto */
.trophy-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trophy-name {
    font-size: 22px;
    font-weight: bold;
    color: #38B000;
}

.trophy-description {
    font-size: 15px;
    color: #28a745;
}

.trophy-unlockedat {
    font-size: 13px;
    color: #a0a0a0;
}

/* Badge tier con estilo tipo botón */
.badge-tier {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    min-width: 110px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-Bronze {
    background: #cd7f32;
    color: #1f1f1f;
}

.badge-Silver {
    background: #bfc1c2;
    color: #1f1f1f;
}

.badge-Gold {
    background: #d4af37;
    color: #1f1f1f;
}

.badge-Platinum {
    background: #6aa7ff;
    color: #1f1f1f;
}

.trophies-clear-btn {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #38B000;
    background: #000;
    color: #38B000;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(158, 240, 26, .35);
}

.trophies-dialog {
    border: 2px solid #38B000;
    border-radius: 10px;
    background: #0b0b0b;
    color: #38B000;
    padding: 0;
    width: min(520px, 92vw);
}

    .trophies-dialog::backdrop {
        background: rgba(0,0,0,.65);
    }

.trophies-dialog-content {
    padding: 16px 18px;
}

.trophies-dialog-title {
    margin: 0 0 10px 0;
    color: #9EF01A;
    font-size: 20px;
    font-weight: bold;
}

.trophies-dialog-text {
    margin: 0 0 14px 0;
    color: #28a745;
}

.trophies-dialog-error {
    margin: 0 0 12px 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.35);
    color: #ff8080;
}

.trophies-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.trophies-dialog-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #38B000;
    background: #000;
    color: #38B000;
    font-weight: bold;
    cursor: pointer;
}

    .trophies-dialog-btn.secondary {
        opacity: 0.9;
    }

    .trophies-dialog-btn.danger {
        border-color: #ff4040;
        color: #ff4040;
    }

    .trophies-dialog-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ===== Responsive: 1 columna en pantallas pequeñas ===== */
@media (max-width: 900px) {
    .trophy-card {
        width: 90%;
    }
}