/**
 * 恋上蓝花楹主题 - 主样式
 * 基于 Tailwind CSS 设计系统，手写 CSS 实现
 */

/* =====================================================
   CSS 变量
   ===================================================== */
:root {
    --primary-500: #0073f5;
    --primary-600: #005cc4;
    --primary-900: #001731;
    --secondary-500: #9900f5;
    --dark-600: #222222;
    --dark-700: #1a1a1a;
    --dark-800: #111111;
    --dark-900: #080808;
    --text-white: #ffffff;
    --text-gray: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(25, 25, 50, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =====================================================
   基础样式
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--dark-800);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 背景 Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* =====================================================
   文字渐变
   ===================================================== */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   玻璃卡片
   ===================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

/* =====================================================
   容器
   ===================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   导航栏
   ===================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

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

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-500);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.25rem;
    cursor: pointer;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--dark-700);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    padding: 24px;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

#close-menu {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.25rem;
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav a {
    color: var(--text-white);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--dark-600);
    transition: color 0.3s;
}

.mobile-nav a:hover {
    color: var(--primary-500);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   Hero 英雄区
   ===================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.hero-greeting {
    display: block;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-gray);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-500);
    white-space: nowrap;
    animation: typing 3.5s steps(20, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-500); }
}

/* Avatar */
.hero-avatar {
    flex-shrink: 0;
}

.avatar-wrap {
    position: relative;
    width: 280px;
    height: 280px;
}

.avatar-glow {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.4;
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.avatar-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--dark-800);
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-white);
    opacity: 0.7;
    animation: bounce 2s infinite;
    text-decoration: none;
    transition: opacity 0.3s;
}

.scroll-hint:hover { opacity: 1; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* =====================================================
   按钮
   ===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-500);
    color: var(--text-white);
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-glow:hover {
    box-shadow: 0 0 15px var(--primary-500), 0 0 30px var(--primary-500);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--primary-500);
    border: 2px solid var(--primary-500);
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.btn-outline:hover {
    background: var(--primary-500);
    color: var(--text-white);
}

