/* Import Google Fonts - Inter for app consistency */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Based on app_theme.dart */
:root {
    /* Main Colors from AppColors class */
    --primary-color: #6750A4;        /* Primary purple */
    --primary-container: #EADDFF;    /* Primary container */
    --on-primary: #FFFFFF;           /* Text on primary */
    --on-primary-container: #21005E; /* Text on primary container */
    
    --secondary-color: #625B71;      /* Secondary */
    --secondary-container: #E8DEF8;  /* Secondary container */
    --on-secondary: #FFFFFF;         /* Text on secondary */
    --on-secondary-container: #1E192B; /* Text on secondary container */
    
    --accent-color: #7F67BE;         /* Accent color */
    --accent-container: #E6DEFF;     /* Accent container */
    
    --background-color: #F6F5F7;     /* Background */
    --surface: #FFFFFF;              /* Surface */
    --surface-variant: #E7E0EC;      /* Surface variant */
    
    --error-color: #BA1A1A;          /* Error */
    --error-container: #FFDAD6;      /* Error container */
    --success-color: #0F8644;        /* Success */
    --success-container: #D1F7C4;    /* Success container */
    --info-color: #0E639C;           /* Info */
    --info-container: #E0F7FA;       /* Info container */
    --warning-color: #F49D1A;        /* Warning */
    
    --text-primary: #1C1B1F;         /* Text primary */
    --text-secondary: #49454F;       /* Text secondary */
    --on-background: #1C1B1F;        /* Text on background */
    --on-surface: #1C1B1F;           /* Text on surface */
    --on-surface-variant: #49454F;   /* Text on surface variant */
    
    --income-color: #0F8644;         /* Income color */
    --expense-color: #BA1A1A;        /* Expense color */
    
    /* Category colors for visual elements */
    --category-purple: #6750A4;      /* Primary purple */
    --category-coral: #F25D54;       /* Coral red */
    --category-amber: #FFA000;       /* Amber */
    --category-blue: #1976D2;        /* Blue */
    --category-teal: #00695C;        /* Teal */
    --category-brown: #5D4037;       /* Brown */
    --category-purple-light: #8E24AA; /* Purple light */
    --category-red: #B71C1C;         /* Red */
    --category-pink: #F06292;        /* Pink */
    --category-blue-grey: #546E7A;   /* Blue grey */
    --category-red-light: #E57373;   /* Red light */
    --category-blue-grey-light: #78909C; /* Blue grey light */
    
    /* Border Radius from AppBorderRadius class */
    --border-radius-card: 16px;
    --border-radius-input: 12px;
    --border-radius-button: 28px;
    --border-radius-dialog: 28px;
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 16px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Shadows - Material Design inspired */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.14);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.10), 0 6px 10px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    font-size: 16px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.subsection-title {
    text-align: center;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.subsection-description {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Header & Navigation */
header {
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    position: static; /* Changed from sticky to prevent fixed header */
    /* top: 0; removed as it's not needed for static positioning */
    /* z-index: 1000; removed as it's not needed for static positioning */
    padding-bottom: var(--spacing-sm); /* Add space below header */
}

/* Ensure the nav within the blog header's container is styled */
header > .container > nav { /* More specific selector for blog header nav */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: var(--spacing-sm) 0; */ /* Padding is on .container */
    /* height: 70px; */ /* Let content define height */
}

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
#hero {
    padding: var(--spacing-xl) 0;
    background-color: var(--primary-container);
    overflow: hidden;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background-color: var(--accent-container);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

#hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--primary-color);
    line-height: 1.1;
}

.by-line {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
    display: inline-block;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--on-primary-container);
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phone Frame Styling */
.phone-frame {
    position: relative;
    width: 280px;
    height: 570px;
    background-color: #111;
    border-radius: 36px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
    margin: 0 auto;
    border: 1px solid #444;
    overflow: hidden;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background-color: #111;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.app-store-button, .play-store-button {
    height: 50px;
    display: inline-block;
    transition: var(--transition);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.app-store-button:hover, .play-store-button:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.store-badge {
    height: 50px;
    width: auto;
    display: inline-block;
    max-width: 135px;
    background-color: transparent;
}

/* Features Section */
#features {
    padding: var(--spacing-xl) 0;
    background-color: var(--surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background-color: var(--surface);
    border-radius: var(--border-radius-card);
    padding: var(--spacing-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    border: 1px solid var(--surface-variant);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    margin-bottom: var(--spacing-sm);
    background-color: var(--primary-container);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-medium);
}

.feature-icon .material-symbols-rounded {
    font-size: 32px;
    color: var(--primary-color);
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.pro-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 8px;
    background-color: var(--primary-color);
    color: var(--on-primary);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Category Grid (for expense categories visualization) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.category-icon .material-symbols-rounded {
    font-size: 22px;
    color: white;
}

.category-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Screenshots Section */
#screenshots {
    padding: var(--spacing-xl) 0;
    background-color: var(--background-color);
}

.screenshots-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.screenshot {
    text-align: center;
    width: 300px;
}

.screenshot p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: var(--spacing-sm);
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: var(--spacing-md);
}

.dot {
    width: 10px;
    height: 10px;
    background-color: var(--surface-variant);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary-color);
    width: 26px;
    border-radius: 10px;
}

/* Subscription Plans Section */
#plans {
    padding: var(--spacing-xl) 0;
    background-color: var(--surface);
}

