/* =========================================
   王硕硕的博客 - Modern Tech Theme v3.0
   Minimalist · Tech · Professional
   ========================================= */

/* ─── CSS Variables ─────────────────────── */
:root {
    /* Colors */
    --bg:           #F7F8FC;
    --surface:      #FFFFFF;
    --border:       #EAECEF;
    --text:         #1F2430;
    --text-sec:     #6B7280;
    --text-ter:     #9CA3AF;
    --accent:       #4A7CC9;
    --accent-hover: #3D6BB8;
    --accent-sec:   #5B8DEF;
    --accent-light: rgba(74,124,201,0.08);
    --accent-glow:  rgba(74,124,201,0.15);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Monaco, monospace;

    /* Spacing (8px grid) */
    --sp-1: 8px;  --sp-2: 16px;  --sp-3: 24px;
    --sp-4: 32px; --sp-5: 40px;  --sp-6: 48px;

    /* Radii */
    --r-sm:   8px;
    --r-md:  12px;
    --r-lg:  20px;
    --r-xl:  24px;
    --r-pill: 999px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(31,36,48,0.05), 0 4px 12px rgba(31,36,48,0.04);
    --shadow-md:  0 2px 8px rgba(31,36,48,0.06), 0 8px 24px rgba(31,36,48,0.06);
    --shadow-lg:  0 4px 16px rgba(31,36,48,0.08), 0 16px 48px rgba(31,36,48,0.08);
    --shadow-xl:  0 8px 32px rgba(31,36,48,0.10), 0 24px 64px rgba(31,36,48,0.10);
    --shadow-card: 0 2px 12px rgba(31,36,48,0.05), 0 8px 32px rgba(31,36,48,0.06);
    --shadow-hover: 0 8px 24px rgba(31,36,48,0.09), 0 24px 56px rgba(31,36,48,0.09);

    /* Transitions */
    --ease:   cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s;
    --t-base: 0.25s;
    --t-slow: 0.4s;
}

/* ─── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
#latest-posts,
#featured-projects {
    scroll-margin-top: 96px;
}
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.3; color: var(--text); }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-3); }

/* ─── Header ──────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247,248,252,0.88);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: var(--sp-3);
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: var(--t-fast) var(--ease);
    flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); }
.site-logo img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-item {
    color: var(--text-sec);
    padding: 6px 14px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--t-fast) var(--ease);
    position: relative;
}
.nav-item:hover { color: var(--accent); background: var(--accent-light); }
.nav-item.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    color: var(--text-sec);
    background: var(--surface);
    transition: var(--t-fast) var(--ease);
    box-shadow: var(--shadow-sm);
}
.search-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.search-btn svg { width: 16px; height: 16px; }

.btn-subscribe {
    display: inline-flex; align-items: center;
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(74,124,201,0.3);
    transition: var(--t-fast) var(--ease);
}
.btn-subscribe:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(74,124,201,0.4); }

/* ─── Main Layout ─────────────────────────── */
.main-content { padding: var(--sp-5) 0 80px; }

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--sp-4);
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
}

body.post-template .content-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--sp-4) !important;
    align-items: start !important;
}
body.post-template .main-area {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
}
body.post-template .main-area article {
    width: 100% !important;
    max-width: none !important;
}
body.post-template .main-area article .post-content-wrap {
    width: 100% !important;
    max-width: none !important;
}
body.post-template .sidebar {
    flex: 0 0 320px !important;
    width: 320px !important;
}
.main-area { min-width: 0; }

/* ─── Hero Section ────────────────────────── */
.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--sp-6);
    margin-bottom: var(--sp-5);
    box-shadow: var(--shadow-card);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-6);
    align-items: center;
    overflow: hidden;
    position: relative;
}
.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 90% 50%, rgba(74,124,201,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 95% 30%, rgba(74,124,201,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-left { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--accent); margin-bottom: var(--sp-2);
}
.hero-eyebrow-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-heading {
    font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em;
    line-height: 1.15; margin-bottom: var(--sp-1);
    background: linear-gradient(135deg, var(--text) 0%, #374151 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subheading {
    font-size: 1rem; color: var(--accent-sec); font-weight: 500;
    margin-bottom: var(--sp-2);
}
.hero-desc {
    font-size: 0.925rem; color: var(--text-sec); line-height: 1.75;
    max-width: 520px; margin-bottom: var(--sp-3);
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.hero-tag {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: var(--r-pill);
    font-size: 0.775rem; font-weight: 500;
    background: var(--accent-light); color: var(--accent);
    border: 1px solid rgba(74,124,201,0.12);
    transition: var(--t-fast) var(--ease);
}
.hero-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.hero-actions { display: flex; gap: 12px; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--r-pill);
    background: var(--accent); color: #fff; font-size: 0.875rem; font-weight: 600;
    box-shadow: 0 2px 8px rgba(74,124,201,0.3);
    transition: var(--t-fast) var(--ease);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,124,201,0.4); }
.btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--r-pill);
    background: var(--surface); color: var(--text); font-size: 0.875rem; font-weight: 600;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--t-fast) var(--ease);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Hero Right — Tech Visual */
.hero-right {
    position: relative; z-index: 1;
    width: 200px; height: 200px; flex-shrink: 0;
}
.hero-avatar-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(74,124,201,0.12);
    animation: spin-slow 20s linear infinite;
}
.hero-avatar-ring::before {
    content: '';
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(74,124,201,0.5);
}
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hero-avatar-ring-2 {
    position: absolute; inset: 20px;
    border-radius: 50%;
    border: 1px dashed rgba(139,92,246,0.2);
    animation: spin-slow-reverse 14s linear infinite;
}
.hero-avatar-ring-2::before {
    content: '';
    position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-sec);
}
@keyframes spin-slow-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.hero-avatar-core {
    position: absolute; inset: 40px;
    border-radius: 50%; overflow: hidden;
    box-shadow: var(--shadow-md), 0 0 0 4px rgba(74,124,201,0.08);
    background: var(--surface);
}
.hero-avatar-core img { width: 100%; height: 100%; object-fit: cover; }
.hero-avatar-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sec) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #fff;
}

