/* OpenClaw Research - 主样式表 */
/* 极简苹果风格 + 麦肯锡专业感 */

:root {
    --primary: #1d1d1f;
    --secondary: #86868b;
    --accent: #f97316;
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --border: #d2d2d7;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --nav-bg: #1d1d1f;
    --nav-text: #f5f5f7;
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --radius: 12px;
    --max-width: 1200px;
    --content-width: 800px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航 ===== */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.logo-icon {
    font-size: 22px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.search-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

/* ===== 搜索框 ===== */
.search-bar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-bar.active {
    padding: 16px 24px;
    max-height: 80px;
}

.search-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.search-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.search-container input:focus {
    border-color: var(--accent);
}

.search-container button {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* ===== 主内容区 ===== */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===== Hero区 ===== */
.hero {
    margin-bottom: 48px;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.hero-placeholder {
    font-size: 48px;
    text-align: center;
    color: white;
    font-weight: 700;
}

.hero-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--primary);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.hero-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    width: fit-content;
    transition: all 0.2s;
}

.hero-btn:hover {
    background: #000;
    transform: translateX(4px);
}

/* ===== 通用标题 ===== */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary);
}

/* ===== 主题分类 ===== */
.topics {
    margin-bottom: 48px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.topic-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.topic-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.topic-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

.topic-name {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.topic-count {
    display: block;
    font-size: 13px;
    color: var(--secondary);
}

/* ===== 文章列表 ===== */
.articles {
    margin-bottom: 48px;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.article-cover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    position: relative;
    min-height: 160px;
}

.cover-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.article-info {
    padding: 24px 24px 24px 0;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-title a {
    color: var(--primary);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--accent);
}

.article-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--secondary);
}

/* ===== 订阅区 ===== */
.subscribe {
    margin-bottom: 48px;
}

.subscribe-box {
    background: var(--primary);
    color: white;
    padding: 48px;
    border-radius: var(--radius);
    text-align: center;
}

.subscribe-box h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.subscribe-box p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.subscribe-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
}

.subscribe-form button {
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-content p {
    color: var(--secondary);
    font-size: 14px;
    margin: 4px 0;
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero-card {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        min-height: 200px;
    }
    
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .nav {
        gap: 16px;
    }
    
    .main {
        padding: 24px 16px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-content {
        padding: 24px;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        grid-template-columns: 1fr;
    }
    
    .article-cover {
        min-height: 120px;
    }
    
    .article-info {
        padding: 20px;
    }
    
    .subscribe-box {
        padding: 32px 24px;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
}

/* ===== 加载动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card,
.topic-card,
.article-card {
    animation: fadeIn 0.5s ease-out;
}