.plans-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
}

.plan-card {
    background-color: var(--surface);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--surface-variant);
    transition: var(--transition);
}

/* Add this to your existing CSS file, or modify if a similar rule exists */

/* Assuming your disclaimer is in a 'plan-footer' div as suggested before */
.plan-card .plan-footer {
    margin-top: var(--spacing-sm); /* Use your defined spacing variable */
    padding: 0 var(--spacing-sm) var(--spacing-sm) var(--spacing-sm); /* Consistent padding */
  }
  
  .plan-card .disclaimer-text {
    font-size: 0.85em;  /* Makes it 85% of the parent's font size. Adjust 0.8em or 0.75em if you want it even smaller. */
    font-style: italic; /* This makes the text italic. */
    color: var(--text-secondary); /* Uses your defined secondary text color for a slightly less prominent look. */
    line-height: 1.4;   /* Good for readability of smaller text. */
    text-align: left;   /* Or 'center' if you prefer, depending on your card layout. */
  }
  
  /* You might also want to style the asterisk in the price line to match or be less obtrusive */
  .plan-card .plan-price .price-disclaimer {
    font-size: 0.75em;
    vertical-align: super; /* Makes the asterisk a superscript */
    color: var(--text-secondary); /* Match disclaimer color or make it slightly different */
    margin-left: 2px; /* Small space from the price */
  }

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.plan-header {
    margin-bottom: var(--spacing-md);
}

.plan-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.plan-price {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.plan-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

.plan-features {
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
}

.plan-feature-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.plan-feature-item .material-symbols-rounded {
    margin-right: 10px;
    font-size: 20px;
}

.feature-included {
    color: var(--success-color);
}

.feature-excluded {
    color: var(--text-secondary);
    opacity: 0.6;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.plan-cta {
    margin-top: auto;
}

.plan-button {
    display: inline-block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--on-primary);
    border-radius: var(--border-radius-button);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.plan-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.plan-button-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.plan-button-outline:hover {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
}

.plan-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

/* Pro Plan specific styling */
.plan-card.pro {
    border-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.plan-card.pro::before {
    content: 'POPULAR';
    position: absolute;
    top: 20px;
    right: -35px;
    background-color: var(--primary-color);
    color: var(--on-primary);
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 600;
    transform: rotate(45deg);
}

/* Download Section */
#download {
    padding: var(--spacing-xl) 0;
    background-color: var(--primary-container);
    text-align: center;
    position: relative;
}

#download::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--surface);
    clip-path: ellipse(50% 60% at 50% 100%);
}

#download p {
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    color: var(--on-primary-container);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#download .cta-buttons {
    justify-content: center;
}

/* Footer */
footer {
    background-color: var(--surface);
    color: var(--text-primary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid var(--surface-variant);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.footer-logo h3 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.footer-logo p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    opacity: 0.9;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
    text-decoration: none;
}

.footer-copyright {
    border-top: 1px solid var(--surface-variant);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Transaction Card Preview (for mock records in home screen) */
.transaction-preview {
    background-color: var(--surface);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--surface-variant);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-sm);
}

.transaction-icon .material-symbols-rounded {
    font-size: 20px;
    color: white;
}

.transaction-content {
    flex: 1;
}

.transaction-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

.transaction-amount {
    font-weight: 600;
    font-size: 1rem;
}

.amount-expense {
    color: var(--expense-color);
}