/* Tech icons floating around avatar */
.tech-icon {
    position: absolute; width: 32px; height: 32px;
    border-radius: var(--r-sm); background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}
.tech-icon svg { width: 16px; height: 16px; color: var(--accent); }
.tech-icon-1 { top: 0; left: 50%; transform: translateX(-50%); animation: float 3s ease-in-out infinite; }
.tech-icon-2 { top: 50%; right: -8px; transform: translateY(-50%); animation: float 3.5s ease-in-out infinite 0.5s; }
.tech-icon-3 { bottom: 0; left: 50%; transform: translateX(-50%); animation: float 4s ease-in-out infinite 1s; }
.tech-icon-4 { top: 50%; left: -8px; transform: translateY(-50%); animation: float 3.2s ease-in-out infinite 0.8s; }
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}
.tech-icon-1 { animation-name: float1; }
@keyframes float1 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}
.tech-icon-2 { animation-name: float2; }
@keyframes float2 {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
}
.tech-icon-3 { animation-name: float3; }
@keyframes float3 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}
.tech-icon-4 { animation-name: float4; }
@keyframes float4 {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-5px); }
}

/* ─── Section Headers ─────────────────────── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--sp-3);
}
.section-title {
    font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 8px;
}
.section-title-icon { font-size: 1rem; }
.section-link {
    font-size: 0.8rem; font-weight: 600; color: var(--accent);
    padding: 5px 12px; border-radius: var(--r-pill);
    background: var(--accent-light);
    transition: var(--t-fast) var(--ease);
}
.section-link:hover { background: var(--accent); color: #fff; }

/* ─── Post Grid ───────────────────────────── */
.posts-section { margin-bottom: var(--sp-6); }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-3);
}
.posts-grid .post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--t-base) var(--ease);
    display: flex; flex-direction: column;
    animation: fadeInUp 0.5s var(--ease) both;
}
.posts-grid .post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: rgba(74,124,201,0.15);
}
.posts-grid .post-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}
.posts-grid .post-card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--t-slow) var(--ease);
}
.posts-grid .post-card:hover .post-card-image img { transform: scale(1.06); }

.posts-grid .post-card-image .placeholder-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #F0F1F5 0%, #E8E9EF 50%, #E4E5EB 100%);
}
.posts-grid .post-card-image .placeholder-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; opacity: 0.4;
}

.posts-grid .post-card-body { padding: var(--sp-2) var(--sp-2) var(--sp-3); flex: 1; display: flex; flex-direction: column; }
.post-card-tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: var(--r-pill);
    font-size: 0.7rem; font-weight: 600;
    background: var(--accent-light); color: var(--accent);
    margin-bottom: 10px; width: fit-content;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.post-card-title {
    font-size: 0.975rem; font-weight: 700; line-height: 1.4;
    letter-spacing: -0.01em; margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt {
    font-size: 0.825rem; color: var(--text-sec); line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.post-card-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: var(--text-ter);
    padding-top: 12px; border-top: 1px solid var(--border);
}
.post-card-meta time { color: var(--text-ter); }
.post-card-meta .sep { opacity: 0.5; }

/* ─── Featured Projects ───────────────────── */
.projects-section { margin-bottom: var(--sp-5); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-3);
    box-shadow: var(--shadow-card);
    transition: var(--t-base) var(--ease);
    display: flex; align-items: flex-start; gap: var(--sp-2);
    animation: fadeInUp 0.5s var(--ease) both;
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: rgba(74,124,201,0.15); }
.project-icon-wrap {
    width: 48px; height: 48px; border-radius: var(--r-md);
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}
.project-info { flex: 1; min-width: 0; }
.project-name {
    font-size: 0.95rem; font-weight: 700; margin-bottom: 4px;
    color: var(--text);
}
.project-card:hover .project-name { color: var(--accent); }
.project-desc {
    font-size: 0.8rem; color: var(--text-sec); line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.project-tag {
    padding: 2px 8px; border-radius: var(--r-pill);
    font-size: 0.68rem; font-weight: 500;
    background: var(--bg); color: var(--text-sec); border: 1px solid var(--border);
}
.project-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.72rem; color: var(--text-ter);
}
.project-meta-item { display: flex; align-items: center; gap: 4px; }
.project-link-icon {
    margin-left: auto; color: var(--text-ter);
    transition: var(--t-fast) var(--ease);
    flex-shrink: 0;
}
.project-card:hover .project-link-icon { color: var(--accent); }

/* ─── Sidebar ─────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: 80px; }

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--sp-3);
    box-shadow: var(--shadow-card);
    transition: var(--t-base) var(--ease);
}
.sidebar-card:hover { box-shadow: var(--shadow-md); }

.sidebar-title {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-ter); margin-bottom: var(--sp-2);
}

/* Stats Widget */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-block {
    padding: 14px 10px; text-align: center;
    background: var(--bg); border-radius: var(--r-md);
    border: 1px solid var(--border);
    transition: var(--t-fast) var(--ease);
}
.stat-block:hover { background: var(--accent-light); border-color: rgba(74,124,201,0.15); }
.stat-number {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em;
    font-family: var(--font-mono);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sec) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-block:hover .stat-number { filter: brightness(1.1); }
.stat-block-label { font-size: 0.7rem; font-weight: 600; color: var(--text-sec); margin-top: 2px; }
.stat-block-desc { font-size: 0.62rem; color: var(--text-ter); margin-top: 1px; }

/* Hot Articles Widget */
.hot-article-list { display: flex; flex-direction: column; gap: 2px; }
.hot-article-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 8px; border-radius: var(--r-md);
    transition: var(--t-fast) var(--ease);
    cursor: pointer;
}
.hot-article-item:hover { background: var(--accent-light); }
.hot-rank {
    width: 22px; height: 22px; border-radius: var(--r-sm);
    background: var(--accent-light); color: var(--accent);
    font-size: 0.7rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hot-rank.rank-1 { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sec) 100%); color: #fff; }
