
/* =================PC Header CSS Start================= */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
    z-index: 1000;
    height: 70px;
    transition: all 0.4s ease;
    font-family: 'Paperlogy', sans-serif;
}

.header-container.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.header-container.scrolled-dark {
    background-color: #141414 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border-bottom: none !important;
}

.header-container .header-content {
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-container .logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 40px;
}

.header-container .logo-container img {
    height: 40px;
    width: auto;
}

.header-container .nav-container {
    display: flex;
    flex: 1;
}

.header-container .nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-container .nav-link {
    font-weight: 600;
    font-size: 16px;
    color: white;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.header-container.scrolled .nav-link {
    color: #000000;
}

.header-container.scrolled-dark .nav-link {
    color: #ffffff;
}

.header-container.scrolled .nav-link:hover {
    color: #e53e3e;
}

.header-container .auth-container {
    margin-left: auto;
}

.header-container .login-text {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.header-container.scrolled .login-text {
    color: #000000;
}

.header-container.scrolled-dark .login-text {
    color: #ffffff;
}

.header-container .login-text:hover {
    color: #e53e3e;
}

.header-container .user-profile {
    position: relative;
    margin-left: auto;
}

.header-container .user-profile .profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.header-container .user-profile .profile-trigger:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.header-container.scrolled .user-profile .profile-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header-container .user-profile .profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-container .user-profile .profile-name {
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.header-container.scrolled .user-profile .profile-name {
    color: #000000;
}

.header-container.scrolled-dark .user-profile .profile-name {
    color: #fff;
}

.header-container .user-profile .profile-arrow {
    color: white;
    font-size: 12px;
}

.header-container.scrolled .user-profile .profile-arrow {
    color: #000000;
}

.header-container.scrolled-dark .user-profile .profile-arrow {
    color: #ffffff;
}

.header-container .user-profile .profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.header-container .user-profile .profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== Skeleton ===== */
.header-container .user-profile .dropdown-skeleton {
    padding: 20px;
}

.header-container .user-profile .header-skeleton-item {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: header-skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.header-container .user-profile .skeleton-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.header-container .user-profile .skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.header-container .user-profile .skeleton-name {
    width: 80px;
    height: 16px;
}

.header-container .user-profile .skeleton-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.header-container .user-profile .skeleton-stat {
    text-align: center;
}

.header-container .user-profile .skeleton-stat-number {
    width: 30px;
    height: 18px;
    margin: 0 auto 4px;
}

.header-container .user-profile .skeleton-stat-desc {
    width: 40px;
    height: 12px;
    margin: 0 auto;
}

.header-container .user-profile .skeleton-menu-item {
    width: 100%;
    height: 20px;
    margin-bottom: 12px;
}

.header-container .user-profile .skeleton-divider {
    width: 100%;
    height: 1px;
    background: #e0e0e0;
    margin: 16px 0;
}

@keyframes header-skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== Dropdown Content ===== */
.header-container .user-profile .dropdown-content {
    display: none;
}

.header-container .user-profile .dropdown-content.loaded {
    display: block;
}

.header-container .user-profile .dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* 프로필 링크 래퍼(디자인 유지) */
.header-container .user-profile .dropdown-profile-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* dropdown-profile: hover 효과 제거 */
.header-container .user-profile .dropdown-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.header-container .user-profile .dropdown-profile-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.header-container .user-profile .dropdown-profile-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

/* (기존 hover 무력화) */
.header-container .user-profile .dropdown-profile-link:hover .dropdown-profile-info h3 {
    color: #000000;
}

/* Stats: 충돌 방지 */
.header-container .user-profile .header-user-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.header-container .user-profile .header-stat-item {
    text-align: center;
    cursor: pointer;
}

.header-container .user-profile .header-stat-item .number {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.header-container .user-profile .header-stat-item .description {
    font-size: 12px;
    color: #666666;
    margin-top: 4px;
}

/* Inventory: hover 배경색만 변경 */
.header-container .user-profile .inventory-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
    color: #000000;
    background-color: #ffffff;
}

.header-container .user-profile .inventory-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #000000;
}

/* ===== Dropdown Sections / Items (PC 전용 강화) ===== */
.header-container .user-profile .header-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

.header-container .user-profile .header-dropdown-section {
    padding: 12px 20px;
}

.header-container .user-profile .dropdown-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* 기존 .dropdown-section border-bottom 사용하던 구조가 바뀌었으니
   PC 드롭다운에서는 header-dropdown-divider로 구분하고
   dropdown-section의 border-bottom은 제거(겹침 방지) */
.header-container .user-profile .dropdown-content .dropdown-section {
    border-bottom: none;
    padding: 12px 20px;
}

.header-container .user-profile .header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.18s ease;
}

.header-container .user-profile .header-dropdown-item:hover {
    color: #e53e3e;
}

.header-container .user-profile .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-container .user-profile .dropdown-item:hover {
    color: #e53e3e;
}

.header-container .user-profile .dropdown-item .badge {
    margin-left: auto;
    background: #e53e3e;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.header-container .user-profile .logout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.header-container .user-profile .logout-item:hover {
    background-color: #f8f8f8;
}

/* 로그아웃을 마지막 블록처럼 보이게 약간 톤 다운 */
.header-container .user-profile .header-logout-item {
    border-top: 1px solid #f0f0f0;
}

/* ---- 부분 로딩(개별 도착) UI ---- */
.header-container .user-profile .is-loading {
    position: relative;
    color: transparent !important;
    user-select: none;
}

.header-container .user-profile .is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: header-skeleton-shimmer 1.5s infinite;
}
/* =================PC Header CSS End================= */

/* =================Mobile Navbar CSS Start================= */
.mobile-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    box-shadow: none;
    border-bottom: none;
    z-index: 1000;
    height: 56px;
    transition: all 0.4s ease;
    font-family: 'Paperlogy', sans-serif;
}

