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

:root {
    --glass: rgba(255, 255, 255, 0.14);
    --glass-strong: rgba(255, 255, 255, 0.20);
    --border: rgba(255, 255, 255, 0.20);
    --text-soft: rgba(255, 255, 255, 0.72);
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    min-height: 100vh;

    color: white;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(255,255,255,0.20),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(255,255,255,0.12),
            transparent 35%
        ),
        linear-gradient(
            160deg,
            #1769e0 0%,
            #2098ed 45%,
            #48c6ef 100%
        );

    padding: 18px;

    overflow-x: hidden;
}

.app {
    width: 100%;
    max-width: 520px;
    margin: auto;
}


/* =========================
   MENU
   ========================= */

.menu-button {
    position: fixed;

    top: 18px;
    left: 18px;

    width: 50px;
    height: 50px;

    border: 1px solid
        rgba(255,255,255,0.25);

    border-radius: 16px;

    background:
        rgba(255,255,255,0.16);

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);

    box-shadow:
        0 10px 30px
        rgba(0,0,0,0.12);

    z-index: 1000;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.menu-button:active {
    transform: scale(0.92);
}

.menu-button .material-symbols-outlined {
    font-size: 27px;
}


/* =========================
   MENU LATERAL
   ========================= */

.side-menu {
    position: fixed;

    top: 0;
    left: 0;

    width: 290px;
    max-width: 85vw;
    height: 100vh;

    background:
        rgba(20, 110, 220, 0.88);

    backdrop-filter:
        blur(25px);

    -webkit-backdrop-filter:
        blur(25px);

    border-right:
        1px solid
        rgba(255,255,255,0.20);

    box-shadow:
        10px 0 40px
        rgba(0,0,0,0.20);

    z-index: 1100;

    transform:
        translateX(-105%);

    transition:
        transform 0.28s ease;

    display: flex;

    flex-direction: column;
}

.side-menu.open {
    transform:
        translateX(0);
}


/* =========================
   CABEÇALHO DO MENU
   ========================= */

.menu-header {
    height: 85px;

    padding:
        18px 18px 18px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255,255,255,0.15);
}

.menu-header strong {
    font-size: 22px;

    font-weight: 800;

    letter-spacing: -0.5px;
}