.hot-rank.rank-2 { background: rgba(74,124,201,0.15); color: var(--accent); }
.hot-article-title {
    font-size: 0.8rem; font-weight: 500; color: var(--text);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.hot-article-item:hover .hot-article-title { color: var(--accent); }
.hot-article-date { font-size: 0.68rem; color: var(--text-ter); flex-shrink: 0; }
.sidebar-view-all {
    display: flex; justify-content: center; margin-top: 10px;
    font-size: 0.78rem; font-weight: 600; color: var(--accent);
    padding: 7px; border-radius: var(--r-md);
    transition: var(--t-fast) var(--ease);
}
.sidebar-view-all:hover { background: var(--accent-light); }

/* Tags Widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: var(--r-pill);
    font-size: 0.775rem; font-weight: 500;
    background: var(--bg); color: var(--text-sec);
    border: 1px solid var(--border);
    transition: all .2s var(--ease);
    cursor: pointer;
}
.tag-pill:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-sec) 100%);
    color: #fff; border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, .18);
}
.tag-pill:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 2px 8px rgba(108, 99, 255, .25);
}
.tag-pill.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(108, 99, 255, .3);
}

/* Projects Widget */
.sidebar-project-list { display: flex; flex-direction: column; gap: 6px; }
.sidebar-project-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--r-md);
    background: var(--bg); border: 1px solid transparent;
    transition: var(--t-fast) var(--ease);
    cursor: pointer;
}
.sidebar-project-item:hover {
    background: var(--accent-light);
    border-color: rgba(74,124,201,0.15);
    transform: translateX(3px);
}
.sidebar-project-icon {
    width: 34px; height: 34px; border-radius: var(--r-sm);
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.9rem;
}
.sidebar-project-name { font-size: 0.825rem; font-weight: 600; color: var(--text); flex: 1; }
.sidebar-project-item:hover .sidebar-project-name { color: var(--accent); }
.sidebar-project-arrow { color: var(--text-ter); font-size: 0.7rem; transition: var(--t-fast) var(--ease); }
.sidebar-project-item:hover .sidebar-project-arrow { color: var(--accent); }

/* Social Widget */
.social-icon-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.social-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text-sec);
    transition: var(--t-fast) var(--spring);
    box-shadow: var(--shadow-sm);
}
.social-icon-btn:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(74,124,201,0.35);
}
.social-icon-btn svg { width: 18px; height: 18px; }

/* ─── Pagination ──────────────────────────── */
.pagination {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    margin-top: var(--sp-5);
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); color: var(--text-sec);
    font-size: 0.875rem; font-weight: 500;
    transition: var(--t-fast) var(--ease); box-shadow: var(--shadow-sm);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-md); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(74,124,201,0.3); }
.pagination .page-number { display: none; }

/* ─── Footer ──────────────────────────────── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--sp-5) 0;
    margin-top: var(--sp-6);
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 28px; height: 28px; border-radius: var(--r-sm); }
.footer-text { font-size: 0.825rem; color: var(--text-sec); }
.footer-text a { color: var(--accent); }
.footer-text a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: var(--sp-3); }
.footer-links a { font-size: 0.825rem; color: var(--text-sec); transition: var(--t-fast) var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ─── Animations ──────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-card { animation: fadeInUp 0.6s var(--ease) both; }
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.posts-grid .post-card:nth-child(1) { animation-delay: 0.05s; }
.posts-grid .post-card:nth-child(2) { animation-delay: 0.1s; }
.posts-grid .post-card:nth-child(3) { animation-delay: 0.15s; }
.posts-grid .post-card:nth-child(4) { animation-delay: 0.2s; }
.posts-grid .post-card:nth-child(5) { animation-delay: 0.25s; }
.posts-grid .post-card:nth-child(6) { animation-delay: 0.3s; }

/* ─── Dark Mode ───────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827; --surface: #1F2937;
        --border: rgba(255,255,255,0.08);
        --text: #F9FAFB; --text-sec: #9CA3AF; --text-ter: #6B7280;
        --accent-light: rgba(74,124,201,0.12);
    }
}

/* ─── Focus States ────────────────────────── */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ─── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Selection ───────────────────────────── */
::selection { background: var(--accent-light); color: var(--accent); }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
    }
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-2);
        position: static;
    }
    .sidebar-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--sp-2); }
    .main-content { padding: var(--sp-3) 0 60px; }

    .hero-card {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
        padding: var(--sp-4);
    }
    .hero-right { width: 160px; height: 160px; margin: 0 auto; }
    .hero-heading { font-size: 1.75rem; }
    .hero-actions { flex-direction: column; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
    .projects-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr 1fr; }

    .post-header { padding: var(--sp-4) var(--sp-3) 0; }
    .post-title { font-size: 2rem; }
    .post-content-wrap { padding: 0 var(--sp-3) var(--sp-4); }
}

@media (max-width: 480px) {
    .container { padding: 0 var(--sp-2); }
    .main-content { padding: var(--sp-2) 0 48px; }
    .content-wrapper { gap: var(--sp-3); }

    .hero-card { padding: var(--sp-3); border-radius: var(--r-lg); }
    .hero-right { width: 130px; height: 130px; }
    .hero-heading { font-size: 1.5rem; }
    .hero-desc { font-size: 0.875rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }

    .sidebar { grid-template-columns: 1fr; }
    .sidebar-card:first-child { grid-column: auto; }

    .page-full .page-header { padding: var(--sp-3) var(--sp-2) 0; }
    .page-full .page-content { padding: var(--sp-3) var(--sp-2) var(--sp-4); }

    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
    .main-nav { order: 3; width: 100%; justify-content: center; }
    .nav-item { padding: 6px 10px; font-size: 0.825rem; }
    .footer-inner { flex-direction: column; gap: var(--sp-2); text-align: center; }
}

