:root {
    --header-height: 55px;
    --container-width: 100%;
}

body {
    margin: 0;
    user-select: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 4;
}

#login {
    display: none;
    width: 400px;
    max-width: calc(100vw - 64px);
    background-color: #ffffff;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 5;
    transform: translate(-50%, -50%);
    padding: 32px;
    border-radius: 20px;
}

#login>*:nth-child(1) {
    display: flex;
}

.close {
    width: 23px;
    height: 23px;
    position: relative;
    cursor: pointer;
}

.close::before {
    content: '';
    display: block;
    position: absolute;
    width: 130%;
    height: 10%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background-color: #000;
}

.close::after {
    content: '';
    display: block;
    position: absolute;
    width: 130%;
    height: 10%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background-color: #000;
}

#login .logo {
    justify-content: left;
}

#login>h3 {
    margin: 0;
    font-size: 20px;
}

#login .social>div {
    display: flex;
    font-size: 20px;
    white-space: nowrap;
    width: 100%;
    margin-top: 30px;
}

#login .social>div:nth-child(1)> :nth-child(1) {
    margin-right: 10px;
}

#login .social>div:nth-child(2) {
    margin-top: 10px;
}

#login .social>div>div {
    display: flex;
    justify-content: center;
    border: 1px solid;
    border-radius: 10px;
    padding: 10px;
    flex-grow: 1;
    cursor: pointer;
}

.kakao-logo {
    background-image: url(./imgs/kakaotalk.png);
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.google-logo {
    background-image: url(./imgs/google.webp);
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.apple-logo {
    background-image: url(./imgs/apple.png);
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    filter: invert(100%);
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: #fff;
}

.container {
    width: var(--container-width);
}

.logo {
    width: 400px;
    display: flex;
    justify-content: center;
    line-height: var(--header-height);
}

.logo>div:nth-of-type(1) {
    width: var(--header-height);
    height: var(--header-height);
    background-image: url(./imgs/icon.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: var(--header-height) var(--header-height);
}

.burger-bar {
    display: none;
}

.menu-bar {
    display: flex;
}

.menu-bar > :first-child:not(.menu-item) {
    display: flex;
}

.menu-item {
    padding-left: 10px;
    padding-right: 10px;
    line-height: var(--header-height);
    white-space: nowrap;
}

.menu-item:hover {
    background-color: #D9D9D9;
}

.search {
    width: var(--header-height);
    height: var(--header-height);
    background-image: url(./imgs/search.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    background-color: #D9D9D9;
}

#log {
    width: 20vw;
    max-width: 220px;
    line-height: var(--header-height);
    text-align: center;
    background-color: #70B4F4;
    color: #fff;
    cursor: pointer;
}

#recommend {
    position: relative;
    height: 400px;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#recommend::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 400px;
    z-index: -1;
    background-image: url(./imgs/mainback.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 30%;
    filter: blur(5px) brightness(40%);

}

#recommend>form {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-evenly;
}

#recommend>form>div:nth-of-type(1) {
    display: flex;
    width: 430px;
    justify-content: space-between;
}

#recommend>form>div:nth-of-type(1)>* {
    display: flex;
    align-items: center;
    border: 1px solid #fff;
    background-color: #D9D9D91A;
    border-radius: 30px;
    padding: 10px;
    padding-left: 20px;
    width: 160px;
    justify-content: space-between;
    color: #fff;
    position: relative;
}

#recommend>form>div:nth-of-type(1)>* span {
    white-space: nowrap;
    max-width: calc(160px - 20px);
    /* dropdown 이미지 공간 확보 */
    overflow: hidden;
    text-overflow: ellipsis;
}

#recommend>form>div:nth-of-type(1)>input::placeholder {
    color: #fff;
    font-size: 16px;
    transform: translateY(2px);
}

#recommend>form>div:nth-of-type(1)>input:focus {
    outline: none;
}

.dropdown-icon {
    background-image: url(./imgs/back.png);
    width: 20px;
    height: 20px;
    rotate: -90deg;
    background-size: 40px 40px;
    background-position: center;
    filter: invert(80%);
    /* 이미지 색상을 검은색에서 흰색으로 반전 */
}

.dropdown-icon.open {
    rotate: 90deg;
}

#cities {
    display: none;
    position: absolute;
    top: 46px;
    background-color: #fff;
    color: #000;
    border: 1px solid #D9D9D9;
    text-align: left;
    z-index: 2;
}

#cities.open {
    display: block;
}

#cities>.city {
    position: relative;
    font-weight: normal;
}

#cities>.city:hover {
    background-color: #D9D9D9;
}

#cities>.city:not(:last-child) {
    border-bottom: inherit;
}

#cities>.city>.child {
    position: absolute;
    top: -1px;
    left: 100%;
    max-height: 350px;
    overflow-y: auto;
    background-color: #fff;
    white-space: nowrap;
    border: 1px solid #D9D9D9;
}

#cities>.city>.child {
    display: none;
}

#cities>.city:hover>.child {
    display: block;
}

#cities>.city>.child>.city:not(:last-child) {
    border-bottom: inherit;
}

#cities>.city>.child>.city:hover {
    background-color: #D9D9D9;
}

#recommend>form>div:nth-of-type(2) {
    width: 380px;
    display: flex;
    justify-content: space-between;
}