.amount-income {
    color: var(--income-color);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .feature-card {
        padding: var(--spacing-sm);
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-content, .hero-image {
        flex: 100%;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .screenshots-carousel {
        gap: var(--spacing-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .plan-card {
        min-width: 100%;
    }

    /* Blog Responsive Adjustments for 768px and below */
    .blog-scope body { /* Reduce base font size slightly for smaller tablets and large phones */
        font-size: 15px; 
    }
    .blog-scope .container {
        width: 95%; /* Slightly more space within container */
    }
    .blog-scope header .container h1 a {
        font-size: 2rem; /* Adjust blog title size */
    }
    .blog-scope header .container nav a {
        padding: 0.5rem var(--spacing-sm);
        font-size: 0.95rem;
    }

    .blog-scope .article-content, /* .main-column removed, .blog-scope added */
    .blog-scope .postlist-item { 
        padding: var(--spacing-sm); /* Reduced padding */
    }
    .blog-scope .sidebar-widget {
        padding: var(--spacing-sm);
    }

    .blog-scope .postlist-item h2.post-title {
        font-size: 1.3rem; 
        line-height: 1.25; 
        overflow-wrap: break-word; 
        word-wrap: break-word; 
        /* hyphens: auto; Removed for now */
        max-width: 100%; 
        text-align: left; /* Ensure title is left-aligned */
    }
    .blog-scope .article-content .post-header-single .post-title-single {
        font-size: 1.5rem; 
        line-height: 1.25;
    }
    .blog-scope .article-content h1 { font-size: 1.4rem; }
    .blog-scope .article-content h2 { font-size: 1.3rem; }
    .blog-scope .article-content h3 { font-size: 1.2rem; }

    .blog-scope .sidebar-widget-title {
        font-size: 1.05rem;
    }
    .blog-scope .article-content { /* .main-column removed, .blog-scope added */
        max-width: 100%; /* 小屏幕上文章内容区域接近100%宽度 */
        word-wrap: break-word; 
        overflow-wrap: break-word; 
    }
    .blog-scope .article-content .post-header-single .post-title-single,
    .blog-scope .postlist-item h2.post-title { 
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .blog-scope .featured-image-container-single,
    .blog-scope .postlist-thumbnail-link {
        margin-bottom: var(--spacing-sm); /* Reduce margin for images */
    }
    .blog-scope .postlist-item .post-meta,
    .blog-scope .article-content .post-header-single .post-meta-single {
        font-size: 0.85rem; 
        margin-bottom: var(--spacing-sm);
    }
    .blog-scope .post-tag {
        font-size: 0.75rem;
        padding: 0.2em 0.5em;
    }
    .blog-scope .postlist-item .read-more-link {
        font-size: 0.9rem;
        padding: calc(var(--spacing-xs) * 0.8) var(--spacing-sm);
    }
}

@media (max-width: 580px) {
    .blog-scope body { /* Further reduce base font size for typical mobile phones */
        font-size: 14px;
    }
    .blog-scope .container {
        width: 95%;
        padding: 0 var(--spacing-xs); /* Reduce container padding */
    }
    /* Header adjustments for blog */
    .blog-scope header .container {
        flex-direction: column; /* Stack title and nav */
        align-items: center;
        padding-top: var(--spacing-xs);
        padding-bottom: var(--spacing-xs);
    }
    .blog-scope header .container h1 a { 
        font-size: 1.6rem; 
        margin-bottom: var(--spacing-xs);
        text-align: center;
    }
    .blog-scope header .container nav {
        justify-content: center; /* Center nav items */
        width: 100%;
    }
    .blog-scope header .container nav a {
        font-size: 0.9rem;
        padding: 0.4rem var(--spacing-sm);
    }
    
    /* General site elements, if they affect blog readability */
    .blog-scope .nav-links { /* This seems to be for a different nav, ensure it doesn't conflict or adjust if it's the blog's */
        gap: var(--spacing-sm); /* Reduce gap for general nav links if present */
        flex-wrap: wrap;
        justify-content: center;
    }
    .blog-scope .nav-links a {
        font-size: 0.9rem;
    }
    
    /* Further Blog Responsive Adjustments for 580px and below */
    .blog-scope .article-content { /* .main-column removed, .blog-scope added */
        padding-top: var(--spacing-xs); 
        padding-bottom: var(--spacing-xs);
        padding-left: var(--spacing-xs); /* 让内容区在小屏幕上有合适的边距 */
        padding-right: var(--spacing-xs); 
    }
    /* Restore postlist-item padding to a more standard small value */
    .blog-scope .postlist-item { 
        padding: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
        text-align: left; 
    }

    .blog-scope .postlist-item h2.post-title {
        font-size: 1.1rem; 
        line-height: 1.2;
        overflow-wrap: break-word;
        word-wrap: break-word;
        max-width: 100%; 
        text-align: left; 
        margin-left: 0;
        margin-right: 0;
        padding-left: 0; 
        padding-right: 0;
        width: 100%; 
    }
    .blog-scope .postlist-item h2.post-title a {
        text-align: left; 
        display: block; 
        width: 100%; 
    }
    .blog-scope .article-content .post-header-single .post-title-single {
        font-size: 1.35rem; 
        line-height: 1.2;
    }
    .blog-scope .article-content p { 
        font-size: 0.9rem; 
        line-height: 1.6;
    }
    .blog-scope .article-content h1 { font-size: 1.25rem; }
    .blog-scope .article-content h2 { font-size: 1.2rem; }
    .blog-scope .article-content h3 { font-size: 1.1rem; }

    .blog-scope .sidebar-widget-title {
        font-size: 1rem;
    }
    .blog-scope .postlist-item .post-meta,
    .blog-scope .article-content .post-header-single .post-meta-single {
        font-size: 0.78rem; 
    }
    .blog-scope .post-tag {
        font-size: 0.7rem; 
        padding: 0.15em 0.4em;
    }
    .blog-scope .featured-image-container-single,
    .blog-scope .postlist-thumbnail-link {
        border-radius: var(--border-radius-medium); 
        margin-bottom: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
    }
    .blog-scope .postlist-item .read-more-link {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* Responsive adjustments for very small screens (e.g., iPhone SE width, ~375px) */
@media (max-width: 400px) { /* Adjusted breakpoint slightly for broader coverage */
    .blog-scope body {
        font-size: 14px; /* 调整为 14px */
        -webkit-text-size-adjust: 100%; 
        text-size-adjust: 100%; 
    }
    .blog-scope .container {
        width: 96%; 
        padding: 0 var(--spacing-xs); /* 调整为 var(--spacing-xs) */
    }

    .blog-scope header .container h1 a {
        font-size: 1.4rem; 
    }
    .blog-scope header .container nav a {
        font-size: 0.85rem;
        padding: 0.3rem var(--spacing-xs);
    }

    .blog-scope .article-content { /* .main-column removed, .blog-scope added */
         padding-top: var(--spacing-sm);  /* 调整为 var(--spacing-sm) */
         padding-bottom: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
         padding-left: var(--spacing-sm);  /* 调整为 var(--spacing-sm) */
         padding-right: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
    }
    
    .blog-scope .postlist-item { 
        padding: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
        text-align: left; 
    }

    .blog-scope .postlist-item h2.post-title {
        font-size: 1.1rem; 
        line-height: 1.2;
        overflow-wrap: break-word;
        word-wrap: break-word;
        max-width: 100%; 
        text-align: left; 
        margin-left: 0;
        margin-right: 0;
        padding-left: 0; 
        padding-right: 0;
        width: 100%; 
    }
    .blog-scope .postlist-item h2.post-title a {
        text-align: left; 
        display: block; 
        width: 100%; 
    }
    .blog-scope .article-content .post-header-single .post-title-single {
        font-size: 1.2rem; 
        line-height: 1.2;
    }
    .blog-scope .article-content p {
        font-size: 0.9rem; /* 调整为 0.9rem */
        line-height: 1.6; /* 调整为 1.6 */
    }
    .blog-scope .article-content h1 { font-size: 1.15rem; }
    .blog-scope .article-content h2 { font-size: 1.1rem; }
    .blog-scope .article-content h3 { font-size: 1rem; }

    .blog-scope .sidebar-widget-title {
        font-size: 0.9rem;
    }
    .blog-scope .postlist-item .post-meta,
    .blog-scope .article-content .post-header-single .post-meta-single {
        font-size: 0.7rem; 
        margin-bottom: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
    }
    .blog-scope .post-tag {
        font-size: 0.65rem; 
        padding: 0.1em 0.3em;
    }
    .blog-scope .postlist-item .read-more-link {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-sm); /* 调整为 var(--spacing-xs) var(--spacing-sm) */
    }
    .blog-scope .featured-image-container-single,
    .blog-scope .postlist-thumbnail-link {
        border-radius: var(--border-radius-medium); /* 调整为 var(--border-radius-medium) */
        margin-bottom: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
    }

    /* Reduce spacing for post list items */
    .blog-scope .postlist-item {
        margin-bottom: var(--spacing-md); /* 调整为 var(--spacing-md) */
    }
    .blog-scope .postlist-thumbnail-link {
        margin-bottom: var(--spacing-sm); /* 调整为 var(--spacing-sm) */
    }

    /* Ensure code blocks are usable */
    .blog-scope .article-content pre {
        padding: var(--spacing-sm);
        font-size: 0.85em;
    }
    .blog-scope .article-content code {
        font-size: 0.85em;
    }
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-sm);
}

.tab-button {
    background-color: var(--surface);
    border: 1px solid var(--surface-variant);
    border-radius: var(--border-radius-button);
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-button:hover {
    background-color: var(--surface-variant);
}

.tab-button.active {
    background-color: var(--primary-color);
    color: var(--on-primary);
    border-color: var(--primary-color);
}

.category-tab {
    display: none;
}

.category-tab.active {
    display: grid;
}

/* 更新手机屏幕模拟样式 */
.mock-screen {
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 状态栏样式 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 12px;
    height: 20px;
    background-color: var(--background-color);
    font-size: 10px;
    color: var(--text-primary);
}

.time {
    font-weight: 500;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 应用标题栏 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--background-color);
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 应用内容区域 */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

/* 同步状态栏 */
.sync-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background-color: #546E7A;
    color: white;
    font-size: 12px;
    margin-bottom: 12px;
}

.sync-status .material-symbols-rounded {
    font-size: 16px;
}

/* 快速操作区域 */
.action-cards {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.action-card {
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--surface-variant);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.action-icon .material-symbols-rounded {
    font-size: 20px;
}

.action-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 交易列表项 */
.transaction-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-variant);
}

.transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.transaction-icon .material-symbols-rounded {
    font-size: 18px;
    color: white;
}

.transaction-content {
    flex: 1;
    min-width: 0;
}

.transaction-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.expense {
    color: var(--expense-color);
}

.income {
    color: var(--income-color);
}

/* 底部导航栏 */
.bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 48px;
    background-color: var(--surface);
    border-top: 1px solid var(--surface-variant);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    padding: 6px 0;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item .material-symbols-rounded {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 9px;
}

/* 年度报告卡片 */
.year-card {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.year-badge {
    background-color: #E6DEFF;
    color: var(--primary-color);
    padding: 4px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 12px;
}

.year-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.year-icon {
    color: var(--primary-color);
    font-size: 22px;
}

.year-details {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 报告标签 */
.report-tabs {
    display: flex;
    border-bottom: 1px solid var(--surface-variant);
    margin-bottom: 12px;
}

.report-tab {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    font-size: 12px;
    color: var(--text-secondary);
    position: relative;
}

.report-tab.active {
    color: var(--primary-color);
    font-weight: 500;
}

.report-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* 图表样式 */
.chart-container {
    margin: 20px 0;
    text-align: center;
}

.donut-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}

.donut-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: var(--background-color);
    border-radius: 50%;
}

.chart-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 2;
}

/* 详情卡片 */
.details-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
}

.details-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--surface-variant);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.detail-text {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary);
}