/* ─── Page / Post Full ────────────────────── */
.post-full {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-card);
}
.post-header { padding: var(--sp-5) var(--sp-5) 0; text-align: left; }
.post-tag {
    display: inline-flex; align-items: center; padding: 5px 14px;
    border-radius: var(--r-pill); font-size: 0.75rem; font-weight: 600;
    background: var(--accent-light); color: var(--accent); margin-bottom: var(--sp-2);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.post-title { font-size: 2.5rem; line-height: 1.15; margin-bottom: var(--sp-2); font-weight: 800; letter-spacing: -0.03em; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text-sec); padding-bottom: var(--sp-4); }
.post-meta .sep { color: var(--text-ter); }
.post-feature-image { margin: var(--sp-4) 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.post-feature-image img { width: 100%; }
.post-content-wrap { padding: 0 var(--sp-5) var(--sp-5); max-width: 800px; margin: 0 auto; display: flow-root !important; }
.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    display: flow-root; /* BFC — prevents child grid/flex from escaping */
}
.post-content p { margin-bottom: var(--sp-3); }
.post-content p:last-child { margin-bottom: 0; }
.post-content h2 { font-size: 1.625rem; margin: var(--sp-5) 0 var(--sp-2); font-weight: 700; letter-spacing: -0.02em; }
.post-content h3 { font-size: 1.25rem; margin: var(--sp-4) 0 var(--sp-2); font-weight: 600; }
.post-content h4 { font-size: 1.05rem; margin: var(--sp-3) 0 var(--sp-1); font-weight: 600; }
.post-content ul, .post-content ol { margin: var(--sp-3) 0; padding-left: var(--sp-3); }
.post-content li { margin-bottom: 8px; list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--accent-hover); }
.post-content code { background: var(--bg); padding: 2px 8px; border-radius: var(--r-sm); font-family: var(--font-mono); font-size: 0.88em; color: var(--text); border: 1px solid var(--border); }
.post-content pre { background: #1E293B; color: #E2E8F0; padding: var(--sp-3); border-radius: var(--r-md); overflow-x: auto; margin: var(--sp-4) 0; font-size: 0.875rem; line-height: 1.65; }
.post-content pre code { background: none; padding: 0; color: inherit; border: none; }
.post-content blockquote { border-left: 3px solid var(--accent); padding: var(--sp-2) var(--sp-3); margin: var(--sp-4) 0; color: var(--text-sec); font-style: italic; background: var(--accent-light); border-radius: 0 var(--r-md) var(--r-md) 0; }
.post-content hr { border: none; height: 1px; background: var(--border); margin: var(--sp-5) 0; }
.post-content img { border-radius: var(--r-md); margin: var(--sp-3) 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; }
.post-content th, .post-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--bg); font-weight: 600; }
.post-footer { padding: var(--sp-4) var(--sp-5) var(--sp-5); border-top: 1px solid var(--border); max-width: 800px; margin: 0 auto; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.post-tag-item { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--r-pill); font-size: 0.825rem; font-weight: 500; background: var(--bg); color: var(--text-sec); border: 1px solid var(--border); transition: var(--t-fast) var(--ease); }
.post-tag-item:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.page-full { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-card); overflow: hidden; }
.page-full .page-header { padding: var(--sp-4) var(--sp-4) 0; }
.page-full .page-content { padding: var(--sp-4) var(--sp-4) var(--sp-5); }
.page-full .page-content .about-intro { display: flex; align-items: flex-start; gap: var(--sp-3); }
.page-full .page-content .about-intro .about-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-light); flex-shrink: 0; }
.page-full .page-content .about-intro .about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.page-full .page-content .about-intro .about-info { flex: 1; min-width: 0; }

.page-template .post-header, .page .post-header { text-align: left; padding: var(--sp-5) 0 0; }
.page-template .post-content-wrap, .page .post-content-wrap { padding: var(--sp-3) 0; }
.page-template .post-full, .page .post-full { border-radius: var(--r-xl); }