#recommend>form>div:nth-of-type(2)>* {
    padding: 12px;
    font-size: 16px;
    border-radius: 35px;
    color: #fff;
}

#recommend>form>div:nth-of-type(2)>*:nth-of-type(1) {
    background-color: #E94E38;
}

#recommend>form>div:nth-of-type(2)>*:nth-of-type(2) {
    background-color: #389FE9;
}

.sub-header {
    /* position: static; */
    width: 100%;
    top: var(--header-height);
    display: flex;
    justify-content: center;
    z-index: 1;
}

.sub-header>div {
    width: 95%;
    display: flex;
    justify-content: center;
}

.sub-header .logo {
    width: min-content;
    white-space: nowrap;
    line-height: var(--header-height);
    display: flex;
    justify-content: right;
}

.sub-header .menu-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.sub-header>div>*:not(:nth-of-type(2)) {
    flex: 2;
}

.sub-header>div>*:nth-of-type(2) {
    flex-grow: 1;
}

.sub-header .menu-bar > .menu-item {
    display: flex;
    align-items: center;
    border-radius: 30px;
    padding: 10px;
    padding-left: 10px;
    margin: 10px;
    width: 100px;
    height: min-content;
    justify-content: space-between;
    color: #D9D9D9;
    position: relative;
    box-shadow: 0px 0px 3px 2px #D9D9D9;
}

.sub-header .menu-bar>.menu-item:not(:last-child) {
    margin-right: 10px;
}

.sub-header .logo span {
    display: flex;
    align-items: center;
}

.sub-header .menu-bar>.menu-item span {
    line-height: normal;
}

.sub-header>div>*:last-child {
    display: flex;
    align-items: center;
}

.sub-header>div>*:last-child>.food {
    width: 40px;
    height: 40px;
    background-size: 40px 40px;
    background-image: url(./imgs/food.png);
    margin-right: 10px;
}

.sub-header>div>*:last-child>.settings {
    width: 40px;
    height: 40px;
    background-size: 40px 40px;
    background-image: url(./imgs/settings.png);
}

#hotplace {
    background-color: #F3F1F2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

#hotplace > .container {
    width: 80%;
}


#hotplace > .container > div {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr);
}

#hotplace > .container .attraction {
    margin: 0 auto;
    width: 200px;
    min-height: 200px;
    padding: 7px;
    border-radius: 7px;
    box-shadow: 0 0 4px 2px #D9D9D9;
    background-color: #fff;
    margin-top: 10px;
    margin-bottom: 10px;
}

#hotplace > .container .attraction > *:nth-child(1) {
    width: 100%;
    padding-top: 66.7%;
    background-size: cover;
}

#hotplace > .container > div:nth-of-type(1) > .attraction.auto {
    width: 80%;
}

#hotplace > .container > div:nth-of-type(1) > .attraction.auto:hover {
    transition: width 150ms ease;
    width: 85%;
}

#hotplace > .container .attraction:hover {
    transition: width 150ms ease;
    width: 215px;
}

#hotplace > .container > div:nth-of-type(1) {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

footer {
    width: 100%;
    border-top: 1px solid #D9D9D9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer>div:nth-of-type(1) {
    display: flex;
}

footer>div:nth-of-type(1)>div:nth-of-type(2) {
    margin-left: 80px;
    display: flex;
    flex-direction: column;
}

footer>*:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer>*:last-child>div {
    display: flex;
    width: 200px;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 50px;
}

footer>*:last-child>div>* {
    width: 30px;
    height: 30px;
    background-size: 30px 30px;
}

@media (min-width: 1000px) {
    :root {
        --container-width: 60%
    }

    header {
        min-width: 960px;
    }

    .container {
        min-width: 960px;
    }

    footer {
        min-width: 960px;
    }
}

@media (max-width: 800px) {
    .burger-bar {
        width: var(--header-height);
        height: var(--header-height);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .burger-bar > div {
        width: 50%;
        height: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        position: relative;
    }

    .burger-bar > div > div {
        width: 100%;
        height: 3px;
        background-color: #000;
    }

    .burger-bar > div > div.open {
        position: absolute;
        top: 50%;
        left: 50%;
    }

    .menu-bar > :first-child:not(.menu-item) {
        position: absolute;
        top: 100%;
        left: 0;
        transform: translateX(-101%);
        height: calc(100vh - 100%);
        display: flex;
        flex-direction: column;
        background-color: #D9D9D9;
    }

    .menu-item:hover {
        background-color: #fff;
    }

    #recommend {
        height: 320px;
    }

    #recommend>form>div:nth-of-type(1) {
        max-width: 90vw;
    }

    #recommend>form>div:nth-of-type(1)>* {
        max-width: calc(42vw - 32px);
    }

    #recommend>form>div:nth-of-type(1)>* span {
        white-space: nowrap;
        max-width: calc(calc(42vw - 32px) - 20px);
        /* dropdown 이미지 공간 확보 */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #recommend>form>div:nth-of-type(2) {
        max-width: 80vw;
    }

    .sub-header>div {
        width: 97%;
    }
        
    .sub-header .menu-bar>.menu-item {
        font-size: 12px;
        padding: 7.5px;
        width: 78px;
        margin: 5px;
    }
    
    #hotplace > .container {
        width: 100%;
    }
}