.detail-value {
    font-weight: 500;
    font-size: 12px;
}

/* 预算卡片 */
.budget-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.budget-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.budget-icon .material-symbols-rounded {
    font-size: 18px;
    color: white;
}

.budget-info {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.budget-details {
    flex: 1;
}

.budget-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.budget-amount {
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.budget-total {
    font-size: 11px;
    color: var(--text-secondary);
}

.budget-progress {
    height: 8px;
    background-color: var(--surface-variant);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    width: 0%;
}

/* 更多样式根据需要添加 */
.remaining-text {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 3px;
}

/* 报表摘要卡片 */
.summary-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
}

.summary-section {
    margin-bottom: 12px;
}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-primary);
}

.summary-value {
    font-size: 12px;
    font-weight: 500;
}

.summary-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon .material-symbols-rounded {
    font-size: 14px;
}

.income-text {
    color: var(--income-color);
}

.expense-text {
    color: var(--expense-color);
}

.neutral-text {
    color: var(--primary-color);
}

.divider {
    height: 1px;
    background-color: var(--surface-variant);
    margin: 6px 0;
}

/* 导出按钮 */
.export-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: var(--surface-variant);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 12px;
}

.export-button .material-symbols-rounded {
    font-size: 16px;
}

/* 趋势图表 */
.trend-chart {
    height: 180px;
    margin: 12px 0;
    position: relative;
    padding-bottom: 20px;
}

