/* ========================================
   在线工具页样式
   ======================================== */

/* 页面专属配色 - 琥珀金（温润金属感） */
:root {
    --primary-color: #b8913a;
    --primary-hover: #c8a54f;
    --primary-light: rgba(184, 145, 58, 0.08);
    --primary-light-hover: rgba(184, 145, 58, 0.12);
    --border-color-hover: rgba(184, 145, 58, 0.2);
    --shadow-primary: 0 0 16px rgba(184, 145, 58, 0.15);
}

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    cursor: default;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8a6e28 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 16px rgba(194, 101, 58, 0.25);
    transition: transform var(--transition-normal);
}

.logo:hover .logo-icon {
    transform: rotate(-15deg) scale(1.05);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 480px;
    position: relative;
    transition: transform var(--transition-fast);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    transition: color var(--transition-fast);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-sans);
    outline: none;
    transition: all var(--transition-normal);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(194, 101, 58, 0.12);
    background: var(--bg-card-hover);
}

.search-input:focus ~ .search-icon,
.search-box:hover .search-icon {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ========== 主内容区 ========== */
.main-content {
    padding-top: 100px;
    padding-bottom: 100px;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 分类标签栏 ========== */
.category-tabs {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(194, 101, 58, 0.08);
    border-color: rgba(194, 101, 58, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8a6e28 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(194, 101, 58, 0.25);
    transform: translateY(-2px);
}

.tab-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.tab-btn:not(.active) .tab-count {
    background: rgba(255, 255, 255, 0.05);
}

/* ========== 工具卡片网格 ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ========== 工具卡片 ========== */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), #8a6e28, transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    border-color: rgba(194, 101, 58, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(194, 101, 58, 0.08);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 11px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.tool-card:hover .tag {
    background: rgba(194, 101, 58, 0.05);
    border-color: rgba(194, 101, 58, 0.1);
    color: var(--text-secondary);
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.tool-category {
    font-size: 11px;
    color: var(--text-muted);
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(194, 101, 58, 0.1);
    border: 1px solid rgba(194, 101, 58, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tool-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.tool-link i {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.tool-link:hover i {
    transform: translateX(2px);
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* 底部 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-content p { margin: 0; }

.footer-content a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-content a:hover { color: var(--primary-color); }

/* 动画 */
.tool-card {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

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

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-card:nth-child(8) { animation-delay: 0.4s; }

/* 响应式 */
@media (max-width: 1200px) {
    .nav-actions .btn span { display: none; }
    .nav-actions .btn { padding: 12px; }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 16px;
    }
    .logo { align-self: flex-start; }
    .search-box { width: 100%; max-width: none; }
    .nav-actions { width: 100%; justify-content: center; }
    .nav-actions .btn span { display: inline; }
    .main-content { padding-top: 220px; }
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer-content { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .main-content { padding-top: 240px; }
    .tools-grid { grid-template-columns: 1fr; }
    .logo-icon { width: 40px; height: 40px; font-size: 20px; }
    .logo-text h1 { font-size: 16px; }
}
