/* ============================================================
 * AI HOT — 主样式表
 *
 * 模仿 aihot.virxact.com 的暗色系设计
 * 使用 CSS 自定义属性实现暗色/亮色切换
 * ============================================================ */

/* --- CSS 变量 --- */
:root {
    /* 亮色模式 */
    --bg-primary:    #f5f5f7;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-card-hover: #f0f0f2;
    --text-primary:  #111111;
    --text-secondary:#666666;
    --text-muted:    #999999;
    --border-color:  #e5e5e5;
    --accent:        #ff6b2b;
    --accent-hover:  #ff8255;
    --accent-light:  rgba(255,107,43,0.1);
    --score-high:    #22c55e;
    --score-mid:     #eab308;
    --score-low:     #ef4444;
    --tag-bg:        #f0f0f2;
    --tag-text:      #555555;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.08);
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --max-width:     860px;
    --font-sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                     "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono:     "SF Mono", "Fira Code", "Noto Sans Mono CJK SC", monospace;
    --transition:    0.2s ease;
}

/* 暗色模式 */
[data-theme="dark"] {
    --bg-primary:    #0d0d14;
    --bg-secondary:  #141420;
    --bg-card:       #1a1a2e;
    --bg-card-hover: #22223a;
    --text-primary:  #e8e8ec;
    --text-secondary:#a0a0b0;
    --text-muted:    #6a6a7a;
    --border-color:  #2a2a3e;
    --accent:        #ff6b2b;
    --accent-hover:  #ff8255;
    --accent-light:  rgba(255,107,43,0.12);
    --tag-bg:        #252538;
    --tag-text:      #b0b0c0;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 布局容器 --- */
.aihot-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
 * 顶部导航栏
 * ============================================================ */
.aihot-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.aihot-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.aihot-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.aihot-logo:hover {
    color: var(--accent);
}

.aihot-logo__icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
}

.aihot-logo span {
    color: var(--accent);
}

.aihot-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.aihot-nav__link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.aihot-nav__link:hover,
.aihot-nav__link--active {
    color: var(--text-primary);
    background: var(--accent-light);
}

/* 暗色模式切换按钮 */
.aihot-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

.aihot-theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
 * 分类筛选栏
 * ============================================================ */
.aihot-categories {
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.aihot-categories::-webkit-scrollbar {
    display: none;
}

.aihot-categories__list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    white-space: nowrap;
}

.aihot-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--tag-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.aihot-cat-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.aihot-cat-btn--active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.aihot-cat-btn__count {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* ============================================================
 * 文章卡片
 * ============================================================ */
.aihot-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aihot-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
    position: relative;
}

.aihot-card:last-child {
    border-bottom: none;
}

.aihot-card:hover {
    background: var(--bg-card-hover);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--radius-md);
}

/* 卡片头部：来源 + 标签 */
.aihot-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.aihot-source {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.aihot-source__avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.aihot-source__name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.aihot-source__name:hover {
    color: var(--accent);
}

/* 徽章 */
.aihot-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

.aihot-badge--featured {
    color: #fff;
    background: var(--accent);
}

.aihot-badge--score {
    color: #fff;
    min-width: 2.2rem;
    justify-content: center;
}

.aihot-badge--score.high { background: var(--score-high); }
.aihot-badge--score.mid  { background: var(--score-mid); }
.aihot-badge--score.low  { background: var(--score-low); }

/* 卡片标题 */
.aihot-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.aihot-card__title a {
    color: inherit;
}

.aihot-card__title a:hover {
    color: var(--accent);
}

/* 卡片摘要 */
.aihot-card__excerpt {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

/* 卡片底部：分类标签 + 时间 */
.aihot-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.aihot-card__tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.aihot-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 999px;
    text-decoration: none;
    transition: all var(--transition);
}

.aihot-tag:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* 分类标签（有颜色区分） */
.aihot-tag--cat-model    { background: rgba(59,130,246,0.12); color: #3b82f6; }
.aihot-tag--cat-product  { background: rgba(168,85,247,0.12); color: #a855f7; }
.aihot-tag--cat-industry { background: rgba(234,179,8,0.12);  color: #ca8a04; }
.aihot-tag--cat-paper    { background: rgba(34,197,94,0.12);  color: #16a34a; }
.aihot-tag--cat-tips     { background: rgba(236,72,153,0.12); color: #db2777; }

.aihot-card__time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================================
 * 日报页面
 * ============================================================ */
.aihot-daily {
    padding: 2rem 0;
}

.aihot-daily__header {
    text-align: center;
    margin-bottom: 2rem;
}

.aihot-daily__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.aihot-daily__subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.aihot-daily__date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.aihot-daily__date-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.aihot-daily__date-nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.aihot-daily__date-nav .current {
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================
 * 单篇文章详情页
 * ============================================================ */
.aihot-single-wrap {
    padding: 2rem 0;
}

.aihot-single__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.aihot-single__back:hover {
    color: var(--accent);
}

.aihot-single__header {
    margin-bottom: 1.5rem;
}

.aihot-single__title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.aihot-single__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.aihot-single__content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.aihot-single__content p {
    margin-bottom: 1rem;
}

.aihot-single__content h2,
.aihot-single__content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.aihot-single__content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aihot-single__content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.aihot-single__content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--tag-bg);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.aihot-single__content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.aihot-single__content pre code {
    background: none;
    padding: 0;
}

/* LLM 点评区域 */
.aihot-commentary {
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.aihot-commentary__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.aihot-commentary__text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 原文链接按钮 */
.aihot-single__source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 0.55rem 1.25rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.aihot-single__source-link:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ============================================================
 * 分页
 * ============================================================ */
.aihot-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.aihot-pagination a,
.aihot-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.aihot-pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.aihot-pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================================
 * 页脚
 * ============================================================ */
.aihot-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.aihot-footer a {
    color: var(--text-secondary);
}

.aihot-footer a:hover {
    color: var(--accent);
}

.aihot-footer__links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    list-style: none;
}

/* ============================================================
 * 统计卡片（首页顶部）
 * ============================================================ */
.aihot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.aihot-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.aihot-stat__number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.aihot-stat__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ============================================================
 * RSS 链接
 * ============================================================ */
.aihot-rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: var(--accent);
}

.aihot-rss-link::before {
    content: "📡";
    font-size: 0.875rem;
}

/* ============================================================
 * 空状态
 * ============================================================ */
.aihot-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.aihot-empty__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.aihot-empty__text {
    font-size: 1rem;
}

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 640px) {
    .aihot-header__inner {
        height: 50px;
    }

    .aihot-nav__link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8125rem;
    }

    .aihot-card__title {
        font-size: 0.95rem;
    }

    .aihot-card__excerpt {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }

    .aihot-single__title {
        font-size: 1.35rem;
    }

    .aihot-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    :root {
        --max-width: 920px;
    }
}
