* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
    background: linear-gradient(180deg, #58a0ff 0%, #e8f2ff 100%);
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
}

h1,
h2,
h3,
h4 {
    margin: 0;
}

.handwriting {
    font-family: 'Patrick Hand', cursive;
}

/* Container */
.container {
    width: min(100% - 30px, 1100px);
    background: rgba(255 255 255 / 0.75);
    border-radius: 20px;
    box-shadow:
        0 10px 20px rgb(0 0 0 / 0.15),
        inset 0 0 50px rgb(255 255 255 / 0.45);
    padding: 20px 30px 30px;
    display: grid;
    grid-template-columns: 1fr 310px;
    grid-gap: 20px;
    margin-top: 25px;
    backdrop-filter: saturate(180%) blur(20px);
}

/* Header and description */
header {
    text-align: center;
    max-width: 600px;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    user-select: none;
    color: #1d2a78;
}

header .logo svg {
    width: 22px;
    height: 22px;
    fill: #fdbe32;
    filter: drop-shadow(0 0 1px #fdbe32);
}

header p.desc {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-top: 4px;
    color: #222a40dd;
}

header .btn-dashboard {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    background: white;
    border-radius: 12px;
    padding: 6px 12px;
    color: #333;
    text-decoration: none;
    border: 1.8px solid #aaa;
    box-shadow: 1px 2px 5px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

header .btn-dashboard:hover {
    border-color: #58a0ff;
    box-shadow: 0 0 10px #58a0ffaa;
    color: #1d2a78;
}

/* Top bar with time and search */
.top-bar {
    grid-column: 1 / 3;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.time-display {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555a6a;
    user-select: none;
}

/* Clock icon (simple) */
.time-display svg {
    width: 20px;
    height: 20px;
    stroke: #555a6a;
    stroke-width: 1.8;
    fill: none;
}

form.search-form {
    flex: 1 1 280px;
    display: flex;
    gap: 8px;
}

form.search-form input[type="text"] {
    flex-grow: 1;
    border: 1.8px solid #aaa;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    outline-offset: 2px;
    transition: border-color 0.3s ease;
}

form.search-form input[type="text"]:focus {
    border-color: #58a0ff;
    box-shadow: 0 0 8px rgba(88, 160, 255, 0.5);
}

form.search-form button {
    background: #111;
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 0 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    user-select: none;
}

form.search-form button:hover {
    background: #58a0ff;
}

.location-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    color: #b04b4b;
    font-weight: 600;
    user-select: none;
}

.location-indicator svg {
    width: 18px;
    height: 18px;
    fill: #b04b4b;
}

/* Metrics cards container */
.metrics {
    display: flex;
    gap: 20px;
    justify-content: start;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.metric-card {
    flex: 1 1 140px;
    background: white;
    border-radius: 14px;
    padding: 20px 18px 18px;
    box-shadow: 0 7px 20px rgb(26 46 53 / 6%);
    position: relative;
    cursor: default;
    transition: box-shadow 0.3s ease;
    user-select: none;
}

.metric-card:hover {
    box-shadow: 0 10px 30px rgb(26 46 53 / 18%);
}

.metric-card .icon-bg {
    width: 42px;
    height: 42px;
    background: #eee;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 0.6px #bbb);
}

.metric-card .icon-bg svg {
    width: 20px;
    height: 20px;
    stroke: #777;
    stroke-width: 1.8;
    fill: none;
}

.metric-label {
    font-size: 0.9rem;
    color: #8c909c;
    margin-bottom: 6px;
}

.metric-value {
    font-weight: 700;
    font-size: 1.4rem;
    color: #222;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.metric-value small {
    font-size: 0.8rem;
    font-weight: 500;
    color: #777;
}

.metric-info {
    font-size: 0.7rem;
    color: #aaa;
    position: absolute;
    bottom: 6px;
    right: 10px;
    cursor: default;
}

/* Temperature trends */
.chart-card {
    background: white;
    border-radius: 14px;
    padding: 18px 24px 24px 24px;
    box-shadow: 0 7px 20px rgb(26 46 53 / 6%);
    user-select: none;
}

.chart-card h3 {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 18px;
    gap: 6px;
    color: #121d2a;
}

.chart-card h3 svg {
    width: 22px;
    height: 22px;
    stroke: #666;
    stroke-width: 1.4;
    fill: none;
}

canvas {
    max-width: 100%;
    height: 250px;
}

/* City selection */
.city-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    user-select: none;
}

.city-card {
    flex-basis: 48%;
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 7px 20px rgb(26 46 53 / 5%);
    border: 2.6px solid transparent;
    cursor: pointer;
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.city-card svg {
    width: 24px;
    height: 24px;
    stroke: #777;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}

.city-card span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    user-select: none;
}

.city-card.selected {
    border-color: #467eed;
    box-shadow: 0 12px 24px rgb(70 126 237 / .5);
    background: #e4edff;
}

/* Map container */
.map-container {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 7px 20px rgb(26 46 53 / 7%);
    background: white;
}

iframe {
    display: block;
    border: none;
    width: 100%;
    min-height: 270px;
    height: 100%;
    user-select: none;
}

/* Footer and secondary sections */
.footer-note {
    margin-top: 60px;
    font-size: 0.9rem;
    color: #4a659cdd;
    font-family: 'Patrick Hand', cursive;
    text-align: center;
    user-select: none;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }

    .city-selection {
        justify-content: center;
    }

    .city-card {
        flex-basis: 45%;
    }

    form.search-form {
        order: 2;
        flex: 1 1 100%;
        margin-top: 10px;
    }

    .top-bar {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .city-card {
        flex-basis: 100%;
    }
}