/* ===================================
   AiGoAgi 2025 모던 스타일시트
   =================================== */

/* 커스텀 CSS 변수 (2025 트렌드) */
:root {
    /* Go AGI 브랜드 컬러 */
    --primary-green: #059669;
    --primary-green-light: #10b981;
    --primary-green-dark: #047857;
    --accent-blue: #0ea5e9;
    --accent-purple: #8b5cf6;
    
    /* 뉴모피즘 & 글래스모피즘 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --neo-shadow-light: rgba(255, 255, 255, 0.7);
    --neo-shadow-dark: rgba(0, 0, 0, 0.15);
    
    /* 그라디언트 */
    --gradient-primary: linear-gradient(135deg, #059669 0%, #0ea5e9 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #059669 50%, #8b5cf6 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* 간격 */
    --border-radius-sm: 12px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    /* 애니메이션 */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 리셋 및 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   헤더 스타일 (2025 모던)
   =================================== */

.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* 헤더 액션 영역 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 로고 스타일 (2025 모던) */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1f2937;
    transition: var(--transition-bounce);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
}

.logo:hover {
    transform: translateY(-2px);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.logo-icon {
    position: relative;
    width: 42px;
    height: 42px;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.logo-icon .fas {
    position: absolute;
    font-size: 24px;
    transition: var(--transition-bounce);
}

.logo-icon .fa-bullseye {
    color: var(--primary-green);
    z-index: 1;
}

.logo-icon .logo-arrow {
    color: var(--accent-blue);
    font-size: 16px;
    transform: translateX(8px);
    opacity: 0.8;
}

.logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.1);
}

.logo:hover .logo-icon .logo-arrow {
    transform: translateX(12px);
    opacity: 1;
}

.logo:hover .logo-icon .fa-bullseye {
    color: white;
}

.logo:hover .logo-icon .fa-arrow-right {
    color: rgba(255, 255, 255, 0.9);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo:hover .logo-name {
    -webkit-text-fill-color: white;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    line-height: 1;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.logo:hover .logo-subtitle {
    color: white;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 네비게이션 */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav a:hover {
    color: #0ea5e9;
    background-color: #f0f9ff;
}

.nav a.active {
    color: #0ea5e9;
    background-color: #eff6ff;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #4b5563;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===================================
   언어 선택 보텀시트
   =================================== */

/* 언어 버튼 */
.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.language-btn:hover {
    background: #f9fafb;
    border-color: #10b981;
}

/* 오버레이 */
.language-bottomsheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
}

.language-bottomsheet-overlay.show {
    display: block;
}

/* 보텀시트 */
.language-bottomsheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.language-bottomsheet.show {
    transform: translateY(0);
}

/* 보텀시트 헤더 */
.bottomsheet-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    position: relative;
}

.bottomsheet-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

.bottomsheet-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

/* 모바일 보텀시트 닫기 버튼 */
.mobile-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-smooth);
    z-index: 10;
}

.mobile-close-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 모바일에서만 닫기 버튼 표시 */
@media (max-width: 768px) {
    .mobile-close-btn {
        display: flex;
    }
    
    /* 보텀시트 헤더에 패딩 조정 */
    .bottomsheet-header h3,
    .sidebar h3 {
        padding-right: 48px;
    }
}

/* 보텀시트 콘텐츠 */
.bottomsheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* 언어 섹션 */
.language-section {
    margin-bottom: 8px;
}

.language-section-title {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 언어 구분선 */
.language-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 16px;
}

/* 언어 아이템 */
.language-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    margin: 2px 8px;
}

.language-item:hover {
    background: #f3f4f6;
}

.language-item.selected {
    background: #ecfdf5;
    color: #10b981;
    font-weight: 500;
}

