/* quizio/css/styles.css - Premium UI Update */

/* Base & Typography */
body.quizio-body {
    background-color: #040d1a; /* Dark Navy Background */
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.bg-stars {
    display: none; /* Removed the stars for a cleaner look */
}

/* Premium Layout Panels */
.premium-card {
    background: #0b192c; /* Solid dark blue panel */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Header Navbar */
.premium-header {
    background: #0b192c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-info-pill {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
    color: #8ea0b8;
}
.header-info-pill strong {
    color: #ffffff;
    margin-left: 5px;
}

/* Typography styles */
.text-teal {
    color: #00bdae !important;
}
.bg-teal {
    background-color: #00bdae !important;
}
.text-secondary-blue {
    color: #8ea0b8 !important;
}

/* Answer Grid */
.answer-box {
    background: #061423;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: stretch;
    transition: all 0.2s;
    min-height: 80px;
    overflow: hidden;
}

.answer-letter-block {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.answer-letter-block.color-0 { background-color: rgba(0, 189, 174, 0.15); border-right: 2px solid rgba(0, 189, 174, 0.4); } /* Teal */
.answer-letter-block.color-1 { background-color: rgba(131, 39, 223, 0.15); border-right: 2px solid rgba(131, 39, 223, 0.4); } /* Purple */
.answer-letter-block.color-2 { background-color: rgba(14, 165, 233, 0.15); border-right: 2px solid rgba(14, 165, 233, 0.4); } /* Blue */
.answer-letter-block.color-3 { background-color: rgba(236, 72, 153, 0.15); border-right: 2px solid rgba(236, 72, 153, 0.4); } /* Pink */

.answer-text-block {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

/* Correct Answer State */
.answer-box.correct {
    background: #00bdae;
    border-color: #00bdae;
    color: #ffffff;
}
.answer-box.correct .answer-letter-block {
    background: rgba(0,0,0,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
}

/* Progress Bar */
.premium-progress-bg {
    background: rgba(255,255,255,0.1);
    height: 6px;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}
.premium-progress-bar {
    background: #00bdae;
    height: 100%;
    transition: width 1s linear;
}

/* Ranking Items */
.ranking-list-container {
    background: #061423;
    border-radius: 10px;
    padding: 10px;
}

.ranking-item-premium {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ranking-item-premium:last-child {
    border-bottom: none;
}

.medal-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 10px;
    color: #000;
}
.medal-gold { background: #FFD700; }
.medal-silver { background: #C0C0C0; }
.medal-bronze { background: #CD7F32; }
.medal-none { background: #1e293b; color: #8ea0b8; }

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2d3748;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.player-name-premium {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}
.player-score-premium {
    font-weight: 700;
    font-size: 0.95rem;
    color: #00bdae;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Avatar Grid (Players in room) */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.avatar-grid-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    padding: 8px;
}
.avatar-grid-item .player-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-right: 8px;
}
.avatar-grid-item .info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0; /* Prevents flex children from pushing container wide */
}
.avatar-grid-item .name {
    font-size: 0.75rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.avatar-grid-item .pts {
    font-size: 0.7rem;
    color: #8ea0b8;
    white-space: nowrap;
}

/* Podium Styles */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
    margin-bottom: 30px;
    min-height: 250px;
}
.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
}
.podium-avatar-container {
    position: relative;
    margin-bottom: -15px;
    z-index: 2;
}
.podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2d3748;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
}
.podium-medal {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.podium-base {
    width: 100%;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    color: #fff;
}
.podium-base .name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
    text-align: center;
}
.podium-base .pts {
    font-weight: 700;
    font-size: 1.1rem;
    color: #00bdae;
}

.place-1 .podium-avatar { width: 100px; height: 100px; border-color: #FFD700; }
.place-1 .podium-base { background: linear-gradient(180deg, #0d3846 0%, #061423 100%); height: 160px; }
.place-1 .podium-medal { background: #FFD700; width: 40px; height: 40px; font-size: 1.2rem; }

.place-2 .podium-base { background: linear-gradient(180deg, #132a42 0%, #061423 100%); height: 120px; }
.place-2 .podium-medal { background: #C0C0C0; }

.place-3 .podium-base { background: linear-gradient(180deg, #2b211a 0%, #061423 100%); height: 90px; }
.place-3 .podium-medal { background: #CD7F32; }

/* Podium List */
.podium-list {
    max-width: 600px;
    margin: 0 auto;
}
.podium-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.podium-list-item:first-child { border-top: none; }

/* -------------------------------------------
   PLAYER UI PREMIUM STYLES
------------------------------------------- */

/* Botones de respuesta del jugador */
button.answer-box {
    cursor: pointer;
    text-align: left;
    outline: none;
}

button.answer-box:active {
    transform: scale(0.97);
    background: #0d263b;
}

button.answer-box.selected {
    border-color: #00bdae;
    background: rgba(0, 189, 174, 0.15);
    box-shadow: 0 0 20px rgba(0, 189, 174, 0.4);
}

button.answer-box.disabled {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(80%);
}

button.answer-box.selected.disabled {
    opacity: 1; /* El seleccionado se mantiene visible */
    filter: none;
}

/* Animaciones para iconos de resultado */
@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 189, 174, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(0, 189, 174, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 189, 174, 0); }
}

#result-icon i.bi-check-circle-fill {
    text-shadow: 0 0 30px rgba(25, 135, 84, 0.8);
    animation: pulseGlow 1.5s infinite;
}

#result-icon i.bi-x-circle-fill {
    text-shadow: 0 0 30px rgba(220, 53, 69, 0.8);
}

/* Progreso de la barra del jugador */
#q-progress {
    background: linear-gradient(90deg, #00bdae, #00d2ff);
    box-shadow: 0 0 10px rgba(0, 189, 174, 0.8);
    border-radius: 4px;
}
