/* ===== Common ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
}

/* ===== Weather Widget ===== */
body.weather-page {
    background: #2d3748;
}

.weather-widget {
    background: #4a5568;
    border-radius: 16px;
    padding: 15px;
    color: #fff;
    max-width: 600px;
    width: 100%;
}

.weather-widget .city-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.weather-widget .city-chips::-webkit-scrollbar {
    display: none;
}

.weather-widget .chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: #2d3748;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    color: #fff;
    flex-shrink: 0;
}

.weather-widget .chip:hover {
    background: #4a5568;
}

.weather-widget .chip.active {
    background: #fff;
    color: #2d3748;
    font-weight: bold;
}

.weather-widget .content {
    border-radius: 12px;
    display: flex;
    gap: 23px;
    align-items: flex-start;
}

.weather-widget .today-tab,
.weather-widget .forecast-tab {
    display: inline-block;
    background: #6b46c1;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
}

.weather-widget .today-weather-section {
    text-align: center;
    padding-bottom: 0;
    margin-bottom: 0;
}

.weather-widget .forecast-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.weather-widget .forecast-card {
    background: #3b5998;
    border-radius: 10px;
    padding: 5px;
    text-align: center;
}

.weather-widget .forecast-card .day-name {
    font-size: 14px;
    margin-bottom: 10px;
}

.weather-widget .forecast-card .icon {
    font-size: 30px;
    margin: 1px 0;
}

.weather-widget .forecast-card .temp {
    font-size: 14px;
}

.weather-widget .forecast-card .temp .max {
    font-weight: bold;
}

.weather-widget .forecast-card .temp .min {
    opacity: 0.8;
}

.weather-widget .current-weather {
    text-align: center;
}

.weather-widget .current-weather .city-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.weather-widget .current-weather .date {
    font-size: 13px;
    opacity: 0.8;
}

.weather-widget .current-weather .temp {
    font-size: 40px;
    font-weight: bold;
}

.weather-widget .current-weather .icon {
    font-size: 40px;
}

.weather-widget .current-weather .description {
    font-size: 16px;
    margin-bottom: 10px;
}

.weather-widget .current-weather .extra {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.weather-widget .error {
    text-align: center;
    padding: 15px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    color: #ff6b6b;
}

@media (max-width: 500px) {
    .weather-widget .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Currency Widget ===== */
body.currency-page {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.currency-widget {
    background: #fff;
    border-radius: 16px;
    padding: 17px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.currency-widget .widget-header {
    text-align: center;
    margin-bottom: 15px;
}

.currency-widget .widget-header h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.currency-widget .widget-header .date {
    font-size: 12px;
    color: #888;
}

.currency-widget .currency-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.currency-widget .currency-table thead th {
    padding: 10px 8px;
    font-size: 13px;
    text-align: center;
    color: #666;
    font-weight: normal;
}

.currency-widget .currency-table tbody tr {
    background: #f8f9fa;
    border-radius: 8px;
}

.currency-widget .currency-table tbody tr:nth-child(even) {
    background: #e9ecef;
}

.currency-widget .currency-table tbody td {
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
}

.currency-widget .currency-table tbody tr td:first-child {
    border-radius: 0 8px 8px 0;
}

.currency-widget .currency-table tbody tr td:last-child {
    border-radius: 8px 0 0 8px;
}

.currency-widget .currency-name {
    font-weight: bold;
    color: #333;
    font-size: 13px;
}

.currency-widget .rate-value {
    font-weight: bold;
    color: #c2185b;
}

.currency-widget .rate-change {
    font-weight: bold;
}

.currency-widget .rate-change.up {
    color: #4caf50;
}

.currency-widget .rate-change.down {
    color: #f44336;
}

.currency-widget .rate-change.neutral {
    color: #999;
}

.currency-widget .footer-info {
    text-align: center;
    margin-top: 15px;
    font-size: 11px;
    color: #999;
}

.currency-widget .loading {
    color: #666;
}

.currency-widget .error {
    text-align: center;
    padding: 20px;
    background: #ffebee;
    border-radius: 8px;
    color: #c2185b;
}
