* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden; /* 옆으로 스크롤 방지 */
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff;
    margin-left: 80px;
    margin-right: 80px;
    margin-top: 40px;
    margin-bottom: 60px;
    padding: 0;
    line-height: 1.5;
    overflow-x: hidden; /* 옆으로 스크롤 방지 */
    border-radius: 12px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    body {
        margin-left: 12px;
        margin-right: 12px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    body {
        margin-left: 8px;
        margin-right: 8px;
        margin-top: 16px;
        margin-bottom: 20px;
    }
}

/* Updated color scheme for a modern look */
.header {
    background: #f9fafb;
}


.header-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0px;
    height: 72px;
    position: relative;
    z-index: 2;
    gap: 40px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.aceplanet-logo {
    height: 40px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.aceplanet-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-icon:hover {
    transform: scale(1.05) rotate(2deg);
}

.hexagon {
    width: 20px;
    height: 20px;
    background: #0a0a0a;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: relative;
    z-index: 2;
}

.connection-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

.line {
    position: absolute;
    background: #8b5cf6;
    height: 2px;
    width: 20px;
    top: 50%;
    left: 50%;
    transform-origin: left center;
    opacity: 0.8;
}

.line-1 {
    transform: translate(-50%, -50%) rotate(0deg);
}

.line-2 {
    transform: translate(-50%, -50%) rotate(120deg);
}

.line-3 {
    transform: translate(-50%, -50%) rotate(240deg);
}

.connection-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

.dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #a855f7;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.dot-1 {
    transform: translate(-50%, -50%) translate(20px, 0);
}

.dot-2 {
    transform: translate(-50%, -50%) translate(-10px, 17px);
}

.dot-3 {
    transform: translate(-50%, -50%) translate(-10px, -17px);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 28px;
    color: #06b6d4;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}


/* 메인 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 48px;
    align-items: center;
}

.nav-link {
    color: #1e293b;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.1px;
    padding: 12px 0;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    writing-mode: horizontal-tb !important;
    text-align: center !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #3b82f6;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: #0f172a;
    transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.btn {
    padding: 12px 24px;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: #ffffff;
    letter-spacing: -0.1px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
}

.btn:hover::before {
    opacity: 1;
}

.btn-login {
    border-color: #3b82f6;
    color: #ffffff;
    background: #3b82f6;
}

.btn-login:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.btn-register {
    border-color: #10b981;
    color: #ffffff;
    background: #10b981;
    font-weight: 700;
}

.btn-register:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
    margin-left: auto;
}

.welcome-message {
    color: #334155;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0;
    letter-spacing: -0.3px;
}

.user-name {
    color: #1e293b;
    font-weight: 600;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    letter-spacing: -0.1px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    writing-mode: horizontal-tb !important;
    margin-right: 20px;
}

.user-name:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-logout {
    background: #0096C7;
    color: #ffffff;
    border: 1px solid #0096C7;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    backdrop-filter: blur(10px);
}

.btn-logout:hover {
    background: #0077B6;
    border-color: #0077B6;
    color: #ffffff;
    transform: translateY(-1px);
}


.login-status {
    display: none;
}

.logout-status {
    display: none;
}

/* JavaScript로 제어되는 상태 */
.login-status.visible {
    display: flex !important;
}

.logout-status.visible {
    display: flex !important;
}

/* 숨김 상태 강제 적용 */
.login-status.hidden {
    display: none !important;
}

.logout-status.hidden {
    display: none !important;
}

/* 모바일 토글 버튼 */
.mobile-toggle {
    display: none; /* 데스크톱에서는 숨김 */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
}

/* 모바일에서만 토글 버튼 표시 */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.mobile-toggle.active span:first-child {
    transform: rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:last-child {
    transform: rotate(-45deg);
}

/* 모바일 사이드바 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    transition: right 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    display: none; /* 데스크톱에서는 숨김 */
}

/* 모바일에서만 사이드바 표시 */
@media (max-width: 768px) {
    .mobile-sidebar {
        display: block;
    }
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.mobile-sidebar-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.mobile-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 16px 20px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #ffffff;
    padding-left: 30px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none; /* 데스크톱에서는 숨김 */
}

/* 모바일에서만 오버레이 표시 */
@media (max-width: 768px) {
    .mobile-overlay {
        display: block;
    }
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 12px;
        height: auto;
        padding: 16px 16px;
        align-items: center;
        justify-content: space-between;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
        order: 3;
    }
    
    .nav-buttons {
        order: 2;
        margin-left: 0;
        margin-right: 12px;
    }
    
    .user-info {
        order: 2;
        margin-right: 12px;
    }
    
    .logo {
        font-size: 18px;
        flex-shrink: 0;
        letter-spacing: -0.6px;
    }
    
    .aceplanet-logo {
        height: 32px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .hexagon {
        width: 20px;
        height: 20px;
    }
    
    .connection-lines {
        width: 50px;
        height: 50px;
    }
    
    .line {
        width: 16px;
    }
    
    .connection-dots {
        width: 50px;
        height: 50px;
    }
    
    .dot {
        width: 4px;
        height: 4px;
    }
    
    .dot-1 {
        transform: translate(-50%, -50%) translate(16px, 0);
    }
    
    .dot-2 {
        transform: translate(-50%, -50%) translate(-8px, 14px);
    }
    
    .dot-3 {
        transform: translate(-50%, -50%) translate(-8px, -14px);
    }
    
    .logo-main {
        font-size: 20px;
    }
    
    .logo-sub {
        font-size: 8px;
    }
    
    .nav-buttons {
        display: flex !important;
        gap: 10px;
        margin-left: auto;
        margin-right: 60px;
    }
    
    .user-info {
        display: flex !important;
        gap: 12px;
        margin-left: auto;
        margin-right: 60px;
        align-items: center;
    }
    
    .btn {
        font-size: 13px;
        padding: 8px 14px;
        min-width: 70px;
        max-width: 90px;
    }
    
    .welcome-message {
        font-size: 12px;
        display: none;
    }
    
    .user-name {
        font-size: 12px;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: #000000;
    }
    
    .btn-logout {
        font-size: 12px;
        padding: 6px 12px;
        background: #0096C7;
        border-color: #0096C7;
    }

    
    /* 로그인 상태일 때만 오른쪽 여백 적용 */
    .user-info.visible {
        margin-right: 60px;
    }
    
    .nav-buttons.visible {
        margin-right: 60px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 12px 12px;
        gap: 10px;
        justify-content: space-between;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
        order: 3;
    }
    
    .nav-buttons {
        order: 2;
        margin-left: 0;
        margin-right: 10px;
    }
    
    .user-info {
        order: 2;
        margin-right: 10px;
    }
    
    .mobile-sidebar {
        width: 280px;
    }
    
    .logo {
        font-size: 16px;
        flex-shrink: 0;
        letter-spacing: -0.4px;
    }
    
    .aceplanet-logo {
        height: 28px;
    }
    
    .logo::before {
        font-size: 14px;
    }
    
    .btn {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 60px;
        max-width: 80px;
    }
    
    .welcome-message {
        display: none;
    }
    
    .user-name {
        font-size: 11px;
        padding: 3px 6px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: #000000;
    }
    
    .btn-logout {
        font-size: 11px;
        padding: 5px 10px;
        background: #0096C7;
        border-color: #0096C7;
    }
    /* 소형 모바일에서도 토글 버튼 공간 확보 */
    .user-info.visible {
        margin-right: 0px;
    }
    
    .nav-buttons.visible {
        margin-right: 0px;
    }
}

/* 드롭다운 메뉴 스타일 */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 8px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 8px;
}

.dropdown-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}