.close-menu {
    width: 44px;
    height: 44px;

    border: none;

    border-radius: 14px;

    background:
        rgba(255,255,255,0.14);

    color: white;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.close-menu:active {
    transform: scale(0.90);

    background:
        rgba(255,255,255,0.25);
}

.close-menu .material-symbols-outlined {
    font-size: 25px;
}


/* =========================
   CONTEÚDO DO MENU
   ========================= */

.menu-content {
    padding: 20px 16px;
}


/* =========================
   ITEM DO MENU
   ========================= */

.menu-item {
    width: 100%;

    min-height: 58px;

    padding:
        0 17px;

    border: 1px solid
        rgba(255,255,255,0.15);

    border-radius: 17px;

    background:
        rgba(255,255,255,0.13);

    color: white;

    display: flex;

    align-items: center;

    gap: 14px;

    text-align: left;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.menu-item:hover {
    background:
        rgba(255,255,255,0.20);
}

.menu-item:active {
    transform: scale(0.97);
}

.menu-item .material-symbols-outlined {
    font-size: 25px;
}


/* =========================
   HEADER
   ========================= */

.header {
    text-align: center;
    padding: 12px 0 25px;
}

.header h1 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1.5px;

    text-shadow:
        0 4px 20px
        rgba(0,0,0,0.15);
}

.header p {
    margin-top: 7px;
    font-size: 14px;
    color: var(--text-soft);
}


/* =========================
   PESQUISA
   ========================= */

.search-card {
    position: relative;
    z-index: 20;
    margin-bottom: 18px;
}

.search-box {
    display: flex;
    gap: 9px;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    height: 54px;

    padding:
        0 45px
        0 18px;

    border: 1px solid
        rgba(255,255,255,0.25);

    border-radius: 18px;

    outline: none;

    font-size: 15px;

    background:
        rgba(255,255,255,0.94);

    color: #1d2939;

    box-shadow:
        0 10px 30px
        rgba(0,0,0,0.12);

    transition:
        0.25s ease;
}

.search-box input:focus {
    background: white;

    box-shadow:
        0 0 0 3px
        rgba(255,255,255,0.25),
        0 12px 35px
        rgba(0,0,0,0.16);
}

.search-box input::placeholder {
    color: #8b96a7;
}

.search-button {
    height: 54px;

    padding: 0 20px;

    border: none;

    border-radius: 18px;

    background: white;

    color: #1769df;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(0,0,0,0.12);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.search-button:active {
    transform: scale(0.96);
}

.clear-button {
    position: absolute;

    right: 9px;
    top: 50%;

    transform:
        translateY(-50%);

    width: 32px;
    height: 32px;

    border: none;

    border-radius: 50%;

    background: #edf1f5;

    color: #697586;

    font-size: 21px;

    cursor: pointer;

    display: none;
}


/* =========================
   RESULTADOS
   ========================= */

.search-status {
    min-height: 17px;

    margin:
        7px 5px 0;

    font-size: 12px;

    color:
        rgba(255,255,255,0.75);
}

.search-results {
    position: absolute;

    left: 0;
    right: 0;

    top: 62px;

    background:
        rgba(255,255,255,0.97);

    color: #1e293b;

    border-radius: 19px;

    overflow: hidden;

    box-shadow:
        0 18px 45px
        rgba(0,0,0,0.22);

    max-height: 380px;

    overflow-y: auto;

    display: none;

    animation:
        resultsIn
        0.18s ease;
}

@keyframes resultsIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.search-result {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px 16px;

    border-bottom:
        1px solid
        rgba(0,0,0,0.06);

    cursor: pointer;

    transition:
        background 0.15s ease;
}

.search-result:hover {
    background: #f4f8fc;
}

.result-icon {
    width: 40px;
    height: 40px;

    border-radius: 13px;

    background: #e8f3ff;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #1976e8;

    font-size: 16px;

    flex-shrink: 0;
}

.result-content {
    flex: 1;

    min-width: 0;
}

.result-name {
    display: block;

    font-size: 15px;

    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.result-location {
    display: block;

    margin-top: 4px;

    font-size: 12px;

    color: #7b8794;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.result-arrow {
    color: #a0a9b5;

    font-size: 22px;
}


/* =========================
   STATUS
   ========================= */

.status {
    text-align: center;

    margin:
        12px 0 15px;

    font-size: 13px;

    color:
        rgba(255,255,255,0.75);
}


/* =========================
   CARDS
   ========================= */

.card {
    position: relative;

    background:
        var(--glass);

    border:
        1px solid
        var(--border);

    border-radius: 28px;

    padding: 24px;

    margin-bottom: 16px;

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    box-shadow:
        0 15px 40px
        rgba(0,0,0,0.10);
}


/* =========================
   LOCAL
   ========================= */

.location-card {
    text-align: center;

    padding: 19px 20px;

    font-size: 17px;

    font-weight: 600;

    letter-spacing: 0.1px;
}


/* =========================
   WEATHER
   ========================= */

.weather-card {
    min-height: 340px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}

.weather-card::before {
    content: "";

    position: absolute;

    width: 210px;
    height: 210px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.10);

    filter: blur(4px);

    top: -80px;
    right: -80px;
}

.weather-icon {
    position: relative;

    width: 145px;
    height: 145px;

    object-fit: contain;

    margin-bottom: 2px;

    filter:
        drop-shadow(
            0 10px 18px
            rgba(0,0,0,0.12)
        );

    animation:
        weatherFloat
        4s ease-in-out infinite;
}

/* =========================
   ÍCONE DE CARREGAMENTO
   ========================= */

.weather-loading {
    width: 90px;
    height: 90px;

    margin-bottom: 30px;

    animation: none;

    filter: none;
}

@keyframes weatherFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.temperature {
    font-size: 76px;

    line-height: 0.95;

    font-weight: 800;

    letter-spacing: -4px;

    text-shadow:
        0 7px 25px
        rgba(0,0,0,0.13);
}

.condition {
    margin-top: 12px;

    font-size: 18px;

    font-weight: 600;

    color:
        rgba(255,255,255,0.88);
}


/* =========================
   DADOS
   ========================= */

.data-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 11px;
}

.data-box {
    padding: 18px 12px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.11);

    border:
        1px solid
        rgba(255,255,255,0.10);

    text-align: center;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.data-box:hover {
    transform: translateY(-2px);

    background:
        rgba(255,255,255,0.16);
}

.data-box span {
    display: block;

    font-size: 12px;

    color:
        rgba(255,255,255,0.68);
}

.data-box strong {
    display: block;

    margin-top: 8px;

    font-size: 21px;

    font-weight: 700;
}


/* =========================
   COORDENADAS
   ========================= */

.coordinates {
    text-align: center;
}

.coordinates h2 {
    font-size: 17px;

    margin-bottom: 16px;
}

.coordinates p {
    margin-top: 9px;

    font-size: 14px;

    color:
        rgba(255,255,255,0.72);
}

.coordinates span {
    color: white;

    font-weight: 700;
}


/* =========================
   BOTÃO LOCALIZAÇÃO
   ========================= */

.location-button {
    width: 100%;

    height: 55px;

    border: none;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.95);

    color: #1769df;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px
        rgba(0,0,0,0.12);

    transition:
        transform 0.15s ease;
}

.location-button:active {
    transform: scale(0.97);
}


/* =========================
   FOOTER
   ========================= */

footer {
    text-align: center;

    margin-top: 24px;

    padding-bottom: 10px;

    font-size: 12px;

    color:
        rgba(255,255,255,0.55);
}


