/* DATAX - 67tool.com 완전 복제 스타일 (헤더 및 사이드바 전용) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* 상단 헤더 */
.top-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: auto;
}

.logo:hover {
    text-decoration: none;
    color: #3b82f6;
}

.logo:focus {
    text-decoration: none;
    outline: none;
}

.logo:visited {
    text-decoration: none;
    color: #3b82f6;
}

.logo i {
    font-size: 24px;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-nav a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}

.header-nav a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.header-nav a:visited {
    text-decoration: none;
    color: #64748b;
}

.header-nav a:focus {
    text-decoration: none;
    outline: none;
}

.header-nav a.active {
    color: #3b82f6;
    font-weight: 600;
}

.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

/* 헤더 우측 영역 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

/* 검색 컨테이너 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 240px;
    height: 38px;
    padding: 0 40px 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-btn:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

/* 메인 레이아웃 구성 */
.main-layout {
    width: 100%;
    margin-top: 70px; /* 헤더 높이만큼 여백 */
    min-height: calc(100vh - 70px);
}

.main-container{

}

.main-left-sidebar{
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 100;
}

/* 센터 콘텐츠 영역 */
.main-content {
    flex: 1;
    padding: 0;
    background: #f8fafc;
}
.main-content-sidebar {
    flex: 1;
    margin-left: 280px; /* 사이드바 너비만큼 여백 */
    padding: 0;
    background: #f8fafc;
}



.content-area {
    flex: 1;
    padding: 20px;
    background: #f8fafc;
    margin: 0 auto;
    max-width: 1200px;
}


/* 푸터 */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 40px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #94a3b8;
}

/* 반응형 */
@media (max-width: 1024px) {
    .header-container {
        position: relative;
        justify-content: flex-start;
    }

    .header-nav {
        display: none;
        position: static;
        transform: none;
        left: auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-input {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        position: relative;
    }

    .header-nav {
        display: none;
        position: static;
        transform: none;
        left: auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-input {
        width: 160px;
        font-size: 13px;
    }

    .logo {
        font-size: 24px;
    }

    .logo i {
        font-size: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        position: relative;
        gap: 10px;
    }

    .logo {
        font-size: 22px;
    }

    .logo i {
        font-size: 18px;
    }

    .search-container {
        display: none;
    }

    .header-right {
        gap: 8px;
    }
}

/* ========== 모바일 네비게이션 추가 CSS ========== */

/* 모바일 네비게이션 드롭다운 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.show {
    display: block;
    transform: translateY(0);
}

.mobile-nav-content {
    padding: 0;
}

.mobile-nav a {
    display: block;
    padding: 16px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    background: #f8fafc;
    color: #3b82f6;
    text-decoration: none;
}

.mobile-nav a.active {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
    border-left: 3px solid #3b82f6;
}

/* 사이드바 모바일 대응 개선 */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* 사이드바 모바일 상태 */
.main-left-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.main-left-sidebar.show {
    transform: translateX(0);
}

/* 반응형 개선 */
@media (max-width: 1024px) {
    .header-nav {
        display: none; /* 데스크톱 네비 숨김 */
    }

    .mobile-nav {
        display: block; /* 모바일 네비 활성화 */
    }

    .main-left-sidebar {
        transform: translateX(-100%); /* 기본적으로 숨김 */
    }

    .main-content-sidebar {
        margin-left: 0; /* 사이드바 여백 제거 */
    }
}

@media (max-width: 768px) {
    .mobile-nav a {
        padding: 14px 15px;
        font-size: 14px;
    }
}

@media (min-width: 1025px) {
    .mobile-nav {
        display: none !important; /* 데스크톱에서 완전히 숨김 */
    }

    .main-left-sidebar {
        transform: translateX(0); /* 데스크톱에서 항상 보임 */
    }

    .mobile-sidebar-overlay {
        display: none !important;
    }
}




/* 즐겨찾기 섹션 */
.favorites-section {
    border-bottom: 1px solid #e2e8f0;
    background: white;

}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.favorites-header:hover {
    background: #f1f5f9;
}

.favorites-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
}

.favorites-title i {
    color: #f59e0b;
}

.favorites-count {
    font-size: 11px;
    background: #f59e0b;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.favorites-toggle {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    padding: 4px;
    border-radius: 4px;
}

.favorites-toggle:hover {
    background: #e5e7eb;
    color: #374151;
}

.favorites-toggle i.expanded {
    transform: rotate(180deg);
}

.favorites-list {
    display: none;
    padding: 0;
    background: #f9fafb;
    max-height: 125px;
    overflow-y: auto;
}

.favorites-list.expanded {
    display: block;
}

.empty-favorites {
    padding: 24px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

.empty-favorites i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.favorite-tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none !important;
    color: #64748b;
    font-size: 12px;
    transition: all 0.2s;
    border-left: 3px solid #f59e0b;
    position: relative;
    min-height: 42px;
}

.favorite-tool-link:hover {
    background: #fef3c7;
    color: #92400e;
    text-decoration: none !important;
}

.favorite-tool-link .remove-favorite {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #f59e0b;
    cursor: pointer;
    font-size: 10px;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s;
}

.favorite-tool-link:focus {
    text-decoration: none !important;
    outline: none;
}

.favorite-tool-link:visited {
    text-decoration: none !important;
    color: #64748b;
}

.favorite-tool-link .remove-favorite:hover {
    background: #f59e0b;
    color: white;
}

/* 즐겨찾기 버튼 */
.favorite-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    margin-right: 5px;
    transition: all 0.2s;
    border-radius: 3px;
    flex-shrink: 0;
}

.favorite-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    color: #f59e0b;
}

.favorite-btn.favorited:hover {
    color: #d97706;
}