.language-item.priority {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.language-item.priority:hover {
    background: #f1f5f9;
}

.language-item.priority.selected {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.language-item svg {
    color: #10b981;
}

.language-item.priority.selected svg {
    color: #1d4ed8;
}

.language-item small {
    color: #6b7280;
    font-size: 11px;
}

/* PC에서는 기본 순서 (네비게이션 -> 언어버튼) */

@media (max-width: 768px) {
    .language-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .language-btn span {
        display: none;
    }
    
    .language-btn svg:last-child {
        display: none;
    }
}

/* ===================================
   메인 콘텐츠 스타일
   =================================== */

.ai-tools-main {
    min-height: calc(100vh - 80px);
}

/* Hero Section (2025 모던) */
.hero-section {
    background: var(--gradient-hero);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.08)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    from { transform: translateY(0px) rotate(0deg); }
    to { transform: translateY(-100px) rotate(360deg); }
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* 검색 섹션 (2025 모던) */
.search-section {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-form {
    display: flex;
    gap: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 12px;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.search-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

.search-form:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(5, 150, 105, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
    outline: none;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
}

.search-input:focus {
    background: white;
    box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(5, 150, 105, 0.4);
}

.search-btn i {
    font-size: 1rem;
}

/* 콘텐츠 래퍼 */
.content-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 사이드바 (2025 모던 + 스크롤 문제 해결) */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 20px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    height: fit-content;
    max-height: calc(100vh - 140px);
    position: sticky;
    top: 100px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f2937;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 12px;
}

.sidebar h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
    margin: 0 -4px;
}

/* 사이드바 스크롤바 커스텀 */
.category-list::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green-dark);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    color: #4b5563;
    border-radius: 6px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
    margin: 1px 4px;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition-bounce);
    opacity: 0.1;
}

.category-item:hover::before {
    left: 0;
}

.category-item:hover {
    color: var(--primary-green);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}

.category-item.active {
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.category-item.active::before {
    display: none;
}

.category-item .count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    background: rgba(241, 245, 249, 0.8);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    line-height: 1.4;
}

.category-item:hover .count {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-green);
}

.category-item.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 카테고리 그룹 스타일 */
.category-group {
    margin-bottom: 4px;
}

/* 부모 카테고리 스타일 */
.parent-category {
    position: relative;
    font-weight: 600;
}

/* 서브카테고리 리스트 */
.subcategory-list {
    margin-top: 2px;
    margin-bottom: 4px;
    padding-left: 12px;
    border-left: 2px solid rgba(5, 150, 105, 0.15);
    margin-left: 8px;
}

/* 서브카테고리 아이템 */
.subcategory-item {
    font-size: 0.8rem !important;
    padding: 8px 10px !important;
    margin-left: 0;
    position: relative;
    color: #6b7280 !important;
}

.subcategory-item.active {
    background: var(--primary-green) !important;
    color: white !important;
    border-radius: 6px;
}

.subcategory-item::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: rgba(5, 150, 105, 0.3);
    transform: translateY(-50%);
}

.subcategory-item:hover::before {
    background: var(--primary-green);
}

.subcategory-item.active::before {
    background: rgba(255, 255, 255, 0.8);
}

/* 카테고리 이름 스타일 */
.category-name {
    flex: 1;
    margin-right: 8px;
}

/* 카테고리 아이템 레이아웃 조정 */
.category-item {
    padding-left: 16px;
}

/* 부모 카테고리에 서브카테고리가 없을 때 */
.parent-category:not(:has(.category-expand-icon)) {
    padding-left: 16px !important;
}

/* 모바일 카테고리 버튼 */
.mobile-category-btn {
    display: none;
    width: 100%;
    padding: 12px 16px;
    margin-top: 20px;
    margin-bottom: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: #1f2937;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-category-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-green);
}

.mobile-category-btn i:first-child {
    font-size: 1.1rem;
}

.mobile-category-btn i:last-child {
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.mobile-category-btn:hover i:last-child {
    transform: translateY(2px);
}

/* 카테고리 시트 오버레이 */
.category-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.category-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .category-sheet-overlay {
        display: block;
    }
}