.chart-bar {
    position: absolute;
    bottom: 20px;
    width: 12px;
    border-radius: 3px 3px 0 0;
}

.chart-bar.expense {
    background-color: var(--expense-color);
    z-index: 1;
}

.chart-bar.income {
    background-color: var(--income-color);
    z-index: 1;
}

.chart-month {
    position: absolute;
    bottom: 0;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    width: 30px;
    margin-left: -9px; /* Center under bar groups */
}

.chart-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--surface-variant);
}

.chart-label {
    position: absolute;
    left: 0;
    font-size: 9px;
    color: var(--text-secondary);
}

/* 饼图图例 */
.chart-legend {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    margin-right: 10px;
    white-space: nowrap;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 5px;
}

.legend-text {
    color: var(--text-secondary);
    margin-right: 5px;
}

.legend-value {
    font-weight: 500;
    color: var(--text-primary);
}

/*
==============================================
BLOG SPECIFIC STYLES within .blog-scope
==============================================
*/

.blog-scope body { /* 如果你只想在博客范围内改变body的基础字体和背景 */
    font-family: 'Inter', sans-serif; /* 或者你为博客选择的特定阅读字体 */
    font-size: 16px; /* 博客的基础字号，可以在响应式中调整 */
    line-height: 1.7;
    background-color: var(--background-color); /* 或者博客专用的背景色 */
    color: var(--text-primary);
}

.blog-scope .container { /* 博客页面内 .container 的特定调整 */
    max-width: 100%; /* 先让它在博客范围内不那么受主站container限制 */
    padding: 0 var(--spacing-sm); /* 博客的左右边距 */
}

/* General Blog Layout & Typography */
/* The .container class from the main site provides max-width.
   We will add more specific styling for article content within it. */

/* Blog Header & Footer Adjustments from base.njk */
/* Targeting header/footer specifically within the blog's base layout context */
/* This assumes base.njk is primarily for the blog. If not, a body class is better. */
.blog-scope header .container h1 a { /* Blog title in header */
    font-size: 2rem; /* 调整为适合博客的大小 */
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.blog-scope header .container h1 a:hover {
    color: var(--accent-color);
}

.blog-scope header .container nav a { /* Blog navigation links */
    font-size: 0.95rem; /* 调整为适合博客的大小 */
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.6rem var(--spacing-md); /* Increased padding for a button-like feel */
    border-radius: var(--border-radius-button);
    transition: var(--transition);
}
.blog-scope header .container nav a:hover {
    color: var(--on-primary-container); /* Text color on hover */
    background-color: var(--primary-container); /* Background on hover */
    text-decoration: none;
}
/* Style for a potential list of nav items if you add more */
.blog-scope header .container nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.blog-scope header .container nav ul li {
    margin-left: var(--spacing-sm);
}


/* Footer adjustments */
.blog-scope footer { /* Targeting the main site footer */
    padding-top: var(--spacing-lg); /* Add space above footer */
}

.blog-scope footer .container p { /* Blog footer text */
    font-size: 0.85rem; /* 调整为适合博客的大小 */
    color: var(--text-secondary);
    text-align: center;
    padding: var(--spacing-md) 0;
}

/* Blog Index Page (Post List from index.md) */
.blog-scope .postlist {
    list-style: none;
    padding: 0;
    margin: var(--spacing-lg) 0; /* Add some top/bottom margin to the list */
}

.blog-scope .postlist-item {
    background-color: var(--surface);
    padding: var(--spacing-lg); /* More padding for a spacious feel */
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-md); /* Slightly more prominent shadow */
    border: 1px solid var(--surface-variant);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.blog-scope .postlist-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-scope .postlist-item:last-child {
    margin-bottom: 0;
}

/* Thumbnail on Blog Index Page */
.blog-scope .postlist-thumbnail-link {
    display: flex;                 /* Reverted to flex */
    align-items: center;           /* Re-added */
    aspect-ratio: 16 / 9;       /* Re-added */
    margin-bottom: var(--spacing-md); /* Space between thumbnail and title */
    border-radius: var(--border-radius-medium); /* Consistent rounding */
    overflow: hidden; /* Ensures image respects border radius */
    box-shadow: var(--shadow-sm);
    line-height: 0; /* Prevent extra space if image is treated as inline-block */
    /* height: auto; Comment remains, as aspect-ratio is the primary height controller */
    font-size: 0; /* Further attempt to collapse any whitespace rendering */
}

.blog-scope .postlist-thumbnail {
    width: 100%;
    height: 100%;                  /* Reverted to 100% */
    object-fit: cover;             /* Re-added */
    display: block;
    transition: transform 0.3s ease;
    /* vertical-align: top; Still removed */
}

.blog-scope .postlist-thumbnail-link:hover .postlist-thumbnail {
    transform: scale(1.05); /* Slight zoom on hover */
}


/* Using h2 for post titles in the list for better semantics */
.blog-scope .postlist-item h2.post-title {
    font-size: 1.75rem; /* Or 2rem if you prefer larger titles */
    font-weight: 700; /* Bolder titles */
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-xs);
}

