/* ========================================
   COUNTRIES.CSS - Countries & cities page
   ======================================== */

.countries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.full-width {
    grid-column: span 2;
}

.geo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.geo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
    transition: all 0.3s;
}

.geo-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.geo-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.geo-rank {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.geo-percent {
    font-size: 18px;
    font-weight: bold;
    color: #3b82f6;
}

/* Chart Card */
.chart-card canvas {
    max-height: 300px;
    width: 100%;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .countries-grid {
        gap: 20px;
    }
    
    .geo-percent {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .full-width {
        grid-column: span 1;
    }
    
    .geo-item {
        padding: 12px;
    }
    
    .geo-name {
        gap: 10px;
        font-size: 14px;
    }
    
    .geo-rank {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .geo-percent {
        font-size: 16px;
    }
    
    .chart-card canvas {
        max-height: 250px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .stats-card {
        padding: 15px;
    }
    
    .stats-card h3 {
        font-size: 16px;
    }
    
    .geo-item {
        padding: 10px;
    }
    
    .geo-name {
        gap: 8px;
        font-size: 13px;
    }
    
    .geo-rank {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    
    .geo-percent {
        font-size: 14px;
    }
    
    .chart-card canvas {
        max-height: 200px;
    }
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

body.dark-mode .geo-item {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .geo-item:hover {
    background: #334155;
}

body.dark-mode .geo-name {
    color: #f1f5f9;
}

body.dark-mode .geo-percent {
    color: #3b82f6;
}

body.dark-mode .geo-rank {
    background: #3b82f6;
}
/* Fix geo items on small screens */
@media (max-width: 480px) {
    .geo-item {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }
    
    .geo-name {
        flex-wrap: wrap;
        justify-content: center;
    }
}