:root {
    --glass: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.18);
    --text-secondary: rgba(255, 255, 255, 0.7);
}

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

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: white;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    padding: 30px 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    z-index: 100;
    pointer-events: none;
    line-height: 1.4;
}

#app {
    width: 100%;
    max-width: 1100px;
    padding: 0 15px 40px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    zoom: 1.25;
}

.grid-container {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-card {
    min-height: 400px;
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
}

.main-weather { 
    display: flex; 
    flex-grow: 1;
    align-items: center; 
    justify-content: center;
    gap: 30px;
}

#main-icon {
    width: 100px;
    height: 100px;
}

.temp {
    font-size: 5rem;
    font-weight: 300;
}

.temp-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feels {
    display: block;
    opacity: 0.8;
    margin-top: -10px;
}

.quick-stats { 
    display: flex; 
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
}

.quick-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.small {
    width: 300px;
}

.small h3 {
    font-size: 1.1rem;
    font-weight: 400;
}

.sub {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-bottom: 15px;
}

.val-row { 
    display: flex; 
    align-items: baseline;
    gap: 8px; 
    margin-top: auto;
}

.location-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.big-val { 
    font-size: 1.6rem;
    font-weight: 500;
    white-space: nowrap;
}

.desc { 
    font-size: 0.85rem; 
    opacity: 0.7; 
    line-height: 1.2;
}

.forecast-p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 10px;
}

.icon-small { 
    width: 18px; 
    vertical-align: middle;
}

.icon-tiny {
    width: 14px;
    vertical-align: middle;
    opacity: 0.7;
}

.side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 950px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    header { padding: 40px 20px 20px 20px; }

    #app {
        justify-content: flex-start;
        zoom: 1.1;
    }
}

@media (max-width: 950px) and (min-width: 500px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .small {
        width: 100%;
    }
    
    header { padding: 40px 20px 20px 20px; }

    #app { justify-content: flex-start; }
}

@media (max-width: 500px) {
    #app {
        zoom: 1;
    }

    .side-grid {
        grid-template-columns: 1fr;
    }
    
    .main-weather {
        flex-direction: column;
        gap: 10px;
        padding: 20px 0;
    }

    .quick-stats {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .temp { font-size: 4.5rem; }
    
    .card { padding: 20px; }

    .small {
        width: 100%;
    }
}