.blog-scope .postlist-item h2.post-title a {
    text-decoration: none;
    color: inherit;
}

.blog-scope .postlist-item h2.post-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.blog-scope .postlist-item .post-meta { /* For date and author */
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md); /* More space after meta */
    display: block;
}

.blog-scope .postlist-item .post-excerpt p {
    margin-bottom: var(--spacing-md); /* Consistent paragraph spacing */
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.blog-scope .postlist-item .read-more-link {
    display: inline-block;
    font-weight: 600; /* Bolder read-more */
    color: var(--primary-color);
    text-decoration: none;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--primary-container);
    border-radius: var(--border-radius-button);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-scope .postlist-item .read-more-link:hover {
    background-color: var(--primary-color);
    color: var(--on-primary);
    text-decoration: none;
}

/* Single Post Page Styling */
/* Wrap Markdown content in an <article class="article-content"> in base.njk if not already */
.blog-scope .article-content { /* 单篇文章内容容器 */
    max-width: 750px; /* 调整：增加阅读宽度 */
    margin: 0 auto var(--spacing-lg) auto; /* 上 右/左 下 */
    padding: var(--spacing-md);
    background-color: var(--surface);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-md);
    /* margin-top and margin-bottom are handled by the margin shorthand above */
}

/* Featured Image on Single Post Page */
.blog-scope .featured-image-container-single {
    display: flex;
    align-items: center;
    aspect-ratio: 16 / 9;
    margin-bottom: var(--spacing-lg); /* Space between image and title */
    border-radius: var(--border-radius-large); /* Match article content card */
    overflow: hidden; /* Ensures image respects border radius */
    box-shadow: var(--shadow-sm);
}

.blog-scope .featured-image-single {
    width: 100%;
    height: 100%; /* Fill container height */
    /* max-height: 400px; Removed, container aspect-ratio controls height */
    object-fit: cover; /* Crop to fill, maintain aspect ratio */
    display: block; /* Remove any extra space below image */
}

/* Single Post Title (rendered by base.njk) */
.blog-scope .article-content .post-header-single .post-title-single {
    font-size: 1.9rem; /* Further reduced */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.25;
}

/* Post Meta (Date/Author on single post) */
.blog-scope .article-content .post-header-single .post-meta-single {
    font-size: 0.9rem; /* Slightly smaller */
    color: var(--text-secondary); /* Lighter color */
    margin-bottom: var(--spacing-lg); /* Space before main content */
    display: block;
}
.blog-scope .article-content .post-header-single .post-meta-single time {
    font-weight: 500;
}

/* Post Tags Styling */
.blog-scope .post-tag {
    display: inline-block;
    background-color: var(--accent-container);
    color: var(--on-secondary-container); /* Adjusted for better contrast on accent-container */
    padding: 0.2em 0.6em;
    border-radius: var(--border-radius-small);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    margin-left: 0.3em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-scope .post-tag:first-of-type {
    margin-left: 0.5em; /* Add a bit more space after "Tags:" */
}

.blog-scope .post-tag:hover {
    background-color: var(--primary-color);
    color: var(--on-primary);
    text-decoration: none;
}

.blog-scope .postlist-item .post-tags-list {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    /* display: flex; Reverted to default block for p */
    /* flex-wrap: wrap; */
    /* align-items: center; */
}

.blog-scope .postlist-item .tags-label { /* Style for the "Tags:" label span */
    display: inline; /* Default for span, but explicit */
    margin-right: 0.5em; /* Space between "Tags:" and the first tag */
}

.blog-scope .postlist-item .post-tags-list .post-tag { /* Ensure tags on homepage are also inline-block */
    display: inline-block; /* This is already set on .post-tag, but reinforcing for specificity */
    margin-bottom: 0.3em; /* Add a little space if tags wrap */
}

/* .blog-scope .postlist-item .post-tags-list .post-tag:first-of-type { */
    /* margin-left: 0.5em; This is now handled by margin-right on .tags-label */
/* } */


/* Headings within Markdown content */
.blog-scope .article-content h2, /* Markdown H2 becomes first sub-heading */
.blog-scope .article-content h3,
.blog-scope .article-content h4,
.blog-scope .article-content h5,
.blog-scope .article-content h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--text-primary);
    font-weight: 600; /* Bold sub-headings */
    line-height: 1.3;
}

.blog-scope .article-content h1 { font-size: 1.7rem; } /* Markdown H1 (if used) - further reduced */
.blog-scope .article-content h2 { font-size: 1.8rem; } /* 示例 */
.blog-scope .article-content h3 { font-size: 1.3rem; } /* Further reduced */
.blog-scope .article-content h4 { font-size: 1.15rem; } /* Further reduced */
/* h5 and h6 will inherit or can be styled similarly if needed */

