/* 공통 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Pretendard";
    list-style: none;
}

a {
    font-family: "Pretendard";
    color: inherit;
    text-decoration: none;
}
.logo a {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    letter-spacing: 2.5px;
}

:root {
    --main-blue: #4f7cff;
    --main-background: #101522;
}

/*---------------------------------------*/

.navbar a {
    font-size: 18px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    z-index: 10000;

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;

    background-color: rgba(10, 15, 30, 0.9);
    font-size: 18px;
}

.logo {
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
}

.menu {
    display: flex;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    gap: 24px;
}

.menu a {
    position: relative;
    padding: 8px 4px;
    color: #fff;
    text-decoration: none;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--main-blue),
        transparent
    );
    transform: translateX(-50%);
    transition: width 0.35s ease;
}

.menu a:hover::after {
    width: 160%;
}

.user-menu {
    display: flex;
    gap: 12px;
}

.user-menu a:hover {
    opacity: 50%;
}

.user-menu a {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
}

.user-menu a:first-child {
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 16px;
}
.user-menu a:last-child {
    background: var(--main-blue);
    font-weight: 500;
    font-size: 16px;
}
.user-menu.login {
    height: 50px;
    display: flex;
    padding: 10px 0;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;

    padding: 0;
    border-radius: 8px;
    background: none;
    border: none;
}
.user-menu.login li {
    justify-self: start;
}
.user-menu.login li:hover {
    opacity: 100%;
}

.user-menu.login img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    padding: 2px;
    border: 0.5px solid #aaa;
}
.user-menu.login ul {
    border-radius: 10px;
    padding: 10px;
}
.user-menu.login ul li:first-child::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: #fff;
    margin: 6px 0;
}
.user-menu.login ul li {
    text-align: left;
}
.user-menu.login ul img {
    width: 25px;
    height: 25px;
    border-radius: 0;
    border: none;
}

.user-menu.login .nickname {
    font-size: 16px;
    white-space: nowrap;
}

.user-menu:hover ul a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 5px 13px;
    border-radius: 8px;
    background: none;
    border: none;
}
.user-menu:hover ul {
    display: block;
}
.user-menu ul img {
    width: 40px;
    height: 40px;
    filter: invert(100);
}
.user-menu ul {
    position: fixed;
    background: rgba(10, 15, 30, 0.9);
    top: 55px;
    right: 10px;
    display: none;
    border: 1px solid #fff;
}

/* =====================
    헤더 반응형 처리
===================== */

@media (max-width: 768px) {
    /* 1. 중앙 메뉴 전체 숨기기 (영화, 애니메이션, 리뷰) */
    .menu {
        display: none;
    }

    /* 2. 회원가입 버튼 숨기기 */
    .user-menu a:last-child {
        display: none;
    }

    .user-menu a {
        background: var(--main-blue);
        font-weight: 500;
        font-size: 16px;
    }

    /* 3. 네비게이션 바 정렬 조정 */
    .navbar {
        padding: 16px 20px;
        /* 좌우 여백을 줄여 공간 확보 */
        justify-content: space-between;
        /* 로고는 왼쪽, 로그인은 오른쪽 끝 배치 */
    }

    .user-menu a:first-child {
        font-size: 15px;
        /* 화면이 작으니 글자 크기 살짝 축소 */
        padding: 8px 10px;
        /* 버튼 형태보다 텍스트 위주로 보이게 조정 */
    }
}
