:root {
    --primary-color: #2563eb;
    --secondary-color: #f8fafc;
    --text-color: #0f172a;
    --accent-color: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-color);
}

.brand-navbar {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.map-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.table th {
    background-color: #1e293b;
    color: white;
    font-weight: 500;
}

.table td {
    vertical-align: middle;
}

.results-card {
    border-radius: 12px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-marker {
    background-color: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.center-marker {
    background: radial-gradient(circle, #ef4444 0%, #7f1d1d 100%);
    border: 3px solid white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
    border-radius: 50%;
    width: 24px !important;
    height: 24px !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Province Hero Banner */
.province-hero-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #0d9488 100%);
    color: white;
    border-radius: 16px;
    animation: fadeIn 0.6s ease-out;
}

.province-hero-card .text-muted {
    color: rgba(255,255,255,0.7) !important;
}

.province-hero-card .border-end {
    border-color: rgba(255,255,255,0.2) !important;
}

.province-hero-name {
    font-size: 2rem;
    font-weight: 700;
    color: #fde68a;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.province-hero-stat {
    font-size: 1.6rem;
    font-weight: 700;
    color: white !important;
    line-height: 1.1;
}

/* Ranking Table */
#pointsTable tbody tr:nth-child(1) {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
}

#pointsTable tbody tr:nth-child(2) {
    background-color: #f8fafc;
    border-left: 4px solid #94a3b8;
}

#pointsTable tbody tr:nth-child(3) {
    background-color: #fff7ed;
    border-left: 4px solid #f97316;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.rank-1 { background: #f59e0b; color: white; }
.rank-2 { background: #94a3b8; color: white; }
.rank-3 { background: #f97316; color: white; }
.rank-other { background: #e2e8f0; color: #64748b; }

/* ─── Progress Panel ─────────────────────────────── */
.progress-panel {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 30px 35px;
    width: 640px;
    max-width: 92vw;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease-out;
}

.live-counter-band {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-counter-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-phase-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

.live-count {
    font-size: 1.25rem;
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.progress-header {
    text-align: center;
    margin-bottom: 20px;
}

.progress-spinner {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #818cf8;
    line-height: 72px;
    width: 100%;
    text-align: center;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.12); }
}

.progress-title {
    color: #f1f5f9;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.progress-subtitle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}

/* progress bar */
.progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.progress-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-pct {
    color: #818cf8;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 34px;
    text-align: right;
}

/* steps list */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.progress-step.active span { color: #e2e8f0; font-weight: 600; }
.progress-step.done   span { color: #34d399; }

.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s;
}

.step-dot.waiting {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.15);
}

.step-dot.active {
    background: #6366f1;
    border: none;
    animation: dot-pulse 1s ease-in-out infinite;
}

.step-dot.done {
    background: #059669;
    border: none;
}

.step-dot.done::after  { content: '✓'; color: white; font-size: 11px; font-weight: 700; }
.step-dot.active::after { content: ''; width: 8px; height: 8px; background: white; border-radius: 50%; }

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(99,102,241,0); }
}
