body {
    margin: 0;
    padding: 0;
    background-color: white;
}

.main {
    width: 40%;
    margin: 0 auto;
    padding: 4em 1em 0 1em;
}

.main .topbar {
    height: 3.4em;
    line-height: 3.4em;
    margin-bottom: 1em;
    background-color: #EEE;
    box-shadow: 0 2px 5px #DDD;
    position: fixed;
    top: 0;
    width: inherit;
    z-index: 10;
}

.main .topbar .doclink {
    float: left;
    position: relative;
    z-index: 10;
    margin-left: 1em;
    font-size: 12px;
}

.main .cityname {
    font-size: 1.5em;
    width: 70%;
    margin: 0 auto;
    text-align: center;
}

.main .topbar .citylink {
    float: right;
    position: relative;
    z-index: 10;
    margin-right: 1em;
    font-size: 12px;
}

.main .topbar .dropdown {
    line-height: normal;
    position: relative;
    float: right;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    padding: 8px;
    gap: 8px;
}

.main .topbar .dropdown.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.main .topbar .dropdown-list {
    width: 140px;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    border-radius: 8px;
    background: #f8fafc;
    padding: 4px;
}

.main .topbar .dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.main .topbar .dropdown-list::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.main .topbar .dropdown-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 3px;
}

.main .topbar .dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #4a5568;
    position: relative;
    overflow: hidden;
}

.main .topbar .dropdown-item:hover {
    background: #edf2f7;
    color: #2b6cb0;
}

.main .topbar .dropdown-item.active {
    background: #ebf8ff;
    color: #2b6cb0;
    font-weight: 500;
}

.main .topbar .dropdown-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4299e1;
    border-radius: 0 2px 2px 0;
    animation: slideIn 0.2s ease;
}

.main .weather-title {
    clear: both;
    text-align: center;
    margin: 2em 0;
}

.main .weather-title .realtime {
    position: relative;
    float: left;
    top: -1.5em;
    margin-bottom: -1.5em;
    z-index: 1;
    font-size: 12px;
    color: #DDD;
}

.main .weather-title .aqi-txt {
    width: 3em;
    height: 24px;
    line-height: 24px;
    margin: 0.5em auto;
    background-color: #a3d765;
    color: #FFF;
    padding: 0.2em;
    border-radius: 5px;
    font-size: 14px;
}

.main .weather-title .aqi-txt.lev1 {
    background-color: #44cf12
}

.main .weather-title .aqi-txt.lev2 {
    background-color: #eec50b
}

.main .weather-title .aqi-txt.lev3 {
    background-color: #f6b42c
}

.main .weather-title .aqi-txt.lev4 {
    background-color: #fa5535
}

.main .weather-title .aqi-txt.lev5 {
    background-color: #e31b40
}

.main .weather-title .aqi-txt.lev6 {
    background-color: #8e0636
}

.main .weather-title .info {
    font-size: 1.8em;
}

.main .hour3-datas .info {
    display: flex;
    justify-content: space-between;
    padding: 0.3em 0;
}

.main .hour3-datas .info .date span {
    font-size: larger;
}

.main .hour3-datas ul {
    border-top: 1px dashed #DDD;
    border-bottom: 1px dashed #DDD;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 10%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.main .hour3-datas ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5em;
}

.main .hour3-datas ul li label {
    display: block;
}

.main .hour3-datas ul li div {
    flex-grow: 2;
    padding: 0;
}

.main .hour3-datas ul li img {
    display: block;
}

.main .next7days-weahter {
    margin: 1em 0;
}

.main .next7days-weahter ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.main .next7days-weahter ul li {
    display: flex;
    width: 100%;
    text-align: center;
    font-size: 1.2em;
    justify-items: space-between;
    align-items: center;
}

.main .next7days-weahter ul li .week {
    margin: 1em;
}

.main .next7days-weahter ul li .icon {
    flex-grow: 2;
}

.main .next7days-weahter ul li .temp span {
    margin: 1em;
}

.main .next7days-weahter ul li .temp span:last-of-type {
    color: #AAA;
}

.main .sunrise-reset {
    display: flex;
    justify-content: space-between;
    padding: 0.3em 0;
}

.main .life-style ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-flow: row wrap;
}

.main .life-style ul li {
    width: 45%;
    height: 5em;
    display: flex;
    flex-direction: column;
    float: left;
    justify-content: center;
    border: 1px dashed #DDD;
    padding: 0.5em;
    margin: 0.5em 0;
}

.main .data-description {
    margin: 3em 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: #DDD;
    font-size: 14px;
}

@media screen and (max-width: 600px) {
    .main {
        width: 100%;
        padding: 4em 0 0 0;
    }
    .main .weather-title,
    .main .hour3-datas,
    .main .next7days-weahter,
    .main .life-style,
    .main .data-description {
        padding: 0 1em;
    }
    .main .life-style ul li {
        width: 44%;
    }

    .main .topbar .dropdown-list {
        width: 7em;
    }
}

@media screen and (max-width: 960px) and (min-width: 600px) {
    .main {
        width: 80%;
    }

    .main .topbar .dropdown-list {
        width: 140px;
    }
}