/* Tool Master - Modern Dashboard Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* 左側導航 */
.sidebar {
    width: 240px;
    background: #1a202c;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #2d3748;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
    color: inherit;
}

.logo-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #2d3748;
    color: white;
    border-left-color: #4299e1;
}

.nav-item.active {
    background: #2d3748;
    color: white;
    border-left-color: #667eea;
}

/* 展開式分類樣式 - 優化版本 */
.nav-item.expandable {
    flex-direction: column;
    padding: 0;
    border-left: none;
    margin: 2px 0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    width: 100%;
    position: relative;
    border-radius: 8px;
}

.nav-main:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
    border-left-color: #667eea;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.nav-item.expandable.expanded .nav-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.expandable.expanded .nav-arrow {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.nav-submenu {
    background: #1a202c;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-item.expandable.expanded .nav-submenu {
    max-height: 500px;
    padding: 8px 0;
}

.nav-submenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem 0.6rem 2.5rem;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    border-radius: 6px;
    margin: 2px 8px;
}

.nav-submenu-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: #667eea;
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.25s ease;
}

.nav-submenu-item:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #f3f4f6;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    border-left: 2px solid #667eea;
}

.nav-submenu-item:hover::before {
    width: 6px;
    height: 6px;
    opacity: 1;
    background: #93c5fd;
}

.nav-submenu-item .category-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    opacity: 0.8;
    transition: all 0.25s ease;
}

.nav-submenu-item:hover .category-icon {
    opacity: 1;
    transform: scale(1.1);
}

.nav-submenu-item .category-name {
    flex: 1;
    font-weight: 500;
}

.nav-submenu-item .submenu-count {
    font-size: 0.75rem;
    color: #6b7280;
    opacity: 0.7;
    font-weight: 400;
}

.nav-submenu-item:hover .submenu-count {
    color: #93c5fd;
    opacity: 0.9;
}

.nav-icon {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* 主內容區域 */
.main-content {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
}

/* 頂部欄 */
.topbar {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: none; /* 隱藏頂部欄以改善版面 */
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: #718096;
    font-size: 0.875rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    display: flex;
    background: #f7fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.search-container input {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    outline: none;
    width: 300px;
    font-size: 0.875rem;
}

.search-container button {
    padding: 0.5rem 1rem;
    border: none;
    background: #4299e1;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.search-container button:hover {
    background: #3182ce;
}

/* 搜尋增強功能樣式 */
.search-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    position: relative;
    z-index: 10;
}

/* 熱門標籤雲 */
.search-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tags-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.tags-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 16px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.search-tag:hover {
    background: #cbd5e0;
    color: #2d3748;
    transform: translateY(-1px);
}

.search-tag:active {
    background: #4299e1;
    color: white;
}


.user-avatar {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
}

/* 儀表板內容 */
.dashboard-layout .main-content .dashboard-content {
    /* Keep top/bottom padding, maintain 2rem left, reduce right to 0.5rem */
    padding: 2rem 0.5rem 2rem 2rem !important;
    box-sizing: border-box !important;
}

.dashboard-content {
    /* Keep top/bottom padding, maintain 2rem left, reduce right to 0.5rem */
    padding: 2rem 0.5rem 2rem 2rem !important;
}

/* 統計卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

.stat-label {
    color: #718096;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.stat-change {
    color: #48bb78;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 內容網格 - 移除，不再使用 */

/* 工具區域 */
.tools-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 100%;
    margin-bottom: 2rem;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-button.active,
.tab-button:hover {
    background: #edf2f7;
    color: #1a202c;
}

.tools-list {
    padding: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
}

.tool-item:hover {
    background: #f7fafc;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1a202c;
}

.tool-author {
    color: #718096;
    font-size: 0.875rem;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.tool-action {
    padding: 0.5rem 1rem;
    background: #1a202c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.tool-action:hover {
    background: #2d3748;
}

/* 統計和升級區塊相關樣式已移除 */

/* 分類區域 */
.categories-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    margin-bottom: 2rem;
}

