/* =========================================================================
   365 AWARDS - VOTE ENGINE (FESTIVE AWARDS UI 2026)
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #0d1b2a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 1. MÀN HÌNH ĐĂNG NHẬP GALA SANG TRỌNG */
.vote-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 20%, #1e3a8a 0%, #0d1b2a 75%, #050b14 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.vote-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    top: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.login-card {
    background: #ffffff;
    padding: 40px 32px;
    border-radius: 24px;
    width: 100%;
    max-width: 410px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.15);
    position: relative;
    z-index: 10;
}

.logo-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: 900;
    padding: 5px 16px;
    border-radius: 30px;
    letter-spacing: 1.5px;
    font-size: 0.82rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    display: inline-block;
}

.input-group-custom .input-group-text {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}
.input-group-custom .form-control {
    border-color: #cbd5e1;
    font-size: 0.92rem;
    height: 44px;
}
.input-group-custom .form-control:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.btn-login-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: 0.5px;
    height: 46px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}
.btn-login-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.45);
}

/* 2. HEADER */
.app-header {
    background-color: #0b192c;
    border-bottom: 2px solid #f59e0b;
}

/* 3. BANNER CUỘC THI */
.campaign-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f2b48 100%);
}

.cd-box {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 58px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cd-box span {
    font-size: 1.4rem;
    font-weight: 900;
    display: block;
    color: #f59e0b;
    line-height: 1.1;
}
.cd-box small {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #cbd5e1;
    font-weight: 600;
}
.cd-sep {
    font-size: 1.4rem;
    font-weight: 900;
    color: #f59e0b;
    align-self: center;
}

/* =========================================================================
   4. THẺ ỨNG VIÊN & BỤC VINH DANH GALA AWARDS (TOP 1 - 2 - 3 ĐỈNH CAO)
   ========================================================================= */

.candidate-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 18px 20px 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible !important; /* Để vương miện bay phía trên không bị che */
}

.candidate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* KHUNG ẢNH CÓ VƯƠNG MIỆN & HUY CHƯƠNG */
.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin: 6px auto 12px auto;
}

.crown-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
    animation: floatCrown 2.5s ease-in-out infinite;
}

@keyframes floatCrown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

.cand-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 4px solid #f1f5f9;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* ================= 👑 TOP 1 - QUÁN QUÂN VÀNG KIM ================= */
.candidate-card.rank-1 {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 45%, #ffffff 100%) !important;
    border: 2.5px solid #f59e0b !important;
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.38), 0 0 25px rgba(245, 158, 11, 0.2) !important;
    transform: scale(1.02);
}

.candidate-card.rank-1 .rank-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.8px;
    padding: 6px 14px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45) !important;
    border: 1.5px solid #fde68a !important;
}

.candidate-card.rank-1 .cand-avatar {
    border: 4.5px solid #f59e0b !important;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.55) !important;
}

.candidate-card.rank-1 .btn-vote-now {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

/* ================= 🥈 TOP 2 - Á QUÂN BẠC KIM ================= */
.candidate-card.rank-2 {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 45%, #ffffff 100%) !important;
    border: 2px solid #94a3b8 !important;
    box-shadow: 0 10px 28px rgba(148, 163, 184, 0.35) !important;
}

.candidate-card.rank-2 .rank-badge {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    padding: 5px 12px !important;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.3) !important;
}

.candidate-card.rank-2 .cand-avatar {
    border: 4px solid #94a3b8 !important;
    box-shadow: 0 0 16px rgba(148, 163, 184, 0.45) !important;
}

/* ================= 🥉 TOP 3 - Á QUÂN ĐỒNG ÁNH KIM ================= */
.candidate-card.rank-3 {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 45%, #ffffff 100%) !important;
    border: 2px solid #d97706 !important;
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.3) !important;
}

.candidate-card.rank-3 .rank-badge {
    background: linear-gradient(135deg, #d97706 0%, #9a3412 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    padding: 5px 12px !important;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35) !important;
}

.candidate-card.rank-3 .cand-avatar {
    border: 4px solid #d97706 !important;
    box-shadow: 0 0 16px rgba(217, 119, 6, 0.4) !important;
}

/* HUY HIỆU VỊ TRÍ CHUNG */
.rank-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
}

/* THANH TIẾN ĐỘ & NÚT BẤM */
.cand-progress-bar {
    height: 9px;
    border-radius: 6px;
    background-color: #f1f5f9;
    overflow: hidden;
    margin: 10px 0 12px 0;
}
.cand-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 6px;
    transition: width 0.6s ease;
}

.btn-vote-now {
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}