/*  
기본 Reset
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter',
                 -apple-system,
                 BlinkMacSystemFont,
                 'Apple SD Gothic Neo',
                 'Noto Sans KR',
                 'Malgun Gothic',
                 'Segoe UI',
                 sans-serif;
}

main {
    margin-top: 0; /* fixed 제거했으므로 margin 불필요 */
}


/*
NAVBAR
*/
.navbar {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: #111;
    position: relative; /* fixed를 relative로 변경 */
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-logo {
    flex: 1;
}

.logo-image {
    height: 50px;
}

.market-logo-image {
    height: 80px;
}

.logo-link {
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    color: #b70701;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-weight: bold;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    font-weight: bold;
}

.nav-item {
    text-decoration: none;
    color: #ffffff;
    font-size: 17px;
}

.nav-item:hover {
    color: #e2e2e2;
}

#nav-guest {
    display: flex;
    align-items: center;
}

#nav-user {
    display: flex;
}

#nav-user.hidden {
    display: none !important;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #d9d9d9;
}

.hidden {
    display: none !important;
}

.profile-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.user-icon-btn:hover .profile-circle {
    transform: scale(1.05);
}

#profileInitial {
    user-select: none;
}

.mobile-only-notice {
    display: none;
}


/* user dropdown menu */
.user-menu-container {
    position: relative;
}

.user-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.user-icon-btn:hover {
    background: #f5f5f5;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px); 
    right: 0;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
    animation: dropdownSlide 0.2s ease-out;
}

.dropdown-profile {
    display: flex;
    align-items: center;
    padding: 13px;
    gap: 14px;
}

.profile-circle.big {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.dropdown-profile-text {
    display: flex;
    flex-direction: column;
}

.dropdown-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c2c2c;
}

.dropdown-email {
    font-size: 11px;
    color: #9a9a9a;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #505050;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

#logoutBtn {
    padding-top: 4px;
    padding-bottom: 10px;
}


/*
Footer
*/
.footer-container {
    background-color: #111;
    color: #a9a9a9;
    padding: 50px 10%;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.footer-top {
    margin-bottom: 30px;
}

.footer-top a {
    color: #a9a9a9;
    text-decoration: underline;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px 0;
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.footer-links a {
    color: #a9a9a9;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-info h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.footer-info p {
    margin: 5px 0;
    font-size: 12px; 
}



/*
Navbar Responsive 
*/


@media (max-width: 1024px) {
    .navbar {
        padding: 0 20px;
    }
    
    .nav-center {
        gap: 15px;
        position: absolute; left: 50%; transform: translateX(-50%);
    }

    .nav-item {
        font-size: 15px;
    }

    .nav-right {
        display: none;
    }

    .logo-image {
        height: 45px;
    }

    .market-logo-image {
        height: 75px;
    }

    .nav-market {
        display: none !important;
    }

}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-center {
        display: none; 
        position: fixed;
        top: 70px;
        left: 0;
        transform: none;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        z-index: 999;
        color: #111;
    }

    .nav-center.active {
        display: flex;
    }

    .nav-item {
        font-size: 24px; 
        padding: 20px 0;
        width: 100%;
        text-align: center;
        color: #111;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-right {
        display: none;
    }

    .mobile-only-notice {
        display: block;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        margin-top: auto; 
        border-top: 1px solid #f0f0f0; 
    }

    .mobile-only-notice p {
        font-size: 14px;
        color: #b70701;
        font-weight: 600;
        margin: 0;
    }

    .logo-image {
        height: 35px;
    }

    .market-logo-image {
        height: 55px;
    }

    .nav-market {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .nav-center {
        gap: 8px;
    }

    .nav-item {
        font-size: 13px;
    }
    
    .logo-link {
        font-size: 20px;
    }
}

/*
Footer Responsive
*/

@media (max-width: 740px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}