/* === Floating Counter Widget === */
#svc-counter {
    display: flex;
    align-items: center;
    background-color: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: auto;
}

#svc-counter.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    #svc-counter {
        font-size: 12px;
        padding: 6px 10px;
        bottom: 10px;
        right: 10px;
    }
    .live-dot { width: 6px; height: 6px; }
    .live-line, .total-line, .click-line { font-size: 12px; margin: 1px 0; }
}

#svc-counter:hover {
    background-color: #34495e;
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.svc-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
    font-size: 1.2em;
}

.live-dot, .click-line {
    animation: svc-pulse var(--animation-speed, 1500ms) infinite ease-in-out;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
    margin-left: 4px;
}

.click-line {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
    display: inline-block;
}

@keyframes svc-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.svc-count {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.live-line, .total-line, .click-line {
    font-weight: 600;
    margin: 2px 0;
}

.lang-en, .lang-ku {
    display: flex;
    flex-direction: column;
}

.lang-ku {
    font-family: 'Segoe UI', 'Arial Unicode MS', sans-serif;
    text-align: right;
    letter-spacing: 0.3px;
}

/* === Stats Page === */
.svc-stats-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #e6e6e6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

#svc-theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff4081;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

#svc-theme-toggle:hover {
    transform: rotate(30deg);
    background: #e91e63;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.kpi-card {
    background: rgba(255,255,255,0.1);
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.kpi-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00c853;
}

.kpi-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Insight Box */
.svc-insight-box {
    background: #ffeb3b;
    color: #333;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-style: italic;
}

/* City List */
.city-list {
    margin: 0.5rem 0 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Chart Containers */
.chart-container {
    margin: 1.5rem 0;
    width: 100%;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px;
}

/* Footer Info */
.svc-footer-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-row { flex-direction: column; }
    .kpi-grid { grid-template-columns: 1fr; }
}