/* 모바일/태블릿 바텀시트 스타일 */
@media (max-width: 1024px) {
    /* Fix for mobile bottomsheet h3 color */
    .sidebar.mobile-sheet-active h3 {
        color: #1f2937 !important;
        -webkit-text-fill-color: #1f2937 !important;
    }
    
    .mobile-category-btn {
        display: flex;
    }
    
    .category-sheet-overlay {
        display: block;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-height: 80vh;
        transform: translateY(100%);
        transition: var(--transition-bounce);
        z-index: 1002;
        border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
        display: none;
        background: #f8fafc;
    }
    
    .sidebar.mobile-sheet-active {
        display: flex;
        transform: translateY(0);
    }
    
    /* 바텀시트 핸들 */
    .sidebar::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
    }
    
    .sidebar h3 {
        padding-top: 12px;
        position: sticky;
        top: 0;
        background: #f8fafc;
        backdrop-filter: blur(20px);
        z-index: 1;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 16px;
        margin-bottom: 0;
        color: #1f2937 !important;
        -webkit-text-fill-color: #1f2937 !important;
    }
    
    .category-list {
        padding: 16px 12px;
        max-height: calc(80vh - 80px);
        overflow-y: auto;
    }
    
    /* 모바일에서 카테고리 아이템 스타일 개선 */
    .sidebar.mobile-sheet-active .category-item {
        margin: 4px 8px;
        padding: 14px 16px;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }
    
    .sidebar.mobile-sheet-active .category-item:hover {
        background: #f9fafb;
        border-color: var(--primary-green);
    }
    
    .sidebar.mobile-sheet-active .category-item.active {
        background: var(--gradient-primary);
        border-color: transparent;
    }
    
    /* 서브카테고리 스타일 개선 */
    .sidebar.mobile-sheet-active .subcategory-list {
        margin: 8px 0 8px 8px;
    }
    
    .sidebar.mobile-sheet-active .subcategory-item {
        background: #f9fafb;
        margin: 4px 8px;
    }
}

/* 메인 콘텐츠 */
.main-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 결과 헤더 */
.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.results-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.results-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* 정렬 옵션 */
.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.sort-options label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.sort-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-md);
    background: white;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    appearance: none;
}