/* =====================================================
   区块通用
   ===================================================== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--dark-700);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 16px 0;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   关于我
   ===================================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.about-card {
    padding: 32px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.about-card p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* 技能标签 */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.skill-tag {
    background: rgba(0, 115, 245, 0.15);
    color: #66abf9;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* 技能进度条 */
.skill-bar-item {
    margin-bottom: 16px;
}

.skill-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.skill-bar-track {
    background: var(--dark-600);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.skill-bar-fill {
    background: var(--gradient);
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

/* 技能图表 */
.chart-wrap {
    margin-top: 24px;
}

.chart-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.chart-container {
    height: 220px;
    position: relative;
}

/* =====================================================
   博客区
   ===================================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrap input {
    width: 100%;
    background: var(--dark-600);
    border: 1px solid var(--dark-600);
    border-radius: 10px;
    padding: 14px 48px 14px 16px;
    color: var(--text-white);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-wrap input:focus {
    border-color: var(--primary-500);
}

.search-wrap button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.search-wrap button:hover {
    color: var(--primary-500);
}

.filter-selects {
    display: flex;
    gap: 12px;
}

.filter-select {
    background: var(--dark-600);
    border: 1px solid var(--dark-600);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-white);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    border-color: var(--primary-500);
}

/* 文章列表 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.post-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.post-thumb-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-thumb {
    transform: scale(1.1);
}

.post-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark-900), transparent);
    opacity: 0.7;
}

.post-badge-wrap {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.post-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-white);
}

.post-body {
    padding: 20px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.post-tag {
    background: var(--dark-600);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-meta i {
    margin-right: 4px;
}

.post-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* 加载更多 */
.load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--dark-600);
    color: var(--text-white);
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-load-more:hover {
    background: #333;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 115, 245, 0.3);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
}

/* =====================================================
   代码实验室
   ===================================================== */
.codelab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.code-editor-wrap {
    overflow: hidden;
}

.code-editor {
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.code-editor-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #2d2d2d;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red   { background: #ff5f58; }
.dot-yellow{ background: #ffbd2e; }
.dot-green { background: #18c137; }

.code-editor-title {
    margin-left: 12px;
    font-size: 0.8rem;
    color: #888;
}

.code-editor-body {
    padding: 20px;
    overflow-x: auto;
}

.code-editor-body pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 聊天卡片 */
.chat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.chat-window {
    flex: 1;
    min-height: 260px;
    max-height: 300px;
    overflow-y: auto;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.user {
    background: var(--primary-500);
    color: var(--text-white);
    margin-left: auto;
}

.chat-message.ai {
    background: #2d2d2d;
    color: var(--text-white);
}

.chat-input-wrap {
    display: flex;
    gap: 8px;
}

.chat-input-wrap input {
    flex: 1;
    background: var(--dark-600);
    border: 1px solid var(--dark-600);
    border-radius: 10px 0 0 10px;
    padding: 14px 16px;
    color: var(--text-white);
    font-size: 1rem;
    outline: none;
}

.chat-input-wrap input:focus {
    border-color: var(--primary-500);
}

.chat-input-wrap button {
    background: var(--primary-500);
    border: none;
    color: var(--text-white);
    padding: 14px 20px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-input-wrap button:hover {
    background: var(--primary-600);
}

/* =====================================================
   作品集
   ===================================================== */
.portfolio-card {
    overflow: hidden;
    border-radius: 16px;
}

.portfolio-thumb {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-thumb i {
    font-size: 3.5rem;
    opacity: 0.6;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark-900), transparent);
    opacity: 0.7;
}

.portfolio-badge-wrap {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.portfolio-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-white);
}

.portfolio-body {
    padding: 20px;
}

.portfolio-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.portfolio-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.portfolio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portfolio-tags span {
    background: var(--dark-600);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
}

.portfolio-link {
    color: var(--primary-500);
    font-size: 1rem;
    transition: color 0.3s;
}

.portfolio-link:hover {
    color: var(--primary-400);
}

/* 3D 卡片效果 */
.card-3d {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateY(8deg) rotateX(4deg);
}

/* =====================================================
   订阅区
   ===================================================== */
.subscribe-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.subscribe-card {
    padding: 40px;
    text-align: center;
}

.subscribe-desc {
    color: var(--text-gray);
    margin-bottom: 28px;
    line-height: 1.7;
}

.subscribe-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.subscribe-form-row input {
    flex: 1;
    background: var(--dark-600);
    border: 1px solid var(--dark-600);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-white);
    font-size: 1rem;
    outline: none;
}

.subscribe-form-row input:focus {
    border-color: var(--primary-500);
}

.subscribe-privacy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.subscribe-privacy i {
    margin-right: 6px;
}

.subscribe-success {
    display: none;
    margin-top: 16px;
    padding: 14px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    color: #86efac;
    text-align: left;
}

.subscribe-success i {
    margin-right: 8px;
    color: #22c55e;
}

/* 标签云 */
.tag-cloud-wrap {
    margin-top: 48px;
    text-align: center;
}

.tag-cloud-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag-item {
    background: rgba(0, 115, 245, 0.15);
    color: #66abf9;
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
}

.tag-item:hover {
    background: rgba(0, 115, 245, 0.3);
    transform: scale(1.05);
}

/* =====================================================
   页脚
   ===================================================== */
.site-footer {
    background: var(--dark-900);
    padding: 48px 0 24px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    border-top: 1px solid var(--dark-700);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-copy p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.footer-email {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-email a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-email a:hover {
    color: var(--primary-500);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--primary-500);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary-500);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-600);
}

/* =====================================================
   滚动动画
   ===================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   文章详情页
   ===================================================== */
.single-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding: 100px 0 60px;
}

.single-main {
    min-width: 0;
}

.single-card {
    padding: 0;
    overflow: hidden;
}

.single-thumb {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.single-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-body {
    padding: 32px;
}

.single-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 20px;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.single-meta i {
    margin-right: 6px;
}

.single-content {
    line-height: 1.8;
    color: var(--text-gray);
}

.single-content h1, .single-content h2, .single-content h3 {
    color: var(--text-white);
    margin: 1.5em 0 0.8em;
}

.single-content p {
    margin: 1em 0;
}

.single-content img {
    max-width: 100%;
    border-radius: 10px;
}

.single-content pre {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

.single-content code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.single-tag {
    background: rgba(0, 115, 245, 0.15);
    color: #66abf9;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.single-tag:hover {
    background: rgba(0, 115, 245, 0.3);
}

/* 作者卡片 */
.author-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-top: 32px;
}

.author-avatar img {
    border-radius: 50%;
}

.author-name {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.author-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* 前后导航 */
.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.single-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--dark-700);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-gray);
    transition: background 0.3s, color 0.3s;
}

.single-nav a:hover {
    background: var(--dark-600);
    color: var(--text-white);
}

.nav-empty {
    visibility: hidden;
}

/* 评论 */
.comments-card {
    padding: 24px;
    margin-top: 32px;
}

/* 侧边栏 */
.single-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.1rem;
    margin: 0 0 16px 0;
}

/* =====================================================
   归档页
   ===================================================== */
.archive-wrap {
    padding: 100px 0 60px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: var(--dark-600);
    color: var(--text-white);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.pagination a:hover {
    background: var(--primary-500);
}

.pagination .current {
    background: var(--primary-500);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

/* =====================================================
   响应式
   ===================================================== */
@media (max-width: 1024px) {
    .single-wrap {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text {
        min-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .avatar-wrap {
        width: 200px;
        height: 200px;
    }

    .codelab-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-selects {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .subscribe-form-row {
        flex-direction: column;
    }

    .subscribe-form-row button {
        width: 100%;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .single-nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}
