/* ===== 全局重置 & 字体 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f8faff;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 白色 + 蓝色主色调 ===== */
:root {
    --white: #ffffff;
    --blue-50: #f0f7ff;
    --blue-100: #e0f0ff;
    --blue-200: #b8d9ff;
    --blue-400: #6da8ff;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 12px 40px rgba(59, 130, 246, 0.12);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.25s ease;
}

/* ===== 容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== 头部 ===== */
.header {
    padding: 32px 0 24px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.88);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.25);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gray-800);
}
.logo-text span {
    color: var(--blue-600);
}

.header-badge {
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 40px;
    border: 1px solid var(--blue-200);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.header-badge i {
    font-size: 12px;
}

/* ===== 搜索 + 欢迎 ===== */
.hero-section {
    padding: 48px 0 32px;
    text-align: center;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gray-800);
}
.hero-title i {
    color: var(--blue-500);
    margin-right: 8px;
}
.hero-sub {
    margin-top: 8px;
    color: var(--gray-600);
    font-size: 18px;
    font-weight: 400;
}

.search-wrapper {
    margin-top: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 1.5px solid var(--gray-200);
    border-radius: 60px;
    font-size: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    color: var(--gray-800);
}
.search-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), var(--shadow-md);
}
.search-input::placeholder {
    color: var(--gray-400);
}

/* ===== 工具网格 ===== */
.tools-section {
    padding: 20px 0 60px;
    flex: 1;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-header h2 i {
    color: var(--blue-500);
    font-size: 20px;
}

.tool-count {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 400;
    background: var(--gray-50);
    padding: 4px 14px;
    border-radius: 30px;
    border: 1px solid var(--gray-200);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ===== 工具卡片 ===== */
.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 20px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-200);
    background: var(--white);
}

.tool-card:active {
    transform: scale(0.98);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--blue-600);
    margin-bottom: 16px;
    transition: var(--transition);
}

.tool-card:hover .card-icon {
    background: var(--blue-500);
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.card-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-100);
    padding-top: 14px;
    margin-top: auto;
}

.card-meta i {
    font-size: 12px;
    color: var(--blue-400);
}

.tag {
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 12px;
    border-radius: 20px;
    border: 1px solid var(--blue-100);
    letter-spacing: 0.01em;
}

/* ===== 空状态 ===== */
.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.no-result i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--gray-200);
}

/* ===== "敬请期待" 弹层 ===== */
.coming-soon-toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translateX(-50%) translateY(-16px);
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.18);
    padding: 14px 18px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: calc(100vw - 32px);
}
.coming-soon-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.cs-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--blue-50);
    color: var(--blue-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.cs-text .cs-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}
.cs-text .cs-sub {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 2px;
}
.cs-close {
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    margin-left: 4px;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}
.cs-close:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid var(--gray-100);
    padding: 28px 0;
    background: var(--white);
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-400);
}
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-record {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-400);
}
.record-sep {
    color: var(--gray-300);
}
.footer-record .police-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.footer-record .police-link i {
    font-size: 12px;
}
.footer-inner a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 500;
}
.footer-inner a:hover {
    color: var(--blue-800);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 16px;
}
.footer-social a {
    color: var(--gray-400);
    font-size: 16px;
    transition: var(--transition);
}
.footer-social a:hover {
    color: var(--blue-500);
}

/* ===== 响应式微调 ===== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 28px;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-badge {
        font-size: 12px;
        padding: 4px 12px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .logo-text {
        font-size: 20px;
    }
}

/* 简单的工具分类指示器（纯装饰） */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-50);
    border-radius: 30px;
    padding: 2px 10px;
    font-size: 11px;
    color: var(--gray-400);
    border: 1px solid var(--gray-200);
}
