* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 20px;
}

.city-title {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

.location-sub {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

.local-time {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
}

.local-time-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.local-time-value {
    font-size: 26px;
    font-weight: 300;
    color: #fff;
}

.local-time-date {
    font-size: 12px;
    color: #888;
}

.updated {
    font-size: 11px;
    color: #555;
    margin-top: 12px;
}

.error-notice {
    background: #1a0000;
    border: 1px solid #330000;
    color: #ff6666;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.unit-btn {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #333;
    background: #111;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.unit-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.unit-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.unit-btn.active {
    background: #222;
    color: #fff;
    border-color: #444;
}

.unit-btn:hover:not(.active) {
    background: #1a1a1a;
    color: #aaa;
}

/* Metric/Imperial - FIXED */
.val-metric {
    display: inline;
}

.val-imperial {
    display: none;
}

body.show-imperial .val-metric {
    display: none;
}

body.show-imperial .val-imperial {
    display: inline;
}

/* Current Weather */
.current {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

.temp-block {
    text-align: center;
}

.temp-large {
    font-size: 64px;
    font-weight: 200;
    color: #fff;
    line-height: 1;
}

.temp-secondary {
    font-size: 18px;
    color: #666;
    margin-top: 5px;
}

.condition-block {
    text-align: center;
}

.condition-icon {
    font-size: 56px;
}

.condition-text {
    font-size: 18px;
    color: #ccc;
    margin-top: 8px;
}

.feels {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

.current-desc {
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 15px;
}

/* Details Grid */
.details {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.detail {
    background: #111;
    border: 1px solid #222;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
}

.detail-icon {
    font-size: 20px;
}

.detail-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    margin: 5px 0;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #ddd;
}

.detail-extra {
    font-size: 11px;
    color: #555;
    margin-top: 3px;
}

/* Section Title */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #222;
}

/* Hourly Forecast */
.hourly-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
}

.hourly-scroll::-webkit-scrollbar {
    height: 6px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: #111;
    border-radius: 3px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.hour {
    flex: 0 0 auto;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    min-width: 70px;
}

.hour:hover {
    border-color: #333;
}

.hour-time {
    font-size: 11px;
    color: #666;
}

.hour-icon {
    font-size: 22px;
    margin: 8px 0;
}

.hour-temp {
    font-size: 15px;
    font-weight: 500;
    color: #ddd;
}

.hour-rain {
    font-size: 10px;
    color: #4a9eff;
    margin-top: 4px;
}

/* Daily Forecast Table */
.daily-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.daily-table th,
.daily-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #1a1a1a;
}

.daily-table th {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
}

.daily-table tbody tr:hover td {
    background: #0a0a0a;
}

.day-name {
    font-weight: 600;
    font-size: 14px;
    color: #ddd;
}

.day-date {
    font-size: 11px;
    color: #555;
}

.day-icon {
    font-size: 24px;
    text-align: center;
}

.day-cond {
    font-size: 13px;
    color: #888;
}

.temp-high {
    color: #ff9500;
    font-weight: 600;
}

.temp-low {
    color: #4ac3ff;
}

.rain-val {
    font-size: 13px;
    color: #888;
}

.rain-high {
    color: #4a9eff;
}

.uv-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.uv-low {
    background: #0a1a0a;
    color: #4ade4a;
}

.uv-mod {
    background: #1a1a0a;
    color: #dede4a;
}

.uv-high {
    background: #1a100a;
    color: #de8a4a;
}

.uv-vhigh {
    background: #1a0a0a;
    color: #de4a4a;
}

.day-desc {
    font-size: 12px;
    color: #666;
    max-width: 280px;
}

/* Sun Row */
.sun-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 18px;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sun-item {
    text-align: center;
}

.sun-icon {
    font-size: 24px;
}

.sun-label {
    font-size: 10px;
    color: #555;
    text-transform: uppercase;
    margin-top: 5px;
}

.sun-time {
    font-size: 16px;
    font-weight: 500;
    color: #ccc;
    margin-top: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #444;
    font-size: 12px;
    border-top: 1px solid #1a1a1a;
}

footer a {
    color: #666;
    text-decoration: none;
}

footer a:hover {
    color: #888;
}

/* Responsive */
@media (max-width: 800px) {
    .details {
        grid-template-columns: repeat(3, 1fr);
    }

    .hide-tablet {
        display: none;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 12px;
    }

    .details {
        grid-template-columns: repeat(2, 1fr);
    }

    .temp-large {
        font-size: 48px;
    }

    .condition-icon {
        font-size: 40px;
    }

    .current {
        gap: 20px;
        padding: 20px;
    }

    .daily-table td,
    .daily-table th {
        padding: 10px 6px;
    }

    .day-desc {
        display: none;
    }
}