.related-posts { padding: var(--sp-5); background: var(--bg); border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: var(--sp-3); }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-2); transition: var(--t-base) var(--ease); }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card-tag { font-size: 0.68rem; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.related-card-title { font-size: 0.875rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.related-card:hover .related-card-title { color: var(--accent); }
.related-card-date { font-size: 0.72rem; color: var(--text-ter); }

/* ─── Koenig Editor ──────────────────────── */
.kg-width-wide { width: 100%; margin: var(--sp-4) 0; }
.kg-width-full { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; margin-top: var(--sp-4); }
.kg-gallery-container { max-width: 900px; margin: 0 auto; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { width: 100%; height: auto; }
.kg-embed-card { margin: var(--sp-3) 0; }

/* ─── Error Page ─────────────────────────── */
.error-page { max-width: 520px; margin: 0 auto; }
.error-suggestions { margin-top: var(--sp-4); }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; padding: 10px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: var(--t-fast) var(--ease); }
.error-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ─── Print ──────────────────────────────── */
@media print {
    .site-header, .sidebar, .site-footer, .pagination { display: none !important; }
    .post-full, .hero-card { box-shadow: none !important; border: 1px solid #ddd !important; }
    body { background: white; color: black; }
}

/* ===== shuoshuowang.vip layout polish ===== */

body {
  background: #f4f6fa;
  color: #1f2937;
}

.site-main,
.main-content,
.content-area,
.container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

.post-card,
.sidebar-card,
.widget,
.author-box,
.related-post-card,
.post-hero,
.post-header,
.post-full-header {
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.post-card {
  padding: 28px 32px;
}

.home .post-card img,
.home .featured-post img,
.home .post-card .post-card-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
}

.home .post-card:first-child img,
.home .featured-post img {
  height: 360px;
}

.post-full-title,
.post-title,
.post-header h1 {
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.post-content,
.post-full-content,
.article-content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 1.82;
  color: #1f2937;
}

.post-feature-image,
.post-full-image img,
.article-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  margin: 28px 0 34px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.post-content figure,
.post-full-content figure,
.kg-card.kg-image-card {
  max-width: 720px;
  margin: 30px auto;
}

.post-content img,
.post-full-content img,
.kg-image-card img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  margin-left: auto;
  margin-right: auto;
}

figcaption,
.kg-card figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  text-align: center;
}

.sidebar,
.widget-area,
.aside-area {
  width: 280px;
  position: sticky;
  top: 84px;
}

.sidebar-card,
.widget,
.aside-card {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.sidebar-card:empty,
.widget:empty,
.aside-card:empty,
.personal-projects:empty,
.project-widget:empty {
  display: none;
}

.tag-cloud,
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a,
.tags-list a {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 28px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.post-share,
.share-section {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.author-box,
.author-card {
  margin-top: 32px;
  padding: 22px 24px;
}

.author-card-large {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 16px;
}
.author-card-large .author-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}
.author-card-large .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-card-large .avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.author-card-large .author-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.author-card-large .author-info p {
  font-size: 0.8rem;
  color: var(--text-sec);
  line-height: 1.4;
}

.related-posts {
  margin-top: 40px;
  padding-top: 34px;
}

.related-post-card {
  padding: 18px;
}

.related-post-card img {
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
}

.site-footer {
  margin-top: 48px;
  padding: 32px 0 26px;
}

.post-content pre,
.post-full-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 20px 22px;
  border-radius: 16px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.72;
  margin: 26px 0;
}

@media (max-width: 960px) {
  .sidebar,
  .widget-area,
  .aside-area {
    width: 100%;
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 768px) {
  .site-main,
  .main-content,
  .content-area,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .post-card {
    padding: 22px;
  }

  .home .post-card img,
  .home .featured-post img,
  .home .post-card:first-child img {
    height: 220px;
  }

  .post-full-title,
  .post-title,
  .post-header h1 {
    font-size: 28px;
    line-height: 1.28;
  }

  .post-content,
  .post-full-content,
  .article-content {
    max-width: 100%;
    font-size: 16.5px;
    line-height: 1.85;
  }

  .post-feature-image,
  .post-full-image img,
  .article-image img {
    max-height: 260px;
    border-radius: 16px;
    margin: 22px 0 28px;
  }

  .post-content figure,
  .post-full-content figure,
  .kg-card.kg-image-card {
    margin: 24px auto;
  }

  .post-content img,
  .post-full-content img,
  .kg-image-card img {
    max-height: 320px;
    border-radius: 14px;
  }

  .related-post-card img {
    height: 180px;
  }
}
/* ===== glassmorphism upgrade ===== */

:root {
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
  --glass-blur: blur(18px);
  --page-bg: #eef2f7;
  --text-main: #1f2937;
  --text-sub: #64748b;
}

body {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.10), transparent 24%),
    linear-gradient(135deg, #e8f0fb 0%, #f0e8f5 35%, #f5e8f0 65%, #eef2f8 100%) !important;
  color: var(--text-main);
}

.main-content,
.site-main,
.container,
.content-area {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.hero-card,
.sidebar-card,
.widget,
.post-card,
.project-card,
.stats-card,
.stock-card,
.related-post-card,
.author-box,
.post-full-header,
.post-full-content,
.post-content-wrap,
.pagination,
.tag-cloud-wrap,
.sidebar-card,
.widget,
.aside-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.home .hero-section,
.home .hero-card,
.home .hero-wrapper {
  min-height: auto;
}

.home .hero-card,
.home .hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 34px 36px;
  border-radius: 28px;
  overflow: hidden;
}

.home .hero-content h1 {
  font-size: 52px;
  line-height: 1.08;
  margin: 10px 0 16px;
  letter-spacing: -0.03em;
}

.home .hero-content p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-sub);
  max-width: 520px;
}

.home .hero-visual,
.home .hero-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home .hero-visual img,
.home .hero-image-wrap img {
  width: 230px;
  height: 230px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.18);
}

.home .hero-visual,
.home .hero-orbit,
.home .hero-graphic {
  position: relative;
}

.home .hero-visual::before,
.home .hero-orbit::before,
.home .hero-graphic::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  z-index: 0;
}

.home .stats-grid,
.home .account-grid,
.home .stock-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.home .stats-card,
.home .stock-card,
.home .account-card {
  min-width: 0;
  padding: 24px 28px;
  border-radius: 24px;
  overflow: hidden;
}

.home .stats-card h3,
.home .stock-card h3,
.home .account-card h3 {
  font-size: 22px;
  margin-bottom: 18px;
}

.home .stats-card .metric-row,
.home .stock-card .metric-row,
.home .account-card .metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home .stats-card::before,
.home .stock-card::before,
.home .account-card::before {
  width: 4px !important;
  border-radius: 999px;
}

.home .latest-posts-grid,
.home .post-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.home .post-card {
  border-radius: 24px;
  padding: 20px;
  min-height: 0;
}

.home .post-card-image,
.home .post-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.home .post-card-title {
  font-size: 28px;
  line-height: 1.38;
  margin-bottom: 10px;
}

.home .post-card-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home .post-card-meta {
  margin-top: 14px;
  font-size: 13px;
  color: #94a3b8;
}

.sidebar,
.widget-area,
.aside-area {
  width: 300px;
}

