/* ========================================= */
/* 1. 全局基础设置 */
/* ========================================= */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --light-text-color: #fff;
    --bg-color: #f4f7f9;
    --card-bg: #fff;
    --border-color: #e2e8f0;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ========================================= */
/* 2. 头部与导航 (Header & Nav) */
/* ========================================= */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

/* 导航按钮组 */
.nav-buttons {
    display: flex;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-btn {
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-btn:hover, .nav-btn.active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

/* ========================================= */
/* 3. 首页 Hero 区域 */
/* ========================================= */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--light-text-color);
    text-align: center;
    padding: 120px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.25em;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================= */
/* 4. 卡片与通用组件 */
/* ========================================= */
.content-section { padding: 60px 20px; }
.section-title { font-size: 2em; margin-bottom: 40px; text-align: center; color: #1e293b; }

/* 通用卡片样式 */
.category-card, .tool-card, .portfolio-item {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.category-card:hover, .tool-card:hover, .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

/* 首页两个大入口专用 */
.hero-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
    margin-top: -60px; /* 让卡片稍微重叠Hero区域 */
}

.category-card {
    text-align: center;
    flex: 1;
    max-width: 400px;
    color: var(--text-color);
    position: relative;
    z-index: 10;
}

.icon-large { font-size: 3.5em; margin-bottom: 15px; }
.category-card h2 { margin: 10px 0; color: #1e293b; }
.category-card p { color: #64748b; font-size: 0.95em; }
.card-action { 
    display: inline-block; margin-top: 20px; 
    color: var(--primary-color); font-weight: 600; 
}

/* ========================================= */
/* 5. 页脚 Footer */
/* ========================================= */
footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}
footer a { color: #cbd5e1; border-bottom: 1px dotted #64748b; }
footer a:hover { color: #fff; border-bottom: 1px solid #fff; }

/* ========================================= */
/* 6. 移动端适配 (Mobile Responsive) */
/* ========================================= */
@media (max-width: 768px) {
    /* 导航栏变横向滚动 */
    .nav-buttons {
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-buttons::-webkit-scrollbar { display: none; }
    
    .nav-btn {
        background: #f1f5f9;
        white-space: nowrap;
        font-size: 13px;
        padding: 6px 12px;
    }

    /* 首页大卡片变垂直排列 */
    .hero-selection { flex-direction: column; margin-top: 0; }
    .category-card { width: 100%; max-width: none; }

    .hero h1 { font-size: 2.5em; }
}

/* ========================================= */
/* 7. 工具卡片特色皮肤 (Tool Card Skins) - 完整修复版 */
/* ========================================= */

/* [关键] 网格布局容器 - 如果缺失这部分，卡片会变成单列垂直排列 */
.tool-grid-featured {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px; /* 卡片之间的间距 */
    margin-bottom: 40px;
    padding: 10px;
}

/* 基础卡片优化：确保内容布局 */
.tool-grid-featured .tool-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* 确保卡片高度拉伸一致 */
    min-height: 220px; 
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    box-sizing: border-box; 
}

.tool-card h3 { margin-top: 10px; margin-bottom: 8px; font-size: 1.25em; }
.tool-card p { font-size: 0.9em; line-height: 1.5; margin-bottom: 20px; flex-grow: 1; }
.tool-card .card-icon { font-size: 2.5em; margin-bottom: 15px; display: block; }
.tool-card .card-action { font-size: 0.9em; font-weight: 700; display: inline-flex; align-items: center; margin-top: auto; }

/* --- 皮肤 1: 科技蓝 (数字生成器) --- */
.card-style-tech {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}
.card-style-tech h3 { color: #0369a1; }
.card-style-tech p { color: #334155; }
.card-style-tech .card-action { color: #0284c7; }
.card-style-tech:hover { box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.25); border-color: #7dd3fc; }

/* --- 皮肤 2: 极客黑 (方形动画) --- */
.card-style-dark {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}
.card-style-dark h3 { color: #f8fafc; }
.card-style-dark p { color: #94a3b8; }
.card-style-dark .card-icon { text-shadow: 0 0 15px rgba(255,255,255,0.3); }
.card-style-dark .card-action { color: #4ade80; } 
.card-style-dark:hover { box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5); transform: translateY(-5px) scale(1.02); }

/* --- 皮肤 3: 梦幻紫 (情绪提示词) --- */
.card-style-magic {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #e9d5ff;
}
.card-style-magic h3 { color: #7e22ce; }
.card-style-magic p { color: #581c87; opacity: 0.8; }
.card-style-magic .card-action { color: #9333ea; }
.card-style-magic:hover { box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.2); border-color: #d8b4fe; }

/* --- 皮肤 4: 学术黄 (风格学习) --- */
.card-style-paper {
    background: #fffbeb;
    border-color: #fde68a;
    border-bottom: 4px solid #f59e0b; 
}
.card-style-paper h3 { color: #92400e; }
.card-style-paper p { color: #78350f; opacity: 0.9; }
.card-style-paper .card-action { color: #d97706; }
.card-style-paper:hover { background: #fff7ed; }

/* --- 皮肤 5: 流程青 (用户旅程) --- */
.card-style-flow {
    background: linear-gradient(to bottom right, #f0fdfa, #ccfbf1);
    border-color: #99f6e4;
}
.card-style-flow h3 { color: #0f766e; }
.card-style-flow p { color: #115e59; opacity: 0.8; }
.card-style-flow .card-action { color: #0d9488; text-decoration: underline; }
.card-style-flow:hover { border-color: #2dd4bf; }

/* --- 皮肤 6: 极简灰 (搜索) --- */
.card-style-clean {
    background: #ffffff;
    border-left: 5px solid #64748b; 
}
.card-style-clean h3 { color: #334155; }
.card-style-clean p { color: #64748b; }
.card-style-clean .card-action { color: #475569; background: #f1f5f9; padding: 5px 10px; border-radius: 6px; }
.card-style-clean:hover { border-left-color: #334155; }

/* --- 皮肤 7: 自然绿 (角色生成) --- */
.card-style-nature {
    background: linear-gradient(120deg, #fdfbf7 0%, #f4f9f4 100%);
    border: 1px solid #79b69b;
}
.card-style-nature h3 { color: #2c3e50; }
.card-style-nature p { color: #5a8c73; }
.card-style-nature .card-action { color: #5a8c73; font-weight: 800; letter-spacing: 1px; }
.card-style-nature:hover { box-shadow: 0 10px 20px rgba(121, 182, 155, 0.2); }