/*
Theme Name: NewSpare CCLeaks
Theme URI: https://meiti.org
Description: CCLeaks 深色卡片风格子主题，基于 NewSpare
Template: newspare
Version: 1.0.0
Author: MeitiMedia
Text Domain: newspare-ccleaks
*/

/* ===== CCLeaks 深色主题变量 ===== */
:root {
    --foreground: #f5f5f7;
    --background: #000000;
    --card: #1c1c1e;
    --card-hover: #2c2c2e;
    --separator: rgba(255,255,255,0.08);
    --sep-thin: rgba(255,255,255,0.04);
    --text-secondary: #98989d;
    --text-tertiary: #636366;
    --fill-tertiary: rgba(255,255,255,0.05);
    --blue: #0a84ff;
    --purple: #bf5af2;
    --teal: #64d2ff;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff3b30;
    --yellow: #ffd60a;
    --pink: #ff375f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --font-jetbrains: 'JetBrains Mono', 'Menlo', monospace;
    --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
}

/* ===== 全局基础 ===== */
body,
.site,
body.custom-background {
    background-color: var(--background) !important;
    color: var(--foreground) !important;
    font-family: var(--font-body) !important;
}

a { color: var(--blue); }
a:hover { color: var(--teal); }

/* ===== 顶部导航 ===== */
.site-header,
.nav-menu,
.main-navigation,
.header-wrap,
#masthead {
    background: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--separator) !important;
}

.site-title a,
.site-description,
.main-navigation a,
.nav-menu a,
.primary-menu a {
    color: var(--foreground) !important;
}

.main-navigation a:hover,
.nav-menu a:hover {
    color: var(--blue) !important;
}

/* ===== 文章卡片 ===== */
.post,
article,
.flavor-flavor,
.entry-summary,
.widget,
.flavor-flavor-flavor {
    background: var(--card) !important;
    border: 0.33px solid var(--separator) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 0 !important;
    overflow: hidden;
    transition: background 0.2s ease, transform 0.15s ease;
}

.post:hover,
article:hover,
.flavor-flavor:hover {
    background: var(--card-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

/* 文章标题 */
.entry-title,
.entry-title a,
.post-title,
.flavor-flavor-title,
h2.entry-title a {
    color: var(--foreground) !important;
    font-weight: 600 !important;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.entry-title a:hover {
    color: var(--blue) !important;
}

/* 文章摘要 */
.entry-content,
.entry-summary,
.post-excerpt,
.flavor-flavor-excerpt {
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.6;
}

/* 文章元信息 */
.entry-meta,
.post-meta,
.flavor-flavor-meta,
.cat-links,
.tags-links,
.author-info,
.flavor-flavor-date {
    color: var(--text-tertiary) !important;
    font-size: 12px;
    font-family: var(--font-jetbrains);
}

.entry-meta a,
.post-meta a {
    color: var(--text-tertiary) !important;
}

.entry-meta a:hover {
    color: var(--blue) !important;
}

/* 分类标签 */
.cat-links a,
.tag-cloud a,
.tags-links a,
.flavor-flavor-category {
    background: var(--fill-tertiary) !important;
    color: var(--text-secondary) !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    font-family: var(--font-jetbrains) !important;
    border: none !important;
    text-decoration: none !important;
}

.cat-links a:hover {
    background: rgba(10,132,255,0.15) !important;
    color: var(--blue) !important;
}

/* 特色图片 */
.post-thumbnail img,
.entry-thumbnail img,
.featured-image img,
.flavor-flavor-image img {
    border-radius: 0 !important;
    border-bottom: 0.33px solid var(--separator) !important;
}

/* ===== 侧边栏 ===== */
.widget-area,
.sidebar,
#secondary {
    background: transparent !important;
}

.widget-title,
.flavor-flavor-widget-title,
.sidebar .widget h2,
.sidebar h3 {
    color: var(--foreground) !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    border-bottom: 1px solid var(--separator);
    padding-bottom: 10px;
}

.widget ul li,
.sidebar ul li {
    border-bottom: 0.33px solid var(--sep-thin) !important;
    padding: 8px 0 !important;
}

.widget ul li a {
    color: var(--text-secondary) !important;
    font-size: 13px;
}

.widget ul li a:hover {
    color: var(--blue) !important;
}

/* ===== 搜索框 ===== */
.search-form input[type="search"],
.search-field,
input[type="text"],
input[type="search"] {
    background: var(--fill-tertiary) !important;
    border: 0.33px solid var(--separator) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

.search-form input[type="search"]::placeholder {
    color: var(--text-tertiary) !important;
}

/* 搜索按钮 */
.search-submit,
button,
input[type="submit"] {
    background: var(--blue) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600;
}

/* ===== 页脚 ===== */
.site-footer,
#colophon,
.footer-wrap {
    background: var(--background) !important;
    border-top: 1px solid var(--separator) !important;
    color: var(--text-tertiary) !important;
}

.site-footer a {
    color: var(--text-secondary) !important;
}

/* ===== 翻页 ===== */
.nav-links,
.pagination,
.flavor-flavor-nav-links,
.posts-navigation .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 32px 0;
}

.nav-links a,
.pagination a,
.page-numbers {
    background: var(--card) !important;
    color: var(--text-secondary) !important;
    border: 0.33px solid var(--separator) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px;
    font-family: var(--font-jetbrains);
    text-decoration: none !important;
}

.nav-links a:hover,
.pagination a:hover {
    background: var(--card-hover) !important;
    color: var(--blue) !important;
}

.current,
.nav-links .current,
.pagination .current {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue) !important;
}

/* ===== 面包屑 ===== */
.breadcrumb,
.breadcrumbs,
.flavor-flavor-breadcrumb {
    color: var(--text-tertiary) !important;
    font-size: 12px;
    font-family: var(--font-jetbrains);
}

.breadcrumb a {
    color: var(--text-tertiary) !important;
}

.breadcrumb a:hover {
    color: var(--blue) !important;
}

/* ===== 评论 ===== */
.comment-body,
.flavor-flavor-comment {
    background: var(--card) !important;
    border: 0.33px solid var(--separator) !important;
    border-radius: 10px !important;
    padding: 16px !important;
}

.comment-author .fn,
.comment-metadata,
.flavor-flavor-comment-meta {
    color: var(--text-secondary) !important;
}

.comment-reply-link {
    color: var(--blue) !important;
}

/* ===== 响应式布局 - 网格 ===== */
@media (min-width: 768px) {
    .posts-grid,
    .flavor-flavor-grid,
    .flavor-flavor-posts,
    .site-content .posts-wrapper,
    #primary .posts-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .posts-grid,
    .flavor-flavor-grid,
    .flavor-flavor-posts,
    .site-content .posts-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== 内容宽度 ===== */
.site-content,
#primary,
.content-area,
.flavor-flavor-content {
    max-width: 1060px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ===== 首页 Hero 区域 ===== */
.site-header .custom-header,
.flavor-flavor-hero,
.flavor-flavor-banner {
    background: linear-gradient(135deg, #1a0533 0%, #0a1628 50%, #001a1a 100%) !important;
    padding: 60px 20px;
    text-align: center;
}

/* ===== 代码/等宽字体 ===== */
code, pre,
.flavor-flavor-code {
    font-family: var(--font-jetbrains) !important;
    background: var(--fill-tertiary) !important;
    color: var(--teal) !important;
    border-radius: 6px !important;
    font-size: 12px;
}

/* ===== 选中文字 ===== */
::selection {
    background: rgba(10,132,255,0.3);
    color: var(--foreground);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--separator);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post, article {
    animation: fadeInUp 0.4s ease-out;
}
