/* ==========================================================================
   SKYNAV MATSC E-VOTING - LIVE SCREEN SPECIFIC STYLES
   ========================================================================== */

   body.live-theme {
    background-color: #f1f5f9;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.live-main {
    flex: 1;
    padding: 24px 40px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
   LIVE SCREEN HEADER
   ========================================================================== */

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.live-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
}

.live-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 1.6s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.live-text {
    font-size: 11px;
    font-weight: 800;
    color: var(--success);
    letter-spacing: 2px;
}

.live-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-stat-badge {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-primary);
}

.live-stat-badge strong {
    color: var(--primary);
    font-size: 14px;
}

/* ==========================================================================
   LIVE PHASE BANNER
   ========================================================================== */

.live-phase-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-left: 4px solid var(--primary);
    padding: 20px 30px;
    border-radius: var(--radius-sm);
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

#live-phase-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.live-stats-row {
    display: flex;
    gap: 24px;
}

.live-stat-card {
    text-align: right;
}

.live-stat-card .label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.live-stat-card strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

/* ==========================================================================
   LIVE TAHAP 1 LAYOUT
   ========================================================================== */

.live-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    min-height: 500px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-gold {
    color: #fbbf24;
}

/* ==========================================================================
   PODIUM GRAPHICS (TOP 3)
   ========================================================================== */

.live-podium-container {
    display: flex;
    flex-direction: column;
}

.live-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    flex: 1;
    padding-bottom: 20px;
}

.podium-col {
    flex: 1;
    max-width: 200px;
}

.podium-card {
    padding: 24px 16px;
    text-align: center;
    position: relative;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Podium Heights */
.podium-1 .podium-card {
    min-height: 350px;
    border-color: rgba(251, 191, 36, 0.25);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(255, 255, 255, 0.7) 100%);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.15);
}

.podium-2 .podium-card {
    min-height: 290px;
}

.podium-3 .podium-card {
    min-height: 250px;
}

/* Podium ranks labels */
.rank-label {
    position: absolute;
    bottom: -15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-secondary);
}

.podium-1 .rank-label {
    border-color: #fbbf24;
    color: #fbbf24;
}

.crown-icon {
    position: absolute;
    top: -24px;
    font-size: 24px;
    color: #fbbf24;
    animation: floatCrown 3s infinite alternate ease-in-out;
}

@keyframes floatCrown {
    0% { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-6px) rotate(5deg); }
}

.podium-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: var(--card-border);
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-1 .podium-avatar-wrapper {
    width: 95px;
    height: 95px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.podium-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: filter 0.5s ease;
}

.podium-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.podium-pos {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.podium-votes-box {
    margin-top: auto;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 20px;
    min-width: 90px;
}

.podium-votes-box strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.podium-votes-box span {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.gold-glow strong {
    color: #fbbf24;
}

/* ==========================================================================
   LIVE CHART VIEW
   ========================================================================== */

.live-chart-container {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.live-chart-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 400px;
}

/* ==========================================================================
   TAHAP 2 LIVE CARD SYSTEM (3 CALON FINAL)
   ========================================================================== */

.live-tahap2-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex: 1;
}

.tahap2-card {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    min-height: 520px;
}

.card-bg-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.tahap2-card:hover {
    transform: translateY(-6px);
}

.t2-avatar-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 4px;
    background: #ffffff;
    border: 3px solid;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 1;
}

.t2-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: filter 0.5s ease;
}

.t2-name {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    z-index: 1;
}

.t2-pos {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    z-index: 1;
}

.t2-nik {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 30px;
    z-index: 1;
}

.t2-votes-container {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--card-border);
    padding: 16px 40px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    min-width: 160px;
    z-index: 1;
}

.t2-votes-num {
    font-size: 40px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.t2-votes-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.t2-progress-wrapper {
    width: 100%;
    max-width: 250px;
    z-index: 1;
}

.t2-pct-lbl {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

/* Specific text color configurations */
#t2-card-0 .t2-pct-lbl { color: var(--primary); }
#t2-card-1 .t2-pct-lbl { color: var(--success); }
#t2-card-2 .t2-pct-lbl { color: #fbbf24; }

.t2-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.t2-progress-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   ELECTION COMPLETED WINNER SCREEN
   ========================================================================== */

.winner-card {
    text-align: center;
    max-width: 700px;
    margin: 40px auto;
    padding: 50px 40px;
    position: relative;
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(255, 255, 255, 0.7) 100%);
    box-shadow: 0 15px 45px rgba(251, 191, 36, 0.08);
}

.winner-confetti {
    font-size: 80px;
    color: #fbbf24;
    margin-bottom: 20px;
    animation: bounceWinner 2s infinite alternate ease-in-out;
}

@keyframes bounceWinner {
    0% { transform: scale(0.95) translateY(0); filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.3)); }
    100% { transform: scale(1.05) translateY(-10px); filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8)); }
}

.winner-title {
    font-size: 22px;
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.winner-podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.winner-avatar-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.winner-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.winner-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.winner-pos {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.winner-nik {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.winner-votes-display {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-md);
    padding: 20px 40px;
}

.winner-votes-display .votes-num {
    font-size: 50px;
    font-weight: 900;
    color: #fbbf24;
    line-height: 1;
}

.winner-votes-display .votes-lbl {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.winner-pct {
    margin-top: 8px;
    font-size: 14px;
    color: var(--success);
    font-weight: 700;
}

/* ==========================================================================
   ANONYMITY EFFECT (BLUR & HIDE NAMES)
   ========================================================================== */

/* Blur effect applied to avatar elements */
.names-hidden .podium-avatar,
.names-hidden .t2-avatar,
.names-hidden .winner-avatar {
    filter: blur(16px);
    transform: scale(1.15);
}

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

@media (max-width: 1024px) {
    .live-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .live-tahap2-cards {
        grid-template-columns: 1fr;
    }
    
    .tahap2-card {
        min-height: 400px;
        padding: 30px;
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Nomor urut calon pada papan hasil Tahap 2. Ditaruh di atas nama supaya
   terbaca lebih dulu, sejalan dengan tampilan surat suara. */
.t2-nomor {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(14, 165, 233, 0.45);
    color: #38bdf8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