/* Paragraphs within article content */
.blog-scope .article-content p {
    font-size: 1rem; /* 或 1.1rem，约等于 16px-18px */
    line-height: 1.75;
    margin-bottom: 1.5em;
    color: var(--text-primary);
}

/* Links within article content */
.blog-scope .article-content a {
    color: var(--primary-color);
    text-decoration: underline; /* Make links clear */
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.blog-scope .article-content a:hover {
    color: var(--accent-color);
    text-decoration-thickness: 2px;
}

.blog-scope .article-content ul,
.blog-scope .article-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: 1.8em; /* Slightly more indent */
}

.blog-scope .article-content li {
    margin-bottom: var(--spacing-sm); /* More space between list items */
    line-height: 1.7;
}

.blog-scope .article-content blockquote {
    margin: var(--spacing-md) 0 var(--spacing-md) 0; /* No left margin, full width */
    padding: var(--spacing-md); /* More padding */
    border-left: 5px solid var(--primary-color);
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    font-style: italic;
    border-radius: var(--border-radius-medium);
}

.blog-scope .article-content blockquote p:last-child {
    margin-bottom: 0;
}

.blog-scope .article-content pre {
    background-color: #282c34; /* Common dark theme for code */
    color: #abb2bf; /* Light text for contrast */
    padding: var(--spacing-md);
    border-radius: var(--border-radius-medium);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Better monospace stack */
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
}

.blog-scope .article-content code { /* Inline code */
    background-color: var(--accent-container);
    color: var(--on-primary-container); /* Ensure contrast */
    padding: 0.2em 0.5em;
    border-radius: var(--border-radius-small);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    word-break: break-word;
}

.blog-scope .article-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    word-break: normal; /* Allow long lines in code blocks to scroll */
}

.blog-scope .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-large); /* Consistent with cards */
    margin: var(--spacing-lg) auto; /* Center images and add more vertical space */
    display: block; /* Ensure margin auto works */
    box-shadow: var(--shadow-md);
}

.blog-scope .article-content hr {
    border: 0;
    height: 1px;
    background-color: var(--surface-variant);
    margin: var(--spacing-xl) 0; /* More prominent separator */
}

/* Add a class to body in base.njk for blog-specific global overrides if needed */
/* e.g., <body class="blog-theme"> */
/* .blog-scope.blog-theme main.container { */ /* This was an example, .blog-scope is now the primary scope */
    /* This could be used to set a narrower max-width for all blog pages if .article-content isn't enough */
    /* max-width: 800px; */
/* } */
/* Post Navigation (Previous/Next) */
.blog-scope .post-navigation {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--surface-variant);
}

.blog-scope .post-navigation-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md); /* Add a gap between items */
}

.blog-scope .post-navigation-item {
    flex: 1 1 calc(50% - (var(--spacing-md) / 2)); /* Adjust basis to account for gap */
    min-width: 250px; /* Prevent items from becoming too narrow */
    display: flex; /* Ensure the li itself is a flex container for its 'a' tag */
    margin-bottom: 0; /* Gap will handle spacing, remove bottom margin here */
}

.blog-scope .post-navigation-item a {
    display: flex; /* Use flex for internal alignment */
    flex-direction: column;
    justify-content: space-between; /* Distribute space for label and title */
    width: 100%; /* Make 'a' tag take full width of 'li' */
    padding: var(--spacing-md);
    border: 1px solid var(--surface-variant);
    border-radius: var(--border-radius-card);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    height: 100%;
    background-color: var(--surface); /* Ensure background color is set */
}

.blog-scope .post-navigation-item a:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    background-color: var(--surface); /* Keep background consistent or slightly change */
}

.blog-scope .post-navigation-item.prev .nav-meta-container {
    justify-content: flex-start; /* Align to the left for "Previous" */
}

.blog-scope .post-navigation-item.next .nav-meta-container {
    justify-content: flex-end; /* Align to the right for "Next" */
}

.blog-scope .post-navigation-item .nav-meta-container { /* New wrapper for arrow and label */
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.blog-scope .post-navigation-item .nav-arrow {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--primary-color);
}

.blog-scope .post-navigation-item.prev .nav-arrow {
    margin-right: var(--spacing-xs);
}

.blog-scope .post-navigation-item.next .nav-arrow {
    margin-left: var(--spacing-xs);
    order: 1; /* Arrow after label for "Next" */
}

.blog-scope .post-navigation-item .nav-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-scope .post-navigation-item .nav-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3; /* Slightly tighter for titles */
    color: var(--text-primary);
}
.blog-scope .post-navigation-item.prev .nav-title {
    text-align: left;
}
.blog-scope .post-navigation-item.next .nav-title {
    text-align: right;
}

.blog-scope .post-navigation-item a:hover .nav-title {
    color: var(--primary-color);
}

