/* ==========================================
   Theme: GuideLite Classic (WebHans SEO Guide)
   Description: 深色玻璃拟态指南站主题，适配 /guide/ 子目录
   ========================================== */

/* ---------- CSS 变量 ---------- */
:root {
    --bg: #0a0a0f;
    --card: rgba(255,255,255,0.03);
    --pri: #3b82f6;
    --acc: #8b5cf6;
    --txt: #fff;
    --sub: #94a3b8;
    --border: rgba(255,255,255,0.1);
    --grad: linear-gradient(135deg, var(--pri), var(--acc));
}

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: var(--bg);
    color: var(--txt);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59,130,246,0.08) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139,92,246,0.08) 0%, transparent 20%);
}

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

/* ---------- 页头导航 ---------- */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    background: rgba(10,10,15,0.85);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    color: transparent;
}

.links a {
    color: var(--sub);
    margin-left: 2rem;
    font-size: 0.95rem;
}

.links a:hover,
.links a.active {
    color: var(--txt);
}

/* ---------- 移动端汉堡菜单 ---------- */
.gl-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
}

.gl-hamburger,
.gl-hamburger::before,
.gl-hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--txt);
    border-radius: 2px;
    transition: all .3s;
    position: absolute;
    left: 9px;
}

.gl-hamburger { top: 19px; }
.gl-hamburger::before { content: ''; top: -7px; }
.gl-hamburger::after { content: ''; top: 7px; }

.gl-menu-toggle.is-active .gl-hamburger { background: transparent; }
.gl-menu-toggle.is-active .gl-hamburger::before { top: 0; transform: rotate(45deg); }
.gl-menu-toggle.is-active .gl-hamburger::after { top: 0; transform: rotate(-45deg); }

.gl-nav-mobile {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    background: rgba(10,10,15,0.95);
}

.gl-nav-mobile a {
    display: block;
    padding: 0.75rem 0;
    color: var(--sub);
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
}

.gl-nav-mobile a:last-child { border-bottom: none; }

/* ---------- Guide 双栏布局 ---------- */
.guide-main {
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 2rem;
}

.guide-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

/* ---------- 文章卡片 ---------- */
.guide-post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.guide-post-card:hover {
    border-color: var(--pri);
    transform: translateY(-3px);
}

.guide-post-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.guide-post-card h3 a { color: var(--txt); }
.guide-post-card h3 a:hover { color: var(--pri); }

.guide-post-card p {
    color: var(--sub);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--sub);
}

.post-meta a { color: var(--pri); }

.pagination {
    text-align: center;
    padding: 2rem 0;
    color: var(--sub);
}

.pagination a {
    color: var(--pri);
    margin: 0 0.5rem;
}

/* ---------- 侧边栏组件 ---------- */
.sidebar-widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--txt);
}

.widget-list { list-style: none; }
.widget-list li { margin-bottom: 0.6rem; }

.widget-list a {
    color: var(--sub);
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-list a:hover {
    color: var(--pri);
    padding-left: 4px;
}

/* ---------- 标签云 ---------- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud a {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    color: var(--sub) !important;
    font-size: 0.8rem !important;
    line-height: 1.4;
}

.tag-cloud a:hover {
    background: var(--pri);
    color: #fff !important;
    border-color: var(--pri);
}

/* ---------- 页脚 ---------- */
footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border);
    color: var(--sub);
    font-size: 0.9rem;
    margin-top: 4rem;
}

footer a { color: var(--pri); }

/* ---------- 响应式适配 ---------- */
@media (max-width: 768px) {
    .links { display: none; }
    .gl-menu-toggle { display: block; }
    .guide-layout { grid-template-columns: 1fr; }
    .guide-main { margin-top: 80px; padding: 0 1rem; }
}