/* ========================================
   Navbar - Linie-inspired Design
   ======================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.35s ease, backdrop-filter 0.35s ease;
}

.top-nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.top-nav.scrolled .nav-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.top-nav.scrolled .menu-item {
    color: rgba(255, 255, 255, 0.6);
}

.top-nav.scrolled .menu-item:hover,
.top-nav.scrolled .menu-item.active {
    color: #ffffff;
}

.top-nav.scrolled .menu-badge {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.top-nav.scrolled .btn-login {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

.top-nav.scrolled .btn-login:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.top-nav.scrolled .btn-register {
    background: #ffffff;
    color: #0a0a0a;
}

.top-nav.scrolled .nav-logo-img {
    filter: invert(1);
}

.top-nav.scrolled .profile-button {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.top-nav.scrolled .profile-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.top-nav.scrolled .profile-avatar {
    border-color: rgba(255, 255, 255, 0.2);
}

.top-nav.scrolled .profile-username {
    color: rgba(255, 255, 255, 0.85);
}

.top-nav.scrolled .profile-button i {
    color: rgba(255, 255, 255, 0.4);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 왼쪽: 로고 */
.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 2;
}

/* 가운데: 메뉴 (절대 위치 중앙) */
.main-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.menu-item {
    position: relative;
    padding: 8px 20px;
    color: rgba(10, 10, 10, 0.55);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.menu-item:hover {
    color: #0a0a0a;
}

.menu-item.active {
    color: #0a0a0a;
    font-weight: 500;
}

.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    background: rgba(10, 10, 10, 0.08);
    color: rgba(10, 10, 10, 0.6);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: super;
    line-height: 1;
}

/* 오른쪽: 인증 영역 */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    z-index: 2;
}

/* 로그인/회원가입 버튼 */
.btn-auth {
    padding: 8px 20px;
    border: none;
    border-radius: 100px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.3px;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.btn-login {
    background: transparent;
    color: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(10, 10, 10, 0.15);
}

.btn-login:hover {
    color: #0a0a0a;
    border-color: rgba(10, 10, 10, 0.4);
    background: rgba(10, 10, 10, 0.04);
}

.btn-register {
    background: #0a0a0a;
    color: #ffffff;
}

.btn-register:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

/* ========================================
   프로필 드롭다운
   ======================================== */
.profile-dropdown-container {
    position: relative;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 10, 0.04);
    border: 1px solid rgba(10, 10, 10, 0.15);
    border-radius: 100px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(10, 10, 10, 0.7);
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.profile-button:hover {
    background: rgba(10, 10, 10, 0.08);
    border-color: rgba(10, 10, 10, 0.3);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(10, 10, 10, 0.15);
}

.profile-username {
    font-size: 13px;
    font-weight: 400;
    color: rgba(10, 10, 10, 0.7);
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.profile-button i {
    font-size: 10px;
    color: rgba(10, 10, 10, 0.35);
    transition: transform 0.2s ease;
}

.profile-button.active i {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-username {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.dropdown-bio {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.dropdown-coins {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ffd700;
    font-family: "JetBrains Mono", monospace;
}

.dropdown-coins i {
    font-size: 13px;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.dropdown-item:hover i {
    color: rgba(255, 255, 255, 0.7);
}

.dropdown-item span {
    font-size: 13px;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.dropdown-item.logout {
    color: #ff4444;
}

.dropdown-item.logout i {
    color: #ff4444;
}

.dropdown-item.logout:hover {
    background: rgba(255, 68, 68, 0.08);
}

/* ========================================
   반응형
   ======================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .nav-row {
        height: 60px;
    }

    .main-menu {
        display: none;
    }

    .menu-badge {
        display: none;
    }
}