/* =========================
   SCROLL DA PESQUISA
   ========================= */

.search-results::-webkit-scrollbar {
    width: 5px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 10px;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 420px) {

    body {
        padding: 14px;
    }

    .header h1 {
        font-size: 34px;
    }

    .search-box {
        gap: 7px;
    }

    .search-button {
        padding: 0 15px;
    }

    .weather-card {
        min-height: 320px;
    }

    .weather-icon {
        width: 125px;
        height: 125px;
    }

    .temperature {
        font-size: 67px;
    }

}


@media (max-width: 350px) {

    .search-box {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }

    .search-results {
        top: 120px;
    }

}

/* =========================
   ÍCONE DE CARREGAMENTO
   ========================= */

.weather-loading {
    animation: none;

    filter: none;

    width: 90px;
    height: 90px;

    margin-bottom: 30px;
}

/* =========================
   PREVISÃO
   ========================= */

.forecast-card {
    width: 100%;

    padding: 20px;

    margin-bottom: 16px;

    overflow: hidden;
}

.forecast-title {
    text-align: center;

    font-size: 18px;

    font-weight: 700;

    margin-bottom: 16px;
}

.forecast-list {
    display: flex;

    width: 100%;

    gap: 10px;

    overflow-x: auto;

    padding-bottom: 5px;
}

.forecast-day {
    min-width: 92px;

    flex: 0 0 92px;

    padding: 13px 8px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.11);

    border:
        1px solid
        rgba(255,255,255,0.10);

    text-align: center;
}

.forecast-name {
    font-size: 13px;

    font-weight: 700;
}

.forecast-icon {
    display: block;

    width: 55px;
    height: 55px;

    margin: 7px auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 5px 10px
            rgba(0,0,0,0.10)
        );
}

.forecast-condition {
    min-height: 28px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 10px;

    line-height: 13px;

    color:
        rgba(255,255,255,0.70);
}

.forecast-temperature {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 7px;

    margin-top: 7px;
}

.forecast-max {
    font-size: 17px;

    font-weight: 700;
}

.forecast-min {
    font-size: 14px;

    color:
        rgba(255,255,255,0.55);
}

.forecast-loading,
.forecast-error {
    width: 100%;

    padding: 18px;

    text-align: center;

    font-size: 14px;

    color:
        rgba(255,255,255,0.70);
}

.forecast-list::-webkit-scrollbar {
    height: 4px;
}

.forecast-list::-webkit-scrollbar-thumb {
    background:
        rgba(255,255,255,0.30);

    border-radius: 10px;
}

/* =========================
   ESPORTES AO AR LIVRE
   ========================= */

.outdoor-sports-card {
    padding: 20px;
}

.sports-header {
    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 16px;
}

.sports-header > .material-symbols-outlined {
    width: 46px;
    height: 46px;

    border-radius: 15px;

    background:
        rgba(255,255,255,0.14);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 25px;
}

.sports-header h2 {
    font-size: 18px;

    font-weight: 700;
}

.sports-header p {
    margin-top: 4px;

    font-size: 12px;

    color:
        rgba(255,255,255,0.65);
}


/* =========================
   STATUS DO ESPORTE
   ========================= */

.sports-status {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 17px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.11);

    border:
        1px solid
        rgba(255,255,255,0.10);

    transition:
        background 0.25s ease;
}

.sports-status > .material-symbols-outlined {
    width: 48px;
    height: 48px;

    border-radius: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(255,255,255,0.14);

    font-size: 27px;

    flex-shrink: 0;
}

.sports-status strong {
    display: block;

    font-size: 16px;

    font-weight: 700;
}

.sports-status span:not(.material-symbols-outlined) {
    display: block;

    margin-top: 5px;

    font-size: 12px;

    line-height: 17px;

    color:
        rgba(255,255,255,0.70);
}


/* =========================
   ESTADOS
   ========================= */

.sports-good {
    background:
        rgba(50, 205, 100, 0.18);
}

.sports-moderate {
    background:
        rgba(255, 190, 50, 0.18);
}

.sports-bad {
    background:
        rgba(255, 80, 80, 0.18);
}

/* =========================
   AVISOS CLIMÁTICOS
   ========================= */

.alerts-card {
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Estado de perigo (Ativado via JS quando há alertas) */
.alerts-card.has-alerts {
    background: rgba(255, 60, 60, 0.22);
    border: 1px solid rgba(255, 100, 100, 0.45);
}

.alerts-header {
    display: flex;
    align-items: center;
    gap: 13px;
}

.alert-icon-white {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 53px !important;
    font-variation-settings: 'FILL' 1;
    flex-shrink: 0;
}





.alerts-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.alerts-header p {
    margin-top: 3px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.alerts-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.alert-item strong {
    display: block;
    font-size: 14px;
    color: #fff;
}

.alert-item p {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}
