/**
 * FXKorea 메인 스타일시트
 * 공통 스타일 정의
 */

/* ===== 헤더 스타일 ===== */
.main-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

/* 로고 */
.header-left {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.logo-text:hover {
    color: #1e87f0;
}

/* 네비게이션 메뉴 */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
    margin: 0 40px;
}

.nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: #1e87f0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1e87f0;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* 헤더 오른쪽 영역 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 검색바 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 200px;
    padding: 8px 36px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
}

.search-input:focus {
    width: 250px;
    border-color: #1e87f0;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
}

/* 다크모드 토글 */
.dark-mode-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #475569;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.dark-mode-toggle:hover {
    background: #f1f5f9;
    color: #1e87f0;
}

/* 로그인 링크 */
.login-link {
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.2s;
}

.login-link:hover {
    color: #1e87f0;
}

/* 회원가입 버튼 */
.signup-btn {
    background: linear-gradient(135deg, #1e87f0 0%, #3b82f6 100%);
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(30, 135, 240, 0.2);
}

.signup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 135, 240, 0.3);
}

/* 사용자 메뉴 */
.user-menu {
    position: relative;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-link:hover {
    background: #f1f5f9;
    color: #1e87f0;
}

.user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #1e87f0;
}

.dropdown-item i {
    font-size: 18px;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #475569;
    font-size: 24px;
}

/* 모바일 메뉴 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #475569;
    font-size: 24px;
}

.mobile-nav {
    padding: 20px 0;
}

.mobile-nav-link {
    display: block;
    padding: 14px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: #f1f5f9;
    color: #1e87f0;
}

.mobile-nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 20px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .header-nav {
        gap: 24px;
        margin: 0 20px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 200px;
    }
}

@media (max-width: 960px) {
    .header-nav {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .dark-mode-toggle {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .login-link {
        display: none;
    }
    
    .signup-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 다크모드 스타일 */
.dark-mode .main-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

.dark-mode .logo-text {
    color: #f1f5f9;
}

.dark-mode .nav-link {
    color: #cbd5e1;
}

.dark-mode .nav-link:hover {
    color: #60a5fa;
}

.dark-mode .search-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-mode .search-input:focus {
    background: #475569;
    border-color: #60a5fa;
}

.dark-mode .search-icon {
    color: #94a3b8;
}

.dark-mode .dark-mode-toggle {
    color: #cbd5e1;
}

.dark-mode .dark-mode-toggle:hover {
    background: #334155;
    color: #60a5fa;
}

.dark-mode .login-link {
    color: #cbd5e1;
}

.dark-mode .login-link:hover {
    color: #60a5fa;
}

.dark-mode .user-link {
    color: #cbd5e1;
}

.dark-mode .user-link:hover {
    background: #334155;
    color: #60a5fa;
}

.dark-mode .user-dropdown {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .dropdown-item {
    color: #cbd5e1;
}

.dark-mode .dropdown-item:hover {
    background: #334155;
    color: #60a5fa;
}

.dark-mode .mobile-menu {
    background: #1e293b;
}

.dark-mode .mobile-menu-header {
    border-bottom-color: #334155;
}

.dark-mode .mobile-menu-header h3 {
    color: #f1f5f9;
}

.dark-mode .mobile-nav-link {
    color: #cbd5e1;
}

.dark-mode .mobile-nav-link:hover {
    background: #334155;
    color: #60a5fa;
}

/* ===== 기존 스타일 유지 ===== */

/* 배너 자리 스타일 */
.banner-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2em;
    font-weight: bold;
}

/* 이미지 자리 스타일 */
.image-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
}
