/**
 * 통합 네비게이션 스타일
 * 모든 페이지에서 일관된 네비게이션 스타일 제공
 */

/* 네비게이션 바 기본 스타일 */
.navbar {
    background: linear-gradient(135deg, rgba(17, 25, 40, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(97, 218, 251, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* 브랜드 로고 */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #61dafb;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-brand:hover {
    color: #8ae8ff;
    transform: translateX(5px);
}

.nav-brand svg {
    color: #61dafb;
    transition: transform 0.3s;
}

.nav-brand:hover svg {
    transform: rotate(360deg);
}

/* 메뉴 리스트 */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(97, 218, 251, 0.1);
    color: #61dafb;
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(97, 218, 251, 0.2);
    color: #61dafb;
    font-weight: 500;
}

.nav-icon {
    font-size: 1.2rem;
}

/* 드롭다운 메뉴 */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(17, 25, 40, 0.98);
    border: 1px solid rgba(97, 218, 251, 0.2);
    border-radius: 8px;
    padding: 8px;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    list-style: none;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(97, 218, 251, 0.1);
    color: #61dafb;
    transform: translateX(5px);
}

.dropdown-menu a.active {
    background: rgba(97, 218, 251, 0.2);
    color: #61dafb;
    font-weight: 500;
}

.service-icon {
    font-size: 1.1rem;
}

/* 상태 표시 */
.nav-status {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

.connection-status.disconnected .status-dot {
    background: #ef4444;
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.time {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #61dafb;
}

/* 모바일 토글 버튼 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #cbd5e1;
    margin: 3px 0;
    transition: all 0.3s;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }
    
    .nav-brand {
        flex: 1;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(17, 25, 40, 0.98);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s;
        overflow-y: auto;
    }
    
    .nav-menu.mobile-open {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
        margin-left: 20px;
        box-shadow: none;
        border: none;
        background: rgba(30, 41, 59, 0.5);
    }
    
    .nav-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-brand span {
        display: none;
    }
    
    .nav-brand svg {
        width: 35px;
        height: 35px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: linear-gradient(135deg, rgba(10, 15, 25, 0.98) 0%, rgba(20, 30, 45, 0.98) 100%);
    }
    
    .dropdown-menu {
        background: rgba(10, 15, 25, 0.98);
    }
}

/* 접근성 향상 */
.nav-link:focus,
.dropdown-menu a:focus {
    outline: 2px solid #61dafb;
    outline-offset: 2px;
}

/* 스크롤시 네비게이션 축소 */
.navbar.scrolled {
    height: 50px;
}

.navbar.scrolled .nav-container {
    height: 50px;
}

.navbar.scrolled .nav-link {
    padding: 8px 12px;
}

/* 로딩 상태 */
.navbar.loading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #61dafb, transparent);
    animation: loading 1.5s linear infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}