.sidebar-card,
.widget,
.aside-card {
  padding: 18px 20px;
  border-radius: 22px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.post-template .site-main,
.post-template .main-content {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.post-template .post-layout,
.post-template .article-layout,
.post-template .content-area {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 32px;
  align-items: start;
}

.post-full-header,
.post-header,
.article-header {
  padding: 34px 40px;
  border-radius: 28px 28px 0 0;
  margin-bottom: 0;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-bottom: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.post-full-title,
.post-title,
.article-title {
  font-size: 34px;
  line-height: 1.2;
  margin: 10px 0 12px;
}

.post-full-meta,
.post-meta {
  font-size: 13px;
  color: var(--text-sub);
}

.post-full-image,
.post-feature-image-wrap,
.article-feature-image {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.50);
  border-left: 1px solid rgba(255,255,255,0.55);
  border-right: 1px solid rgba(255,255,255,0.55);
}

.post-full-image img,
.post-feature-image,
.article-feature-image img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}

.post-full-content,
.post-content,
.article-content {
  padding: 36px 40px 42px;
  border-radius: 0 0 28px 28px;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-top: none;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  max-width: none;
}

.post-content figure,
.post-full-content figure,
.article-content figure,
.kg-card.kg-image-card {
  max-width: 680px;
  margin: 28px auto;
}

.post-content img,
.post-full-content img,
.article-content img,
.kg-image-card img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.post-content p,
.post-full-content p,
.article-content p {
  font-size: 17px;
  line-height: 1.85;
  margin: 0 0 1.2em;
  color: #1f2937;
}

.post-content h2,
.post-full-content h2,
.article-content h2 {
  font-size: 28px;
  line-height: 1.32;
  margin-top: 44px;
  margin-bottom: 16px;
}

.post-content h3,
.post-full-content h3,
.article-content h3 {
  font-size: 22px;
  line-height: 1.4;
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-template .sidebar-card,
.post-template .widget,
.post-template .aside-card {
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

@media (max-width: 960px) {
  .home .hero-card,
  .home .hero-section {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }

  .home .latest-posts-grid,
  .home .post-feed,
  .home .stats-grid,
  .home .account-grid,
  .home .stock-stats-grid {
    grid-template-columns: 1fr;
  }

  .post-template .post-layout,
  .post-template .article-layout,
  .post-template .content-area {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .widget-area,
  .aside-area {
    width: 100%;
    position: static;
  }

  .post-full-header,
  .post-header,
  .article-header,
  .post-full-content,
  .post-content,
  .article-content {
    padding-left: 22px;
    padding-right: 22px;
  }

  .post-full-image img,
  .post-feature-image,
  .article-feature-image img {
    max-height: 280px;
  }

  .post-content img,
  .post-full-content img,
  .article-content img,
  .kg-image-card img {
    max-height: 320px;
  }
}
/* post-shell 统一容器 */
.post-shell {
  border-radius: 28px;
  overflow: hidden;
}

/* ===== fix post detail image layout ===== */

/* 文章整体壳子 */
.post-template .post-shell {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

/* 标题区域 */
.post-template .post-full-header,
.post-template .post-header,
.post-template .article-header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 42px 46px 30px !important;
  margin: 0 !important;
}

/* 标题字号 */
.post-template .post-full-title,
.post-template .post-title,
.post-template .article-title {
  font-size: 34px !important;
  line-height: 1.22 !important;
  letter-spacing: -0.02em;
}

/* 首图外层：不要贴边，给它内缩 */
.post-template .post-full-image,
.post-template .article-image,
.post-template .post-feature-image-wrap {
  margin: 0 46px 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,0.45);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
}

/* 首图本身 */
.post-template .post-full-image img,
.post-template .article-image img,
.post-template .post-feature-image,
.post-template .post-feature-image-wrap img {
  width: 100% !important;
  height: auto !important;
  max-height: 420px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 正文区域：和上面的首图统一 */
.post-template .post-full-content,
.post-template .post-content,
.post-template .article-content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 38px 46px 48px !important;
  margin: 0 !important;
  max-width: none !important;
}

/* 正文内部文字不要太宽 */
.post-template .post-full-content > *,
.post-template .post-content > *,
.post-template .article-content > * {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* 正文图片单独控制 */
.post-template .post-full-content figure,
.post-template .post-content figure,
.post-template .article-content figure,
.post-template .kg-card.kg-image-card {
  max-width: 680px !important;
  margin: 30px auto !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

/* 正文普通图片 */
.post-template .post-full-content figure img,
.post-template .post-content figure img,
.post-template .article-content figure img,
.post-template .kg-card.kg-image-card img {
  width: 100% !important;
  max-height: 460px !important;
  object-fit: cover !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* 右侧边栏统一玻璃 */
.post-template .sidebar-card,
.post-template .widget,
.post-template .aside-card {
  background: rgba(255,255,255,0.52) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* 移动端 */
@media (max-width: 768px) {
  .post-template .post-shell {
    border-radius: 22px;
  }

  .post-template .post-full-header,
  .post-template .post-header,
  .post-template .article-header {
    padding: 30px 22px 24px !important;
  }

  .post-template .post-full-title,
  .post-template .post-title,
  .post-template .article-title {
    font-size: 28px !important;
  }

  .post-template .post-full-image,
  .post-template .article-image,
  .post-template .post-feature-image-wrap {
    margin: 0 22px !important;
    border-radius: 18px !important;
  }

  .post-template .post-full-image img,
  .post-template .article-image img,
  .post-template .post-feature-image,
  .post-template .post-feature-image-wrap img {
    max-height: 280px !important;
  }

  .post-template .post-full-content,
  .post-template .post-content,
  .post-template .article-content {
    padding: 30px 22px 38px !important;
  }

  .post-template .post-full-content figure img,
  .post-template .post-content figure img,
  .post-template .article-content figure img,
  .post-template .kg-card.kg-image-card img {
    max-height: 320px !important;
  }
}


/* ===== homepage glassmorphism with real class names ===== */

/* Hero card */
.hero-card {
  background: rgba(255,255,255,0.58) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 30px rgba(31,41,55,0.08);
  padding: 34px 36px;
}

/* Trading cards */
.trading-card {
  background: rgba(255,255,255,0.58) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(31,41,55,0.08);
}

/* Posts grid - actual class name */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Post card */
.post-card {
  background: rgba(255,255,255,0.58) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 24px !important;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(31,41,55,0.08);
}

.post-card-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

/* Project card */
.project-card {
  background: rgba(255,255,255,0.58) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 24px !important;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(31,41,55,0.08);
}

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.section-link {
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
}

/* Posts section spacing */
.posts-section,
.projects-section {
  margin-top: 28px;
}

/* Mobile */
@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 26px 22px;
    border-radius: 22px !important;
  }
}

/* ===== stronger glassmorphism effect ===== */

/* 背景必须有渐变光斑，否则毛玻璃看不出来 */
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(96, 165, 250, 0.28), transparent 26%),
    radial-gradient(circle at 82% 8%, rgba(168, 85, 247, 0.20), transparent 24%),
    radial-gradient(circle at 55% 52%, rgba(45, 212, 191, 0.14), transparent 28%),
    linear-gradient(135deg, #e8f0fb 0%, #f0e8f5 35%, #f5e8f0 65%, #eef2f8 100%) !important;
  background-attachment: fixed;
}

/* 给页面加一层细微网格，增强玻璃后的层次 */
body::before {
  content: ;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), rgba(0,0,0,0.15));
}

/* 所有主要卡片改成更明显的玻璃 */
.hero-section,
.hero-card,
.sidebar-card,
.widget,
.aside-card,
.stat-card,
.stats-card,
.account-card,
.stock-card,
.project-card,
.post-card,
.pagination,
.post-shell,
.post-full-header,
.post-full-content {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.36),
    rgba(255,255,255,0.16)
  ) !important;
  backdrop-filter: blur(26px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -1px 0 rgba(255,255,255,0.28) !important;
}

/* Hero 额外强化玻璃层次 */
.hero-section,
.hero-card {
  position: relative;
  overflow: hidden;
}

/* 卡片内部高光 */
.hero-section::before,
.hero-card::before,
.sidebar-card::before,
.widget::before,
.project-card::before,
.post-card::before,
.stats-card::before,
.account-card::before,
.stock-card::before {
  content: ;
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.45) 0%,
      rgba(255,255,255,0.12) 38%,
      rgba(255,255,255,0.02) 100%
    );
}

