/* ----------------------------------------------------
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ---------------------------------------------------- */
:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* 核心背景色 */
    --bg-base: #060813;
    --bg-surface: rgba(13, 17, 33, 0.7);
    --bg-surface-hover: rgba(22, 28, 54, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    
    /* 文字颜色 */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* 品牌专有色 (HSL 微调调色板) */
    --claude-primary: 20, 88%, 54%;     /* #f37021 */
    --claude-glow: rgba(243, 112, 33, 0.15);
    
    --openai-primary: 164, 82%, 35%;    /* #10a37f */
    --openai-glow: rgba(16, 163, 127, 0.15);
    
    --gemini-primary: 217, 89%, 61%;    /* #1a73e8 (过渡至紫色) */
    --gemini-secondary: 271, 91%, 61%;  /* #a142f4 */
    --gemini-glow: rgba(26, 115, 232, 0.15);

    /* 功能色 */
    --color-online: #10B981;
    --color-loading: #F59E0B;
}

/* ----------------------------------------------------
   全局基础重置与排版
   ---------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 星空粒子背景效果 */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #11142e 0%, var(--bg-base) 80%);
    z-index: -1;
    overflow: hidden;
}
.stars-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 80px 120px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 250px 180px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 80px, rgba(255,255,255,0.7), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 400px 400px;
    opacity: 0.18;
    animation: rotateBg 160s linear infinite;
    transform-origin: center;
}

@keyframes rotateBg {
    from { transform: translate(-25%, -25%) rotate(0deg); }
    to { transform: translate(-25%, -25%) rotate(360deg); }
}

/* ----------------------------------------------------
   网页头部 (Header)
   ---------------------------------------------------- */
.header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 10, 24, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, hsl(var(--gemini-primary)), hsl(var(--gemini-secondary)));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pulsing-core {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: inherit;
    z-index: -1;
    opacity: 0.5;
    animation: corePulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes corePulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.logo-main {
    width: 24px;
    height: 24px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sync-panel {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.03);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.online {
    background-color: var(--color-online);
    box-shadow: 0 0 10px var(--color-online);
}
.status-dot.loading {
    background-color: var(--color-loading);
    box-shadow: 0 0 10px var(--color-loading);
}

.sync-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------
   卡片布局网格 (Grid Framework)
   ---------------------------------------------------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 968px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------
   统计概览卡片 (KPI Section)
   ---------------------------------------------------- */
.kpi-section {
    margin-top: 32px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.kpi-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------
   核心模型展示 (Model Showcase Section)
   ---------------------------------------------------- */
.model-detail-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 卡片边缘发光特效 */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, var(--theme-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.model-detail-card:hover {
    transform: translateY(-5px);
    border-color: var(--theme-border-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.model-detail-card:hover .card-glow {
    opacity: 1;
}

/* 设置三家专有变量 */
.theme-claude {
    --theme-glow: var(--claude-glow);
    --theme-border-hover: rgba(243, 112, 33, 0.35);
    --theme-brand: hsl(var(--claude-primary));
}
.theme-openai {
    --theme-glow: var(--openai-glow);
    --theme-border-hover: rgba(16, 163, 127, 0.35);
    --theme-brand: hsl(var(--openai-primary));
}
.theme-gemini {
    --theme-glow: var(--gemini-glow);
    --theme-border-hover: rgba(26, 115, 232, 0.35);
    --theme-brand: hsl(var(--gemini-primary));
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    z-index: 1;
}

.model-logo-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-brand);
    transition: transform 0.3s ease;
}

.model-detail-card:hover .model-logo-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.brand-logo {
    width: 26px;
    height: 26px;
}

.model-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.developer-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-body {
    flex-grow: 1;
    margin-bottom: 24px;
    z-index: 1;
}

.model-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-list li {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.features-list li span strong {
    color: white;
}

.feat-icon {
    flex-shrink: 0;
    font-size: 0.95rem;
}

.card-actions {
    display: flex;
    gap: 10px;
    z-index: 1;
}

/* ----------------------------------------------------
   新闻动态与 Timeline Feed
   ---------------------------------------------------- */
.live-feed-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.section-title.centered {
    text-align: center;
}
.section-subtitle.centered {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

/* ----------------------------------------------------
   通用卡片组件 (Buttons, Badges)
   ---------------------------------------------------- */
.btn {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--gemini-primary)), hsl(var(--gemini-secondary)));
    color: white;
    border: none;
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(161, 66, 244, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    color: white;
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.icon {
    width: 14px;
    height: 14px;
}

.icon-sync.spinning {
    animation: rotateSync 1s linear infinite;
}

@keyframes rotateSync {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-claude {
    background: rgba(243, 112, 33, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(243, 112, 33, 0.25);
}
.badge-openai {
    background: rgba(16, 163, 127, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 163, 127, 0.25);
}
.badge-gemini {
    background: rgba(26, 115, 232, 0.15);
    color: #bfdbfe;
    border: 1px solid rgba(26, 115, 232, 0.25);
}
.badge-live {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { opacity: 0.75; }
    50% { opacity: 1; }
    100% { opacity: 0.75; }
}

.filter-btn {
    font-family: var(--font-primary);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    color: white;
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.02);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-primary);
    color: white;
}

/* ----------------------------------------------------
   加载占位符样式
   ---------------------------------------------------- */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid hsl(var(--gemini-primary));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* ----------------------------------------------------
   时间轴 Timeline 样式
   ---------------------------------------------------- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 7px;
    bottom: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 3px solid var(--border-color);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    border-color: var(--item-brand-color);
    box-shadow: 0 0 8px var(--item-brand-color);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color-hover);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
}

.timeline-title a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-title a:hover {
    color: var(--item-brand-color);
}

.timeline-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 时间轴各品类色彩 */
.item-claude {
    --item-brand-color: hsl(var(--claude-primary));
}
.item-openai {
    --item-brand-color: hsl(var(--openai-primary));
}
.item-gemini {
    --item-brand-color: hsl(var(--gemini-primary));
}

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

/* ----------------------------------------------------
   详细对比表格矩阵 (Comparison Section)
   ---------------------------------------------------- */
.comparison-section {
    margin-bottom: 64px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
    min-width: 750px;
}

.comparison-table th,
.comparison-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table th {
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.01);
}

.comparison-table tbody tr {
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.feature-name {
    font-weight: 500;
    color: var(--text-secondary);
    width: 18%;
}

.col-claude {
    color: hsl(var(--claude-primary));
    width: 27%;
}
.col-openai {
    color: hsl(var(--openai-primary));
    width: 27%;
}
.col-gemini {
    color: hsl(var(--gemini-primary));
    width: 28%;
}

.highlight-val {
    position: relative;
}

.highlight-val::after {
    content: '★';
    font-size: 0.65rem;
    vertical-align: super;
    margin-left: 4px;
    opacity: 0.7;
}

/* ----------------------------------------------------
   网页底部 (Footer)
   ---------------------------------------------------- */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(4, 5, 12, 0.95);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-meta {
    color: rgba(255, 255, 255, 0.25);
}