.sort-select:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* 도구 그리드 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.tool-header {
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-title a {
    text-decoration: none;
    color: #1f2937;
    transition: color 0.2s ease;
}

.tool-title a:hover {
    color: #0ea5e9;
}

.tool-category {
    display: inline-block;
    background: #e0f2fe;
    color: #0891b2;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tool-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
}

.tag:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.tag.active {
    background: var(--primary-green);
    color: white;
}

.tool-footer {
    margin-top: auto;
}

.tool-link {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    text-align: center;
    width: 100%;
}

.tool-link:hover {
    background: #0284c7;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.page-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.page-link.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

/* ===================================
   푸터 스타일
   =================================== */

.footer {
    background: #1f2937;
    color: #d1d5db;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-section h3,
.footer-section h4 {
    color: #f9fafb;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 1.5rem;
}

.footer-section h4 {
    font-size: 1.125rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    position: relative;
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-icon .fas {
    position: absolute;
    transition: var(--transition-smooth);
}

.footer-logo-icon .fa-bullseye {
    font-size: 20px;
    color: var(--primary-green);
}

.footer-logo-icon .fa-arrow-right {
    font-size: 14px;
    color: var(--accent-blue);
    transform: translateX(6px);
}

/* Hero section accent color */
.text-accent {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-stats {
    font-size: 0.875rem;
}

.footer-stats strong {
    color: #0ea5e9;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #0ea5e9;
}

.footer-section ul li small {
    color: #9ca3af;
}

/* 소셜 링크 */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #374151;
    color: #d1d5db;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: #0ea5e9;
    color: white;
}

/* 푸터 하단 */
.footer-bottom {
    border-top: 1px solid #374151;
    padding: 2rem 0;
}

.footer-bottom-content {
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: #9ca3af;
}

.footer-description {
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #0ea5e9;
}

.separator {
    color: #6b7280;
}

/* ===================================
   반응형 디자인
   =================================== */

/* 태블릿 전용 스타일 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    /* 태블릿에서는 사이드바 유지 */
    .sidebar {
        position: sticky !important;
        transform: none !important;
        display: flex !important;
        max-height: calc(100vh - 140px) !important;
    }
    
    .mobile-category-btn {
        display: none !important;
    }
    
    .category-sheet-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    /* 헤더 레이아웃 조정 */
    .header-inner {
        position: relative;
    }
    
    .header-actions {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* 태블릿에서도 모바일 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* 태블릿에서 네비게이션 숨기기 */
    .header {
        position: relative;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 74px; /* header height + border */
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        gap: 0;
        z-index: 999;
        width: 100vw;
        max-height: calc(100vh - 74px);
        overflow-y: auto;
    }
    
    .nav.active {
        display: flex;
    }
    
    /* 네비게이션 오버레이 */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
    }
    
    .language-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .header {
        position: relative;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 74px; /* header height + border */
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        gap: 0;
        width: 100vw;
        z-index: 999;
        max-height: calc(100vh - 74px);
        overflow-y: auto;
    }
    
    .nav.active {
        display: flex;
    }
    
    /* 네비게이션 오버레이 */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
    }
    
    .nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid #e5e7eb;
        margin: 0;
        border-radius: 0;
        width: 100%;
        text-align: center;
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .search-form {
        gap: 0.5rem;
        padding: 10px;
    }
    
    .search-input {
        flex: 1;
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .search-btn {
        min-width: 50px;
        padding: 14px 16px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .search-form {
        gap: 0.5rem;
        padding: 10px;
    }
    
    .search-input {
        flex: 1;
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .search-btn {
        min-width: 50px;
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .search-btn span {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* ===================================
   유틸리티 클래스
   =================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 포커스 스타일 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ===================================
   가격 배지 스타일
   =================================== */
.tool-pricing {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.pricing-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-badge.free {
    background: #10b981;
    color: white;
}

.pricing-badge.freemium {
    background: #3b82f6;
    color: white;
}

.pricing-badge.paid {
    background: #f59e0b;
    color: white;
}

.pricing-badge.trial {
    background: #8b5cf6;
    color: white;
}

/* ===================================
   멀티 카테고리 스타일
   =================================== */
.tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 20px;
    background: #e5e7eb;
    color: #4b5563;
    transition: var(--transition-smooth);
    text-decoration: none;
    cursor: pointer;
}

.tool-category:hover {
    background: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
}

.tool-category.primary {
    background: var(--primary-green);
    color: white;
}

.tool-category.primary:hover {
    background: var(--primary-green-dark);
    color: white;
}

.tool-category.additional {
    background: #ddd6fe;
    color: #7c3aed;
    font-size: 0.7rem;
}

.tool-category.additional:hover {
    background: #c4b5fd;
    color: #6b21a8;
}

.tool-header {
    position: relative;
    margin-bottom: 0.5rem;
}

/* =============================
   바텀시트 (Bottom Sheet)
   ============================= */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #f8fafc;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1002;
    transform: translateY(100%);
    transition: var(--transition-smooth);
    max-height: 80vh;
    overflow: hidden;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    position: relative;
}

.bottom-sheet-header .bottomsheet-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

.bottom-sheet-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.bottom-sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.bottom-sheet-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.bottom-sheet-options {
    padding: 1rem;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.bottom-sheet-option {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
    color: #374151;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
}

.bottom-sheet-option:hover {
    background: #f9fafb;
    border-color: var(--primary-green);
}

.bottom-sheet-option.selected {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.bottom-sheet-option:last-child {
    margin-bottom: 0;
}

/* =============================
   커스텀 셀렉트
   ============================= */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius-md);
    background: white;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1rem;
    color: #374151;
}

.custom-select-trigger:hover {
    border-color: var(--primary-green);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.custom-select-trigger::after {
    content: '▼';
    font-size: 0.8rem;
    color: #6b7280;
    transition: var(--transition-smooth);
}

.custom-select.active .custom-select-trigger::after {
    transform: rotate(180deg);
}

/* 인라인 커스텀 셀렉트 (검색 필터용) */
.custom-select.inline {
    width: auto;
    min-width: 120px;
}

.custom-select.inline .custom-select-trigger {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* 반응형 */
@media (max-width: 768px) {
    .bottom-sheet {
        max-height: 90vh;
    }
    
    .bottom-sheet-options {
        max-height: calc(90vh - 120px);
    }
}