/* 避免 before 遮挡内容 */
.hero-section > *,
.hero-card > *,
.sidebar-card > *,
.widget > *,
.project-card > *,
.post-card > *,
.stats-card > *,
.account-card > *,
.stock-card > * {
  position: relative;
  z-index: 1;
}

/* 右侧卡片也更透明 */
.sidebar-card,
.widget,
.aside-card {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.44),
    rgba(255,255,255,0.22)
  ) !important;
}

/* 标签也做轻玻璃 */
.tag-cloud a,
.tags-list a {
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

/* 顶部导航保持原结构，只增强一点玻璃 */
.site-header,
.gh-head,
.header {
  background: rgba(255,255,255,0.55) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.65) !important;
}


/* ===== fix trading panel to light glass ===== */

.trading-widget {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
}

.trading-card,
.trading-card.sim,
.trading-card.live {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.54),
    rgba(255,255,255,0.24)
  ) !important;
  backdrop-filter: blur(26px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  border-radius: 24px !important;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.85) !important;
  color: #1f2937 !important;
}

.trading-card-header {
  color: #1e293b !important;
}

.trading-card .trading-label {
  color: #64748b !important;
}

.trading-card .trading-return,
.trading-card .trading-return.positive,
.trading-card .trading-return.negative {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  padding: 4px 10px;
  border-radius: 999px;
}

.trading-stats {
  background: transparent !important;
}

.trading-stat {
  background: transparent !important;
  color: #1f2937 !important;
}

.trading-stat .stat-label {
  color: #94a3b8 !important;
}

.trading-stat .stat-value {
  color: #1e293b !important;
  font-weight: 600;
}

/* Ensure numbers are visible */
.trading-card,
.trading-card * {
  color: inherit;
}
/* ===== Trading Detail Pages — Sim & Live ===== */

.dark-page,
.page-full {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.52),
    rgba(255,255,255,0.22)
  ) !important;
  backdrop-filter: blur(28px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(150%) !important;
  border-radius: 28px !important;
  padding: 36px 40px !important;
  margin: 20px auto !important;
  max-width: 1280px !important;
  box-shadow: 0 12px 40px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}

/* Header */
.dark-header {
  margin-bottom: 28px !important;
  padding-bottom: 4px !important;
}
.dark-header, .dark-header * {
  background: transparent !important;
  color: #1e293b !important;
  border: none !important;
  box-shadow: none !important;
}

.dark-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 8px 0 6px !important;
  letter-spacing: -0.02em !important;
}

.dark-sub {
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

.dark-back {
  color: #3b82f6 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}
.dark-back:hover {
  color: #2563eb !important;
}

/* Account Stats Strip */
.dark-acct-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: rgba(255,255,255,0.45) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  margin: 0 0 28px 0 !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.65) !important;
  box-shadow: 0 4px 16px rgba(15,23,42,0.05) !important;
}

.dark-cell {
  text-align: center;
  padding: 10px 4px !important;
  border-radius: 14px !important;
  transition: background 0.2s ease !important;
}

.dark-cell:hover {
  background: rgba(255,255,255,0.35) !important;
}

.dark-cell.total {
  background: rgba(16,185,129,0.08) !important;
}

.dark-label {
  display: block;
  font-size: 12px;
  color: #64748b !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.dark-value {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  font-family: 'SF Mono', Monaco, Inconsolata, 'Fira Code', 'Cascadia Code', monospace !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

.dark-cell.total .dark-value {
  color: #059669 !important;
}

.dark-value.neg {
  color: #dc2626 !important;
}

.dark-value.pos {
  color: #059669 !important;
}

/* Body Layout — single column, account stats below trades */
.dark-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  align-items: stretch !important;
}

/* Main Column — trades list */
.dark-col-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0 !important;
  width: 100%;
  order: 2;
}

/* Side Column — account stats, placed above trades */
.dark-col-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: static !important;
  top: auto !important;
  align-self: auto !important;
  width: 100%;
  order: 1;
}

