:root {
    --card-border: rgba(255, 255, 255, 0.22);
    --text-main: #f7fbff;
    --text-muted: #c9d6e2;
    --accent: #ffd166;
    --accent-deep: #f4a261;
}

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

body {
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    background:
        linear-gradient(rgba(7, 18, 34, 0.55), rgba(7, 18, 34, 0.55)),
        url("weatherBG.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

.app-shell {
    width: min(960px, 92vw);
    margin: 40px auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    background: rgba(8, 24, 44, 0.45);
    backdrop-filter: blur(8px);
    animation: slideIn 420ms ease-out;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.topbar h1 {
    letter-spacing: 0.5px;
    font-size: clamp(1.25rem, 2.3vw, 1.8rem);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(500px, 100%);
}

.search-form input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    padding: 12px 14px;
    border-radius: 12px;
    outline: none;
}

.search-form input::placeholder {
    color: #e3edf5;
}

.search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.25);
}

.search-form button {
    border: none;
    background: linear-gradient(140deg, var(--accent), var(--accent-deep));
    color: #152238;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 180ms ease, filter 180ms ease;
}

.search-form button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.weather-card {
    margin-top: 26px;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    padding: 22px;
    animation: riseIn 500ms ease-out;
}

.status {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 16px;
}

.weather-content {
    display: grid;
    gap: 18px;
}

.city-block h2 {
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    margin-bottom: 4px;
}

.weather-desc {
    color: #e7eff6;
    font-size: 1rem;
}

.temp-block {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 0;
}

.temp-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.temperature {
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
}

.feels-like {
    color: var(--text-muted);
    margin-top: 4px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.metric {
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.11);
}

.metric-title {
    color: var(--text-muted);
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.metric-value {
    font-size: 1rem;
    font-weight: 600;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .app-shell {
        margin: 24px auto;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .weather-card,
    .topbar {
        padding: 16px;
        border-radius: 16px;
    }
}