.mobile-navbar.scrolled {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
}

.mobile-navbar.scrolled-dark {
    background-color: #141414;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: none;
}

.mobile-navbar .mobile-navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

.mobile-navbar .mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-navbar .mobile-logo img {
    height: 32px;
    width: auto;
}

.mobile-navbar .mobile-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.3s ease;
}

.mobile-navbar.scrolled .mobile-menu-btn {
    color: #000000;
}

.mobile-navbar.scrolled-dark .mobile-menu-btn {
    color: #ffffff;
}
/* =================Mobile Navbar CSS End================= */

/* =================Mobile Sidebar CSS Start================= */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font-family: 'Paperlogy', sans-serif;
}

.mobile-sidebar.show {
    right: 0;
}

body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mobile-sidebar .sidebar-content {
    padding: 0;
    min-height: 100%;
}

.mobile-sidebar .sidebar-profile-section {
    position: relative;
    padding: 20px;
    background: #fff;
}

.mobile-sidebar .sidebar-close-in-profile {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.mobile-sidebar .sidebar-close-in-profile:active {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-sidebar .sidebar-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-right: 40px;
}

.mobile-sidebar .sidebar-profile-image {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-sidebar .sidebar-profile-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 4px;
    margin-top: 0;
}

.mobile-sidebar .sidebar-user-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.mobile-sidebar .sidebar-stat-item {
    text-align: center;
}

.mobile-sidebar .sidebar-stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
}

.mobile-sidebar .sidebar-stat-desc {
    font-size: 12px;
    color: #666666;
}

.mobile-sidebar .sidebar-storage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-sidebar .sidebar-storage-btn:hover {
    background-color: #f9fafb;
}

.mobile-sidebar .sidebar-guest-section {
    position: relative;
    padding: 20px;
    background: #f9fafb;
}

.mobile-sidebar .sidebar-close-in-guest {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.mobile-sidebar .sidebar-close-in-guest:active {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-sidebar .sidebar-welcome {
    text-align: center;
    margin-bottom: 20px;
}

.mobile-sidebar .sidebar-welcome h2 {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
    margin-top: 0;
}

.mobile-sidebar .sidebar-welcome p {
    color: #666666;
    font-size: 14px;
    margin: 0;
}

.mobile-sidebar .sidebar-login-btn {
    display: block;
    width: 100%;
    background: #e53e3e;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.mobile-sidebar .sidebar-login-btn:hover {
    background: #dc2626;
}

.mobile-sidebar .sidebar-menu-section {
    padding: 8px 0;
}

.mobile-sidebar .sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-sidebar .sidebar-menu-item:active {
    background-color: #f9fafb;
}

.mobile-sidebar .sidebar-menu-item i {
    width: 20px;
    font-size: 16px;
    color: #666666;
}

.mobile-sidebar .sidebar-menu-badge {
    margin-left: auto;
    background: #f0f0f0;
    color: #666666;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.mobile-sidebar .sidebar-menu-new {
    margin-left: auto;
    background: #e53e3e;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.mobile-sidebar .sidebar-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.mobile-sidebar .sidebar-menu li {
    margin: 0;
}

.mobile-sidebar .sidebar-menu a {
    display: block;
    color: #000000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 20px;
    transition: background-color 0.3s ease;
}

.mobile-sidebar .sidebar-menu a:active {
    background-color: #f9fafb;
}

.mobile-sidebar .sidebar-divider {
    height: 8px;
    background: #f0f0f0;
    margin: 0;
}

.mobile-sidebar .sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-sidebar .sidebar-logout-btn:active {
    background-color: #f9fafb;
}

.mobile-sidebar .sidebar-logout-btn i {
    width: 20px;
    font-size: 16px;
    color: #666666;
}
/* =================Mobile Sidebar CSS End================= */