.dark-section {
  background: rgba(255,255,255,0.42) !important;
  backdrop-filter: blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 6px 20px rgba(15,23,42,0.05) !important;
}

.dark-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15,23,42,0.06) !important;
}

.dark-panel-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

.dark-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0 !important;
}

.dark-count {
  margin-left: auto;
  font-size: 13px;
  color: #64748b !important;
  font-weight: 500 !important;
  font-family: 'SF Mono', Monaco, monospace !important;
}

/* Timeline */
.dark-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dark-empty {
  color: #94a3b8 !important;
  font-size: 14px;
  padding: 28px 16px;
  text-align: center;
  font-style: italic !important;
}

/* Trade Row — flex left/right, never overlap */
.trade-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  padding: 14px 18px;
  background: rgba(255,255,255,0.38) !important;
  border-radius: 14px !important;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.5) !important;
  transition: background 0.2s ease !important;
  animation: tlIn 0.35s ease both;
}

.trade-row:hover {
  background: rgba(255,255,255,0.55) !important;
  box-shadow: 0 2px 12px rgba(15,23,42,0.06) !important;
}

.trade-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.trade-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trade-time {
  font-family: 'SF Mono', Monaco, monospace !important;
  font-size: 12px;
  color: #475569 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.trade-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0 !important;
  letter-spacing: 0.02em;
}

.trade-tag.buy {
  background: rgba(16,185,129,0.12) !important;
  color: #059669 !important;
}

.trade-tag.sell {
  background: rgba(220,38,38,0.12) !important;
  color: #dc2626 !important;
}

.trade-name {
  font-weight: 600;
  color: #0f172a !important;
  font-size: 15px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;
}

.trade-code {
  color: #64748b !important;
  font-family: 'SF Mono', Monaco, monospace !important;
  font-size: 12px;
  flex-shrink: 0 !important;
}

.trade-shares {
  color: #94a3b8 !important;
  font-size: 13px;
  flex-shrink: 0 !important;
}

.trade-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  flex-shrink: 0;
}

.trade-price {
  font-family: 'SF Mono', Monaco, monospace !important;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a !important;
  line-height: 1.3 !important;
}

.trade-amount {
  font-family: 'SF Mono', Monaco, monospace !important;
  font-size: 14px;
  font-weight: 600;
  color: #334155 !important;
  line-height: 1.3 !important;
}

.trade-fee {
  font-family: 'SF Mono', Monaco, monospace !important;
  font-size: 12px;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
}


/* Side Column — Account Stats (now full-width below trades) */
.dark-col-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: static !important;
  top: auto !important;
  align-self: auto !important;
  width: 100%;
}

.dark-side-block {
  background: rgba(255,255,255,0.42) !important;
  backdrop-filter: blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 6px 20px rgba(15,23,42,0.05) !important;
}

.dark-side-head {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
}

/* Account Stats — horizontal 3-column grid, aligned with acct strip */
.dark-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dark-stat-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px !important;
  background: rgba(255,255,255,0.38) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
  transition: background 0.2s ease !important;
}

.dark-stat-row:hover {
  background: rgba(255,255,255,0.55) !important;
}

.dark-stat-row:last-child {
  border-bottom: none !important;
}

.dark-stat-name {
  display: block;
  font-size: 12px;
  color: #64748b !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dark-stat-val {
  font-weight: 700;
  color: #0f172a !important;
  font-family: 'SF Mono', Monaco, Inconsolata, 'Fira Code', 'Cascadia Code', monospace !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
}

/* Tags */
.dark-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dark-tag {
  padding: 4px 12px;
  background: rgba(59,130,246,0.1) !important;
  color: #3b82f6 !important;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500 !important;
}

/* Legacy compat: old class names still used by some templates */
.dark-action {
  font-weight: 600;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}
.dark-action.buy {
  background: rgba(16,185,129,0.14) !important;
  color: #059669 !important;
}
.dark-action.sell {
  background: rgba(220,38,38,0.14) !important;
  color: #dc2626 !important;
}
.dark-stock-name {
  font-weight: 600;
  color: #0f172a !important;
  font-size: 14px;
}
.dark-stock-code {
  font-size: 11px;
  color: #1d4ed8 !important;
  margin-left: 6px;
  font-family: 'SF Mono', Monaco, monospace !important;
}

/* Trading cards (home page widget) */
.trading-card,
.trading-card.sim,
.trading-card.live {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.52),
    rgba(255,255,255,0.22)
  ) !important;
  backdrop-filter: blur(26px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.7) !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 40px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

.trading-card .trading-label {
  color: #64748b !important;
  font-weight: 500 !important;
}

.trading-card .trading-return {
  background: rgba(16,185,129,0.1);
  color: #059669 !important;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600 !important;
  font-size: 13px !important;
}

.trading-card .stat-label {
  color: #94a3b8 !important;
  font-size: 12px !important;
}

.trading-card .stat-value {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-family: 'SF Mono', Monaco, monospace !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .dark-body {
    gap: 24px;
  }
  .dark-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .dark-stat-row {
    padding: 14px 8px !important;
  }
  .dark-stat-val {
    font-size: 20px !important;
  }
}

@media (max-width: 960px) {
  .dark-acct-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .dark-page, .page-full {
    margin: 12px !important;
    padding: 24px !important;
    border-radius: 20px !important;
  }
  .dark-title {
    font-size: 22px !important;
  }
  .dark-value {
    font-size: 22px !important;
  }
}

@media (max-width: 640px) {
  .dark-acct-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px !important;
  }
  .dark-value {
    font-size: 18px !important;
  }
  .trade-row {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  .trade-right {
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    text-align: left;
    flex-wrap: wrap;
  }
  .dark-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .dark-stat-row {
    padding: 12px 6px !important;
    gap: 6px;
  }
  .dark-stat-val {
    font-size: 16px !important;
  }
  .dark-stat-name {
    font-size: 10px !important;
  }
  .trade-name {
    max-width: 160px;
  }
}