/* Responsive adjustments for post navigation */
@media (max-width: 768px) {
    .blog-scope .post-navigation-item {
        flex: 1 1 100%; /* Stack them on smaller screens */
        margin-bottom: var(--spacing-md); /* Add margin back when stacked */
    }
    .blog-scope .post-navigation-item:last-child {
        margin-bottom: 0;
    }
    .blog-scope .post-navigation-item.next .nav-meta-container,
    .blog-scope .post-navigation-item.prev .nav-meta-container {
        justify-content: flex-start; /* Align all meta to left when stacked */
    }
    .blog-scope .post-navigation-item.next .nav-arrow {
         order: 0; /* Arrow before label for next when stacked */
         margin-left: 0;
         margin-right: var(--spacing-xs);
    }
    .blog-scope .post-navigation-item.next .nav-title,
    .blog-scope .post-navigation-item.prev .nav-title {
        text-align: left; /* Align all titles to left when stacked */
    }
}
/* CTA Link Styling within Articles */
/* More specific selector for paragraph links that are CTAs, excluding image badges */
.blog-scope .article-content p > a[href^="http"]:not(.app-store-button):not(.play-store-button),
.blog-scope .article-content p > a[href^="mailto"],
.blog-scope .article-content p > a[href="#"]:not([class*="-button"]) { /* Avoid affecting other potential # links styled as buttons */
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm); /* Reduced padding */
    margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0; /* Adjusted margin */
    background-color: var(--primary-color);
    color: var(--on-primary) !important; /* Ensure text color is white for contrast */
    border-radius: var(--border-radius-medium); /* Slightly smaller radius */
    text-decoration: none !important; /* Override general link underline for CTAs */
    font-weight: 500;
    font-size: 0.9rem; /* Reduced font size */
    line-height: 1.5; /* Ensure text fits well */
    transition: var(--transition);
    border: 1px solid transparent;
}

.blog-scope .article-content p > a[href^="http"]:not(.app-store-button):not(.play-store-button):hover,
.blog-scope .article-content p > a[href^="mailto"]:hover,
.blog-scope .article-content p > a[href="#"]:not([class*="-button"]):hover {
    background-color: var(--accent-color);
    color: var(--on-primary) !important;
    text-decoration: none !important;
    box-shadow: var(--shadow-sm);
}

/* Specific styling for App Store / Play Store badges if they are links */
.blog-scope .article-content a.app-store-button,
.blog-scope .article-content a.play-store-button {
    padding: 0; /* Remove padding if it's just an image link */
    background-color: transparent;
    border: none;
    display: inline-block; /* Keep them inline */
    vertical-align: middle; /* Align with text if needed */
}
.blog-scope .article-content a.app-store-button img,
.blog-scope .article-content a.play-store-button img {
    height: 40px; /* Adjust size as needed */
    width: auto;
    box-shadow: none; /* Remove shadow from image if link has it */
    border-radius: 0; /* Remove radius from image if link has it */
    margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
}


/* Article Separator HR */
.blog-scope .article-separator {
    border: 0;
    height: 1px;
    background-color: var(--surface-variant);
    margin: var(--spacing-xl) 0 var(--spacing-lg); /* Space around the separator */
}

/* Main Content and Sidebar Layout */
.blog-scope .main-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allow sidebar to wrap on smaller screens */
    gap: var(--spacing-lg); /* Space between main column and sidebar */
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.blog-scope .main-column {
    flex: 1; /* 或者具体的比例 */
    min-width: 0; /* Prevent flex item from overflowing if content is too wide */
}

.blog-scope .sidebar {
    flex-basis: 280px; /* 侧边栏宽度 */
    min-width: 280px; /* Minimum width for the sidebar */
}

.blog-scope .sidebar-widget {
    background-color: var(--surface);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--surface-variant);
}

.blog-scope .sidebar-widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--surface-variant);
}

.blog-scope .recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-scope .recent-posts-list li {
    margin-bottom: var(--spacing-md);
}

.blog-scope .recent-posts-list li:last-child {
    margin-bottom: 0;
}

.blog-scope .recent-posts-list a {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    display: block; /* Make link take full width for easier clicking */
    margin-bottom: var(--spacing-xs);
}

.blog-scope .recent-posts-list a:hover {
    color: var(--primary-color);
}

.blog-scope .recent-post-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
}

/* Responsive adjustments for sidebar */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
    .blog-scope .main-content-wrapper {
        flex-direction: column;
        gap: var(--spacing-md); /* Reduce gap when stacked */
    }
    .blog-scope .main-column {
        width: 100%; /* Ensure main column takes full width when stacked */
        flex-basis: auto; /* Reset flex-basis */
        margin-bottom: 0; /* Remove bottom margin if sidebar stacks below */
    }
    .blog-scope .sidebar {
        width: 100%; /* Ensure sidebar takes full width when stacked */
        min-width: auto; /* Override previous min-width if any */
        flex-basis: auto; /* Reset flex-basis */
    }
}
/* Social Sharing Links */
.blog-scope .social-share {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #eee);
}

.blog-scope .social-share-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color-light, #555);
}

.blog-scope .social-share-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.blog-scope .social-share-list li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--border-radius, 4px);
    text-decoration: none;
    color: var(--primary-color, #007bff);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.blog-scope .social-share-list li a:hover,
.blog-scope .social-share-list li a:focus {
    background-color: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
}
/* Tag Cloud in Sidebar */
.blog-scope .tag-cloud-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Spacing between tags */
}

.blog-scope .tag-cloud-list li {
    margin-bottom: 0.25rem; /* Add a little space if tags wrap to new line */
}

.blog-scope .tag-cloud-tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background-color: var(--tag-bg-color, #f0f0f0);
    color: var(--tag-text-color, #333);
    border-radius: var(--border-radius-small, 3px);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.blog-scope .tag-cloud-tag:hover,
.blog-scope .tag-cloud-tag:focus {
    background-color: var(--primary-color, #007bff);
    color: #fff;
}