.categories-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.category-card {
    background: #f7fafc;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.category-card a {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-weight: 600;
}

.category-card p {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.category-card small {
    color: #a0aec0;
    font-size: 0.75rem;
}

/* 暫無工具提示 */
.no-tools {
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: 1.125rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
    margin: 2rem 0;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .topbar-right {
        justify-content: space-between;
    }
    
    .search-container input {
        width: 200px;
    }
    
    .dashboard-content {
        padding: 1rem 0.5rem 1rem 1rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* 工具頁面樣式（保持向後相容） */
.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.tool-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 載入動畫 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: #718096;
}

/* 錯誤訊息 */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

/* Footer Styles */
footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
    border-top: 1px solid #2d3748;
}

footer .container {
    /* Remove max-width to let footer use full available space */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0.5rem 0 2rem !important;
    /* Align left with main content, reduce right padding */
}

footer .footer-content {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

footer .footer-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

footer .footer-section h4 {
    color: #e2e8f0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

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

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

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

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

footer .footer-section ul li a:hover {
    color: #667eea;
}

footer .footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 1rem;
    text-align: center;
}

footer .footer-bottom p {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    footer {
        margin-left: 0;
    }
    
    footer .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    footer .container {
        padding: 0 0.5rem 0 1rem;
    }
}

/* 廣告樣式 */
.sidebar-ad {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #2d3748;
    margin-top: auto;
    background: #1a202c;
    width: 300px;
    min-height: 250px;
    /* 使用 min-height 讓廣告自動調整 */
}

.footer-ad {
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid #2d3748;
    background: #1a202c;
    width: 300px;
    min-height: 250px;
    margin: 0 auto;
    /* 使用 min-height 讓廣告自動調整 */
}

.ad-label {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-container {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

/* 響應式廣告 */
/* 平板版 */
@media (max-width: 768px) {
    .sidebar-ad {
        display: none; /* 隱藏側邊欄廣告 */
    }
    
    .footer-ad {
        width: 320px;
        min-height: 100px;
        /* 讓廣告自動調整 */
    }
}

/* 手機版 */
@media (max-width: 480px) {
    .footer-ad {
        width: 300px;
        min-height: 100px;
        /* 讓廣告自動調整 */
    }
}

/* 語系切換樣式 */
.language-switch-container {
    padding: 1.5rem 0;
    border-bottom: 1px solid #2d3748;
    margin-bottom: 1.5rem;
}

.language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.language-label {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-btn {
    background: transparent;
    border: 1px solid #4a5568;
    color: #a0aec0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.lang-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.lang-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.separator {
    color: #4a5568;
    font-weight: 400;
}

/* 語言切換Toast樣式 */
.language-toast {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 響應式語言切換 */
@media (max-width: 768px) {
    .language-switch {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .language-label {
        text-align: center;
    }
    
    .lang-btn {
        min-width: 80px;
    }
}

/* 技術文檔區塊樣式 */
.tech-docs-section {
    margin: 40px 0;
    padding: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tech-docs-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-docs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.tech-docs-content h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.tech-docs-content p {
    color: #718096;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.docs-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.docs-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.tech-docs-icon {
    font-size: 3rem;
    opacity: 0.8;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .tech-docs-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .tech-docs-section {
        margin: 20px 0;
    }
    
    .tech-docs-icon {
        font-size: 2.5rem;
    }
}

/* 開發者資源區塊樣式 */
.developer-resources {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 40px;
    margin: 40px 0 0 0;
    color: white;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.developer-resources h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.developer-resources p {
    font-size: 1.2rem;
    margin-bottom: 50px;
    opacity: 0.9;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 30px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.resource-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.resource-card p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
    line-height: 1.5;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .developer-resources {
        padding: 40px 20px;
        margin: 20px 0 0 0;
    }
    
    .developer-resources h2 {
        font-size: 2rem;
    }
    
    .developer-resources p {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .resource-card {
        padding: 30px 20px;
    }
    
    .resource-icon {
        font-size: 2.5rem;
    }
}

/* 技術文檔專用樣式 */

/* 文檔導航列 */
.navbar {
    background: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.navbar .logo:hover {
    color: #3498db;
}

.navbar .nav-links {
    display: flex;
    gap: 2rem;
}

.navbar .nav-links a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: white;
    background: #34495e;
}

/* 技術文檔主體 */
.tech-doc-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* 文檔標題區域 */
.doc-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.doc-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.doc-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.doc-header-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.doc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.doc-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.doc-action-btn.primary {
    background: white;
    color: #667eea;
    border-color: white;
}

.doc-action-btn.primary:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* 文檔內容區域 */
.doc-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* 文檔側邊欄 */
.doc-sidebar {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
}

.doc-sidebar h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.doc-toc {
    list-style: none;
    padding: 0;
}

.doc-toc li {
    margin-bottom: 8px;
}

.doc-toc a {
    color: #7f8c8d;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.doc-toc a:hover {
    background: #ecf0f1;
    color: #2c3e50;
    transform: translateX(5px);
}

/* 文檔主要內容 */
.doc-main-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
}

/* 文檔章節 */
.doc-section {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ecf0f1;
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    padding: 15px 0;
    border-left: 4px solid #3498db;
    padding-left: 20px;
    background: linear-gradient(90deg, #f8f9fa 0%, transparent 100%);
}

.doc-section h3 {
    color: #34495e;
    font-size: 1.4rem;
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #bdc3c7;
}

.doc-section p {
    color: #5d6d7e;
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.doc-section ul {
    margin: 20px 0;
    padding-left: 0;
}

.doc-section li {
    color: #5d6d7e;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.doc-section li::before {
    content: '▶';
    color: #3498db;
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}

/* 程式碼區塊 */
.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    overflow-x: auto;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.code-block pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 資訊卡片 */
.info-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.info-card h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.warning-card {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
}

.success-card {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(85, 239, 196, 0.3);
}

/* 技術規格表格 */
.tech-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tech-spec-table th {
    background: #34495e;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.tech-spec-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
    color: #5d6d7e;
}

.tech-spec-table tr:nth-child(even) {
    background: #f8f9fa;
}

.tech-spec-table tr:hover {
    background: #e8f4fd;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .doc-content {
        grid-template-columns: 1fr;
    }
    
    .doc-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .doc-header {
        padding: 40px 20px;
    }
    
    .doc-header h1 {
        font-size: 2.5rem;
    }
    
    .doc-header-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .tech-doc-main {
        padding: 20px 15px;
    }
    
    .doc-main-content {
        padding: 25px 20px;
    }
    
    .navbar .nav-links {
        gap: 1rem;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
}

/* 實用工具類 */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
/* ========================================
   現代化首頁重構樣式
   ======================================== */

/* 隱藏舊版側邊欄和儀表板佈局 */
.sidebar {
    display: none !important;
}

.dashboard-layout {
    display: block !important;
}

/* 現代化導航欄 */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1a202c;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-logo .logo-icon {
    font-size: 1.75rem;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #4f46e5;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: width 0.3s ease;
}

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

.language-switcher-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: #f7fafc;
    border-radius: 8px;
}

.language-switcher-nav .lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.language-switcher-nav .lang-btn.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 主內容區域 */
.modern-main {
    margin-top: 70px;
    min-height: 100vh;
}

/* Hero 區塊 */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 3rem 2rem;
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(90deg, #fff, #f0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-search {
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.search-container-hero {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.search-icon {
    font-size: 1.5rem;
}

.search-container-hero input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.125rem;
    color: #1a202c;
    padding: 0.75rem 0;
}

.search-container-hero input::placeholder {
    color: #a0aec0;
}

.search-btn-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.search-btn-hero:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-tags-hero {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 0 0.5rem;
}

.search-tags-hero .tags-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

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

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-item .stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 背景裝飾球體 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ff6b9d, transparent);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #4f46e5, transparent);
    bottom: -15%;
    right: -15%;
    animation-delay: 5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #fbbf24, transparent);
    top: 40%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* 搜尋結果區塊 */
.search-results-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

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

.search-results-info {
    flex: 1;
}

.search-results-query {
    color: #4338ca;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.clear-search-btn {
    background: white;
    color: #4338ca;
    border: 2px solid #4338ca;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #4338ca;
    color: white;
}

.search-results-section .section-title {
    color: #1e1b4b;
}

.search-results-section .tools-grid {
    background: transparent;
}

.search-results-section .tool-card {
    background: white;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.1);
}

.search-results-section .no-results {
    text-align: center;
    padding: 3rem;
    color: #4338ca;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}

/* 工具區塊 */
.tools-section {
    padding: 6rem 0;
    background: #f8fafc;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 2rem;
}

.section-subtitle {
    color: #64748b;
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    background: #f1f5f9;
    color: #1a202c;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab-icon {
    font-size: 1.125rem;
}

/* 工具卡片網格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* 優化工具卡片 */
.tool-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.2) rotate(5deg);
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.tool-card:hover h3 {
    color: #667eea;
}

.tool-card p {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

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

.tool-tag {
    padding: 0.375rem 0.875rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-tag {
    background: #e0e7ff;
    color: #667eea;
}

/* 分類區塊 */
.categories-section {
    padding: 6rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: translateY(0);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.category-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    position: relative;
    z-index: 1;
}

/* Footer 調整 */
footer {
    background: #1a202c;
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
}

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

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

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

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .navbar-container {
        padding: 1rem;
    }
    
    .section-container {
        padding: 0 1rem;
    }
}

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

/* 標籤樣式 */
.tag {
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   工具頁面專用樣式 (Tool Page Layout)
   ======================================== */

/* 工具頁面基礎佈局 */
.tool-page-layout {
    min-height: 100vh;
    background: #f8fafc;
}

/* 可收合側邊欄 */
.tool-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #1a202c;
    color: white;
    z-index: 1100;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.tool-sidebar.open {
    left: 0;
}

.tool-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #2d3748;
}

.tool-sidebar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.tool-sidebar .logo-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-sidebar .logo-text {
    font-size: 1.125rem;
    font-weight: 600;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    background: #2d3748;
    color: white;
}

/* 側邊欄導航 */
.tool-sidebar .sidebar-nav {
    padding: 1rem 0;
}

/* 首頁連結 */
.tool-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.tool-sidebar .nav-link:hover {
    background: #2d3748;
    color: white;
    border-left-color: #667eea;
}

/* 可展開區塊 */
.tool-sidebar .nav-section {
    margin-top: 0.5rem;
}

.tool-sidebar .nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: #718096;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-sidebar .nav-section-header:hover {
    color: #a0aec0;
}

.tool-sidebar .nav-section-arrow {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.tool-sidebar .nav-section.expanded .nav-section-arrow {
    transform: rotate(90deg);
}

/* 區塊內容 */
.tool-sidebar .nav-section-content {
    display: none;
    padding: 0.5rem 1rem;
}

.tool-sidebar .nav-section.expanded .nav-section-content {
    display: block;
}

/* 卡片式子項目 */
.tool-sidebar .nav-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.2s;
}

.tool-sidebar .nav-card:hover {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    transform: translateX(4px);
}

.tool-sidebar .nav-card-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.tool-sidebar .nav-card-text {
    flex: 1;
}

/* 側邊欄遮罩 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* 主內容包裝器 */
.tool-main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 頂部導航列 */
.tool-topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    z-index: 100;
    gap: 1rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    color: #4a5568;
}

.hamburger-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2d3748;
}

.topbar-logo .logo-icon {
    font-size: 1.25rem;
}

.topbar-logo .logo-text {
    font-size: 1rem;
    font-weight: 600;
}

/* 麵包屑導航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #a0aec0;
}

.breadcrumb-current {
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 頂部語言切換器 */
.language-switcher-nav {
    display: flex;
    background: #f7fafc;
    border-radius: 8px;
    padding: 0.25rem;
}

.language-switcher-nav .lang-btn {
    background: transparent;
    border: none;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.language-switcher-nav .lang-btn:hover {
    color: #4a5568;
}

.language-switcher-nav .lang-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 工具內容區域 */
.tool-content-area {
    flex: 1;
    padding: 0;
}

/* 技術文檔底部浮動條 */
.tech-docs-bar {
    background: #1a202c;
    border-top: 1px solid #2d3748;
}

.tech-docs-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
}

.tech-docs-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-docs-icon {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-weight: 600;
}

.tech-docs-label {
    color: #a0aec0;
    font-size: 0.875rem;
    font-weight: 500;
}

.tech-docs-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #4a5568;
    border-radius: 6px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-docs-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.tech-docs-btn:hover .tech-docs-arrow {
    transform: translateX(3px);
}

.tech-docs-arrow {
    transition: transform 0.2s ease;
}

@media (max-width: 480px) {
    .tech-docs-bar-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .tech-docs-bar-left {
        justify-content: center;
    }
}

/* 工具頁面響應式設計 */
@media (max-width: 768px) {
    .tool-topbar {
        padding: 0.625rem 1rem;
    }

    .topbar-logo .logo-text {
        display: none;
    }

    .breadcrumb {
        font-size: 0.8125rem;
    }

    .breadcrumb a:not(:last-of-type),
    .breadcrumb-sep:not(:last-of-type) {
        display: none;
    }
}

@media (max-width: 480px) {
    .tool-topbar {
        padding: 0.5rem 0.75rem;
    }

    .language-switcher-nav .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   分類頁面樣式
   ======================================== */

.category-page-layout {
    min-height: 100vh;
    background: #f8fafc;
}

.category-main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 分類頁面 Hero 區域 */
.category-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem 1.5rem;
}

.category-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-hero-icon {
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    line-height: 1;
}

.category-hero-info {
    flex: 1;
}

.category-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
}

.category-hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.category-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: white;
    font-weight: 500;
}

.count-number {
    font-size: 1.125rem;
    font-weight: 700;
}

/* 分類頁面內容區域 */
.category-content-area {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 工具網格 */
.category-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* 工具卡片 */
.category-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.category-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.category-tool-card:hover .tool-card-arrow {
    transform: translateX(4px);
    color: #667eea;
}

.tool-card-icon {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 0.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.tool-card-content {
    flex: 1;
    min-width: 0;
}

.tool-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.375rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card-desc {
    font-size: 0.8125rem;
    color: #718096;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-arrow {
    font-size: 1.25rem;
    color: #a0aec0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* 廣告卡片 */
.category-tool-card.ad-card {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    justify-content: center;
    min-height: 100px;
}

.category-tool-card.ad-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #cbd5e0;
}

/* 無工具提示 */
.no-tools-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed #cbd5e0;
}

/* 分類頁面側邊欄當前項高亮 */
.category-page-layout .nav-card.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left: 3px solid #667eea;
}

/* 分類頁面響應式設計 */
@media (max-width: 1024px) {
    .category-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 2rem 1rem;
    }

    .category-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .category-hero-icon {
        font-size: 3rem;
        padding: 0.875rem 1rem;
    }

    .category-hero-title {
        font-size: 1.5rem;
    }

    .category-hero-desc {
        font-size: 0.9375rem;
    }

    .category-hero-meta {
        justify-content: center;
    }

    .category-content-area {
        padding: 1.5rem 1rem;
    }

    .category-tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-tool-card {
        padding: 1rem;
    }

    .tool-card-icon {
        font-size: 1.75rem;
        padding: 0.625rem;
    }

    .tool-card-title {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .category-hero {
        padding: 1.5rem 1rem;
    }

    .category-hero-icon {
        font-size: 2.5rem;
        padding: 0.75rem;
    }

    .category-hero-title {
        font-size: 1.25rem;
    }

    .tool-count-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .count-number {
        font-size: 1rem;
    }
}
