/* ============================================
   CSS Variables & Base Styles
   ============================================ */

:root {
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-display: 'Poppins', sans-serif;
    
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --accent-50: #fdf4ff;
    --accent-100: #fae8ff;
    --accent-200: #f5d0fe;
    --accent-300: #f0abfc;
    --accent-400: #e879f9;
    --accent-500: #d946ef;
    --accent-600: #c026d3;
    --accent-700: #a21caf;
    --accent-800: #86198f;
    --accent-900: #701a75;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --bg-light: #ffffff;
    --bg-dark: #111827;
    --text-light: #111827;
    --text-dark: #f9fafb;
}

[data-theme="dark"] {
    --bg-light: #111827;
    --bg-dark: #000000;
    --text-light: #f9fafb;
    --text-dark: #111827;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-light);
}

/* Prevent color transitions during initial page load to avoid flicker */
body:not(.loaded),
body:not(.loaded) * {
    transition: background-color 0s, color 0s, border-color 0s, opacity 0s, visibility 0s !important;
}

body.loaded {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure header and nav are visible from start */
.header,
.nav,
.nav-link,
.nav-icon-btn,
.btn-nav-subscribe,
.btn-nav-signin {
    opacity: 1 !important;
    visibility: visible !important;
}

[data-theme="dark"] body {
    color: var(--text-light);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-light);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   Header & Navigation - Redesigned
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--gray-200);
    /* Prevent flicker during initial load */
    transition: none;
    opacity: 1;
    visibility: visible;
}

/* Enable transitions after page loads */
body.loaded .header {
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background-color: var(--gray-900);
    border-bottom-color: var(--gray-700);
}

.header.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s ease;
}

.logo:hover .logo-text {
    opacity: 0.8;
}

.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-link {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--gray-700);
    position: relative;
    padding: 0.5rem 0;
    transition: none;
    opacity: 1;
}

body.loaded .nav-link {
    transition: color 0.2s ease;
}

[data-theme="dark"] .nav-link {
    color: var(--gray-300);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gray-900);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: var(--gray-100);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: none;
    opacity: 1;
}

body.loaded .nav-icon-btn {
    transition: all 0.2s ease;
}

[data-theme="dark"] .nav-icon-btn {
    color: var(--gray-300);
}

.nav-icon-btn:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

[data-theme="dark"] .nav-icon-btn:hover {
    background-color: var(--gray-800);
    color: var(--gray-100);
}

.btn-nav-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-nav-subscribe {
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.btn-nav-subscribe:hover {
    background-color: var(--gray-50);
    border-color: var(--primary-500);
    color: var(--primary-600);
}

[data-theme="dark"] .btn-nav-subscribe:hover {
    background-color: var(--gray-800);
    border-color: var(--primary-500);
    color: var(--primary-400);
}

.btn-nav-signin {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background-color: var(--gray-900);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-nav-signin {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.btn-nav-signin:hover {
    background-color: var(--gray-800);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-nav-signin:hover {
    background-color: var(--gray-200);
}

@media (max-width: 768px) {
    .btn-nav-subscribe,
    .btn-nav-signin {
        display: none;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--gray-900);
    transition: none;
    border-radius: 2px;
}

body.loaded .nav-toggle span {
    transition: all 0.3s ease;
}

[data-theme="dark"] .nav-toggle span {
    background-color: var(--gray-100);
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }
}

/* Search Bar */
.search-bar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 999;
    opacity: 1;
    visibility: hidden;
    transition: none;
}

body.loaded .search-bar {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

[data-theme="dark"] .search-bar {
    background-color: var(--gray-900);
    border-bottom-color: var(--gray-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-bar.active {
    display: block;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--gray-900);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .search-input {
    border-color: var(--gray-600);
    background-color: var(--gray-800);
    color: var(--gray-100);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-close {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: var(--gray-500);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

[data-theme="dark"] .search-close:hover {
    background-color: var(--gray-700);
    color: var(--gray-100);
}

/* Mobile Menu */
.nav-menu-mobile {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-light);
    z-index: 998;
    transform: translateX(-100%);
    transition: none;
    overflow-y: auto;
    opacity: 1;
    visibility: hidden;
}

body.loaded .nav-menu-mobile {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .nav-menu-mobile {
    background-color: var(--gray-900);
}

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

.mobile-menu-content {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 0;
    font-weight: 500;
    font-size: 1rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    transition: color 0.2s ease;
}

[data-theme="dark"] .mobile-nav-link {
    color: var(--gray-300);
    border-bottom-color: var(--gray-700);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-600);
}

[data-theme="dark"] .mobile-nav-link:hover,
[data-theme="dark"] .mobile-nav-link.active {
    color: var(--primary-400);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

[data-theme="dark"] .mobile-menu-actions {
    border-top-color: var(--gray-700);
}

.btn-mobile-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background-color: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-mobile-subscribe {
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.btn-mobile-subscribe:hover {
    background-color: var(--gray-50);
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.btn-mobile-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    background-color: var(--gray-900);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

[data-theme="dark"] .btn-mobile-signin {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.btn-mobile-signin:hover {
    background-color: var(--gray-800);
}

[data-theme="dark"] .btn-mobile-signin:hover {
    background-color: var(--gray-200);
}

@media (min-width: 1025px) {
    .nav-menu-mobile {
        display: none !important;
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, var(--primary-50), var(--bg-light), var(--accent-50));
    text-align: center;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-900), var(--gray-800));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

[data-theme="dark"] .hero-title {
    color: var(--gray-100);
}

.gradient-text {
    display: block;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .hero-subtitle {
    color: var(--gray-400);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--gray-900);
    color: white;
}

[data-theme="dark"] .btn-primary {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.btn-primary:hover {
    background-color: var(--gray-800);
    transform: scale(1.05);
}

[data-theme="dark"] .btn-primary:hover {
    background-color: var(--gray-200);
}

.btn-outline {
    border-color: var(--gray-900);
    color: var(--gray-900);
    background-color: transparent;
}

[data-theme="dark"] .btn-outline {
    border-color: var(--gray-100);
    color: var(--gray-100);
}

.btn-outline:hover {
    background-color: var(--gray-900);
    color: white;
}

[data-theme="dark"] .btn-outline:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

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

.btn-white:hover {
    background-color: var(--gray-100);
    transform: scale(1.05);
}

/* ============================================
   Sections
   ============================================ */

.featured-section,
.posts-section {
    padding: 80px 0;
}

.featured-section {
    background-color: var(--bg-light);
}

.posts-section {
    background-color: var(--gray-50);
}

[data-theme="dark"] .posts-section {
    background-color: var(--gray-800);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.title-underline {
    width: 96px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    margin-bottom: 1rem;
}

.view-all {
    margin-top: 1rem;
    color: var(--primary-600);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    color: var(--primary-700);
}

/* ============================================
   Featured Post
   ============================================ */

.featured-post {
    background-color: var(--bg-light);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .featured-post {
    background-color: var(--gray-800);
}

.featured-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.featured-post:hover .featured-image img {
    transform: scale(1.1);
}

.featured-content {
    padding: 2rem;
}

.post-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

[data-theme="dark"] .post-category {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.featured-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.featured-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .featured-title a {
    color: var(--gray-100);
}

.featured-title a:hover {
    color: var(--primary-600);
}

.featured-excerpt {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.9375rem;
}

[data-theme="dark"] .featured-excerpt {
    color: var(--gray-400);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

[data-theme="dark"] .post-meta {
    color: var(--gray-400);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-600);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

.read-more svg {
    transition: transform 0.3s ease;
}

.read-more:hover svg {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .featured-post {
        flex-direction: row;
    }
    
    .featured-image {
        width: 50%;
        height: auto;
    }
    
    .featured-content {
        width: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ============================================
   Posts Grid
   ============================================ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background-color: var(--bg-light);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

[data-theme="dark"] .post-card {
    background-color: var(--gray-800);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.post-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

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

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

.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .post-title a {
    color: var(--gray-100);
}

.post-title a:hover {
    color: var(--primary-600);
}

.post-excerpt {
    color: var(--gray-600);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .post-excerpt {
    color: var(--gray-400);
}

.post-content .post-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

[data-theme="dark"] .post-content .post-meta {
    border-top-color: var(--gray-700);
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.cta-text {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ============================================
   Article Page
   ============================================ */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    z-index: 9999;
    transition: width 0.15s ease;
    width: 0%;
}

.article-page {
    padding: 90px 0 80px;
    min-height: 100vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .back-link {
    color: var(--gray-400);
}

.back-link:hover {
    color: var(--gray-900);
}

[data-theme="dark"] .back-link:hover {
    color: var(--gray-100);
}

.article-header {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.article-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-excerpt {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

[data-theme="dark"] .article-excerpt {
    color: var(--gray-400);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--gray-600);
}

[data-theme="dark"] .article-meta {
    color: var(--gray-400);
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .action-btn {
    color: var(--gray-400);
}

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

.article-image {
    max-width: 1000px;
    margin: 0 auto 3rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    height: auto;
}

.article-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--gray-700);
}

[data-theme="dark"] .article-content {
    color: var(--gray-300);
}

.article-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .article-content h2 {
    color: var(--gray-100);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-footer {
    max-width: 700px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

[data-theme="dark"] .article-footer {
    border-top-color: var(--gray-700);
}

.article-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tag {
    padding: 0.5rem 1rem;
    background-color: var(--gray-100);
    color: var(--gray-700);
    border-radius: 9999px;
    font-size: 0.875rem;
}

[data-theme="dark"] .tag {
    background-color: var(--gray-800);
    color: var(--gray-300);
}

.article-actions-bottom {
    display: flex;
    gap: 1rem;
}

.related-articles {
    margin-top: 5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-articles .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.25rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

/* ============================================
   Team Page
   ============================================ */

.team-page,
.articles-page,
.contact-page {
    padding: 90px 0 80px;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.0625rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

[data-theme="dark"] .page-subtitle {
    color: var(--gray-400);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.team-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .team-card {
    background-color: var(--gray-800);
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 128px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-200));
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    transition: transform 0.5s ease;
}

[data-theme="dark"] .team-card::before {
    background: linear-gradient(135deg, var(--primary-900), var(--accent-900));
    opacity: 0.3;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.team-card:hover::before {
    transform: scale(1.5);
}

.team-avatar {
    position: relative;
    width: 96px;
    height: 96px;
    margin-bottom: 1.5rem;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    border: 4px solid var(--gray-100);
    transition: border-color 0.3s ease, transform 0.5s ease;
}

[data-theme="dark"] .team-avatar img {
    border-color: var(--gray-700);
}

.team-card:hover .team-avatar img {
    border-color: var(--primary-300);
    transform: scale(1.1);
}

[data-theme="dark"] .team-card:hover .team-avatar img {
    border-color: var(--primary-700);
}

.avatar-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 50%;
    border: 4px solid var(--bg-light);
}

[data-theme="dark"] .avatar-badge {
    border-color: var(--gray-800);
}

.team-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.team-card:hover .team-name {
    color: var(--primary-600);
}

.team-role {
    color: var(--primary-600);
    font-weight: 500;
    margin-bottom: 1rem;
}

[data-theme="dark"] .team-role {
    color: var(--primary-400);
}

.team-bio {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .team-bio {
    color: var(--gray-400);
}

.team-social {
    display: flex;
    gap: 0.75rem;
}

.team-social .social-link {
    padding: 0.5rem;
    background-color: var(--gray-100);
    border-radius: 0.5rem;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

[data-theme="dark"] .team-social .social-link {
    background-color: var(--gray-700);
    color: var(--gray-400);
}

.team-social .social-link:hover {
    background-color: var(--primary-100);
    color: var(--primary-600);
}

[data-theme="dark"] .team-social .social-link:hover {
    background-color: var(--primary-900);
    color: var(--primary-400);
}

.team-cta {
    max-width: 800px;
    margin: 5rem auto 0;
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    border-radius: 1.5rem;
    text-align: center;
}

[data-theme="dark"] .team-cta {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
}

.team-cta .cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.team-cta .cta-text {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

[data-theme="dark"] .team-cta .cta-text {
    color: var(--gray-400);
}

/* ============================================
   Contact Page
   ============================================ */

.contact-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 2fr 1fr;
    }
}

.contact-form {
    background-color: var(--gray-50);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .contact-form {
    background-color: var(--gray-800);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

[data-theme="dark"] .form-group label {
    color: var(--gray-100);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--gray-900);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    border-color: var(--gray-600);
    background-color: var(--gray-900);
    color: var(--gray-100);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-theme="dark"] .info-card {
    background-color: var(--gray-800);
}

.info-card svg {
    color: var(--primary-600);
}

.info-card h3 {
    font-size: 1.125rem;
    margin: 0;
}

.info-card p {
    color: var(--gray-600);
    margin: 0;
}

[data-theme="dark"] .info-card p {
    color: var(--gray-400);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--gray-800);
}

[data-theme="dark"] .footer {
    background-color: #000000;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 0.5rem;
    background-color: var(--gray-800);
    border-radius: 50%;
    color: var(--gray-300);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .social-link {
    background-color: var(--gray-900);
}

.social-link:hover {
    background-color: var(--gray-700);
    color: white;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-400);
}

.heart {
    color: #ef4444;
}

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Unique Features Styles
   ============================================ */

/* Article Badges */
.article-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.difficulty-easy {
    background-color: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .difficulty-easy {
    background-color: #064e3b;
    color: #6ee7b7;
}

.difficulty-medium {
    background-color: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .difficulty-medium {
    background-color: #78350f;
    color: #fde047;
}

.difficulty-advanced {
    background-color: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .difficulty-advanced {
    background-color: #7f1d1d;
    color: #fca5a5;
}

/* Emoji Reactions */
.emoji-reactions {
    max-width: 700px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    border: 2px solid var(--gray-200);
}

[data-theme="dark"] .emoji-reactions {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.reactions-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--gray-900);
}

[data-theme="dark"] .reactions-title {
    color: var(--gray-100);
}

.reactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .reaction-btn {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.reaction-btn:hover {
    transform: translateY(-4px);
    border-color: var(--primary-500);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.reaction-btn.active {
    border-color: var(--primary-500);
    background-color: var(--primary-50);
}

[data-theme="dark"] .reaction-btn.active {
    background-color: var(--primary-900);
}

.reaction-emoji {
    font-size: 2rem;
    line-height: 1;
}

.reaction-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

[data-theme="dark"] .reaction-label {
    color: var(--gray-300);
}

.reaction-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}

[data-theme="dark"] .reaction-count {
    color: var(--gray-400);
}

/* Collections Page */
.collections-page {
    padding: 90px 0 80px;
    min-height: 100vh;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.collection-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

[data-theme="dark"] .collection-card {
    background-color: var(--gray-800);
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.collection-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.collection-icon {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 1rem;
}

[data-theme="dark"] .collection-icon {
    background: linear-gradient(135deg, var(--primary-900), var(--accent-900));
}

.collection-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.collection-author {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

[data-theme="dark"] .collection-author {
    color: var(--gray-400);
}

.collection-count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

[data-theme="dark"] .collection-count {
    color: var(--gray-500);
}

.collection-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

[data-theme="dark"] .collection-title {
    color: var(--gray-100);
}

.collection-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

[data-theme="dark"] .collection-description {
    color: var(--gray-400);
}

.collection-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--gray-100);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

[data-theme="dark"] .stat-badge {
    background-color: var(--gray-700);
    color: var(--gray-300);
}

.collection-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-600);
    font-weight: 500;
    margin-top: auto;
    transition: gap 0.3s ease;
}

[data-theme="dark"] .collection-link {
    color: var(--primary-400);
}

.collection-link:hover {
    gap: 0.75rem;
}

/* Community Highlights */
.highlights-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

[data-theme="dark"] .highlights-section {
    background-color: var(--gray-900);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-top: 1rem;
}

[data-theme="dark"] .section-subtitle {
    color: var(--gray-400);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.highlight-card {
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    padding: 2rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .highlight-card {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
}

.highlight-card:hover {
    transform: translateY(-4px);
}

.highlight-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--gray-900);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

[data-theme="dark"] .highlight-badge {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.highlight-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .highlight-title {
    color: var(--gray-100);
}

.highlight-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

[data-theme="dark"] .stat-item {
    color: var(--gray-300);
}

/* Save Article Button */
#save-article-btn.active {
    color: var(--primary-600);
}

[data-theme="dark"] #save-article-btn.active {
    color: var(--primary-400);
}

#save-article-btn.active svg {
    fill: currentColor;
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .reactions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Blog Homepage Styles
   ============================================ */

.blog-homepage {
    padding-top: 80px;
}

/* Featured Articles Hero Section - Merinda Style */
.blog-hero-featured {
    padding: 3rem 0 2rem;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .blog-hero-featured {
    background-color: var(--gray-900);
    border-bottom-color: var(--gray-700);
}

.featured-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .featured-hero-grid {
        grid-template-columns: 2fr 1fr;
        gap: 2.5rem;
    }
}

/* Main Featured Article */
.featured-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .featured-main {
        flex-direction: row;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .featured-main {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.featured-main-image {
    width: 100%;
    height: 240px;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--gray-100);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .featured-main-image {
        width: 300px;
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .featured-main-image {
        width: 100%;
        height: 280px;
    }
}

.featured-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-main:hover .featured-main-image img {
    transform: scale(1.05);
}

.featured-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-main-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

[data-theme="dark"] .featured-main-meta {
    color: var(--gray-400);
}

.featured-category {
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

[data-theme="dark"] .featured-category {
    color: var(--primary-400);
}

.featured-date {
    color: var(--gray-500);
}

[data-theme="dark"] .featured-date {
    color: var(--gray-400);
}

.featured-main-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .featured-main-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .featured-main-title {
        font-size: 2rem;
    }
}

.featured-main-title a {
    color: var(--gray-900);
    transition: color 0.2s ease;
    display: block;
}

[data-theme="dark"] .featured-main-title a {
    color: var(--gray-100);
}

.featured-main-title a:hover {
    color: var(--primary-600);
}

.featured-main-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .featured-main-excerpt {
    color: var(--gray-400);
}

.featured-main-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

.featured-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

[data-theme="dark"] .featured-author-avatar {
    border-color: var(--gray-700);
}

.featured-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.featured-author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
}

[data-theme="dark"] .featured-author-name {
    color: var(--gray-100);
}

.featured-read-time {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

[data-theme="dark"] .featured-read-time {
    color: var(--gray-400);
}

/* Side Featured Articles */
.featured-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-side-item {
    display: flex;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.featured-side-item:hover {
    transform: translateX(4px);
}

.featured-side-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: var(--gray-100);
}

[data-theme="dark"] .featured-side-image {
    background-color: var(--gray-800);
}

.featured-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-side-item:hover .featured-side-image img {
    transform: scale(1.1);
}

.featured-side-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.featured-side-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .featured-side-category {
    color: var(--primary-400);
}

.featured-side-title {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.featured-side-title a {
    color: var(--gray-900);
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .featured-side-title a {
    color: var(--gray-100);
}

.featured-side-title a:hover {
    color: var(--primary-600);
}

.featured-side-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: auto;
}

[data-theme="dark"] .featured-side-meta {
    color: var(--gray-400);
}

@media (max-width: 1023px) {
    .featured-hero-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-side {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .featured-side-item {
        flex-direction: column;
    }
    
    .featured-side-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 640px) {
    .blog-hero-featured {
        padding: 2rem 0 1.5rem;
    }
    
    .featured-main {
        flex-direction: column;
    }
    
    .featured-main-image {
        width: 100%;
        height: 200px;
    }
    
    .featured-main-title {
        font-size: 1.375rem;
    }
    
    .featured-side {
        grid-template-columns: 1fr;
    }
}

/* Blog Main Container */
.blog-main-container {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

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

/* Blog Sections */
.blog-section {
    margin-bottom: 4rem;
}

.section-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

[data-theme="dark"] .section-header-inline {
    border-bottom-color: var(--gray-700);
}

.section-title-small {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
}

[data-theme="dark"] .section-title-small {
    color: var(--gray-100);
}

.section-link {
    color: var(--primary-600);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .section-link {
    color: var(--primary-400);
}

.section-link:hover {
    color: var(--primary-700);
}

/* Trending Articles */
.trending-articles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trending-article {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .trending-article {
    background-color: var(--gray-800);
}

.trending-article:hover {
    background-color: var(--gray-100);
    transform: translateX(4px);
}

[data-theme="dark"] .trending-article:hover {
    background-color: var(--gray-700);
}

.trending-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-600);
    line-height: 1;
    min-width: 48px;
}

[data-theme="dark"] .trending-number {
    color: var(--primary-400);
}

.trending-content {
    flex: 1;
}

.trending-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.trending-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .trending-title a {
    color: var(--gray-100);
}

.trending-title a:hover {
    color: var(--primary-600);
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    flex-wrap: wrap;
}

[data-theme="dark"] .trending-meta {
    color: var(--gray-400);
}

.author-link {
    font-weight: 500;
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .author-link {
    color: var(--gray-100);
}

.author-link:hover {
    color: var(--primary-600);
}

.meta-separator {
    color: var(--gray-400);
}

.trending-badge {
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .trending-badge {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-post-card {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .blog-post-card {
    background-color: var(--gray-800);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.75rem 0;
    line-height: 1.4;
}

.blog-post-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .blog-post-title a {
    color: var(--gray-100);
}

.blog-post-title a:hover {
    color: var(--primary-600);
}

.blog-post-excerpt {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

[data-theme="dark"] .blog-post-excerpt {
    color: var(--gray-400);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

[data-theme="dark"] .blog-post-meta {
    border-top-color: var(--gray-700);
}

.author-info-small {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

[data-theme="dark"] .author-info-small {
    color: var(--gray-300);
}

.author-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.read-time {
    font-size: 0.875rem;
    color: var(--gray-500);
}

[data-theme="dark"] .read-time {
    color: var(--gray-400);
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background-color: var(--gray-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .sidebar-widget {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .widget-title {
    color: var(--gray-100);
}

.widget-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

[data-theme="dark"] .widget-description {
    color: var(--gray-400);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--gray-900);
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .newsletter-form input {
    border-color: var(--gray-600);
    background-color: var(--gray-900);
    color: var(--gray-100);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-500);
}

.btn-block {
    width: 100%;
}

/* Topics List */
.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    color: var(--gray-700);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

[data-theme="dark"] .topic-tag {
    background-color: var(--gray-900);
    color: var(--gray-300);
    border-color: var(--gray-700);
}

.topic-tag:hover {
    background-color: var(--primary-100);
    border-color: var(--primary-300);
    color: var(--primary-700);
    transform: translateY(-2px);
}

[data-theme="dark"] .topic-tag:hover {
    background-color: var(--primary-900);
    border-color: var(--primary-700);
    color: var(--primary-300);
}

/* Authors List */
.authors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.author-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.author-item:hover {
    background-color: var(--gray-100);
}

[data-theme="dark"] .author-item:hover {
    background-color: var(--gray-700);
}

.author-name-small {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .author-name-small {
    color: var(--gray-100);
}

.author-bio-small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

[data-theme="dark"] .author-bio-small {
    color: var(--gray-400);
}

/* Collections List */
.collections-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.collection-item:hover {
    background-color: var(--gray-100);
}

[data-theme="dark"] .collection-item:hover {
    background-color: var(--gray-700);
}

.collection-icon-small {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-100);
    border-radius: 0.5rem;
}

[data-theme="dark"] .collection-icon-small {
    background-color: var(--primary-900);
}

.collection-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .collection-name {
    color: var(--gray-100);
}

.collection-count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

[data-theme="dark"] .collection-count {
    color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-article-title {
        font-size: 2rem;
    }
    
    .hero-article-excerpt {
        font-size: 1.125rem;
    }
    
    .hero-article-image {
        height: 300px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .trending-article {
        flex-direction: column;
        gap: 1rem;
    }
    
    .trending-number {
        min-width: auto;
    }
    
    .hero-article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .blog-hero {
        padding: 2rem 0;
    }
    
    .blog-main-container {
        padding: 2rem 0;
    }
}

/* ============================================
   Article Series Styles
   ============================================ */

.article-series {
    max-width: 700px;
    margin: 3rem auto;
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    border: 2px solid var(--primary-200);
}

[data-theme="dark"] .article-series {
    background-color: var(--gray-800);
    border-color: var(--primary-800);
}

.series-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.series-badge {
    padding: 0.5rem 1rem;
    background-color: var(--primary-600);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.series-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--gray-900);
}

[data-theme="dark"] .series-title {
    color: var(--gray-100);
}

.series-progress {
    margin-bottom: 1rem;
}

.series-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .series-progress-bar {
    background-color: var(--gray-700);
}

.series-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transition: width 0.3s ease;
}

.series-progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

[data-theme="dark"] .series-progress-text {
    color: var(--gray-400);
}

.series-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.series-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    color: var(--gray-700);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-300);
}

[data-theme="dark"] .series-nav-link {
    background-color: var(--gray-900);
    color: var(--gray-300);
    border-color: var(--gray-700);
}

.series-nav-link:hover:not([disabled]) {
    background-color: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

[data-theme="dark"] .series-nav-link:hover:not([disabled]) {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.series-nav-link[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.series-parts {
    display: flex;
    gap: 0.5rem;
}

.series-part {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    color: var(--gray-700);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-300);
}

[data-theme="dark"] .series-part {
    background-color: var(--gray-900);
    color: var(--gray-300);
    border-color: var(--gray-700);
}

.series-part:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

[data-theme="dark"] .series-part:hover {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.series-part.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* ============================================
   Reading Ambiance Styles
   ============================================ */

.reading-mode-header {
    position: relative;
}

.reading-mode-header .nav-icon-btn {
    /* Inherit nav-icon-btn styles */
}

.reading-ambiance {
    max-width: 700px;
    margin: 2rem auto;
    position: relative;
}

.ambiance-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .ambiance-toggle {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-300);
}

.ambiance-toggle:hover {
    background-color: var(--gray-200);
    border-color: var(--primary-500);
}

[data-theme="dark"] .ambiance-toggle:hover {
    background-color: var(--gray-700);
}

.reading-mode-header .ambiance-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    margin-top: 0.5rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

[data-theme="dark"] .reading-mode-header .ambiance-panel {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ambiance-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

[data-theme="dark"] .ambiance-panel {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ambiance-panel.active {
    display: block;
}

.ambiance-section {
    margin-bottom: 1.5rem;
}

.ambiance-section:last-child {
    margin-bottom: 0;
}

.ambiance-section h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

[data-theme="dark"] .ambiance-section h4 {
    color: var(--gray-100);
}

.ambiance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ambiance-option {
    padding: 0.5rem 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .ambiance-option {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.ambiance-option:hover,
.ambiance-option.active {
    background-color: var(--primary-100);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

[data-theme="dark"] .ambiance-option:hover,
[data-theme="dark"] .ambiance-option.active {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timer-btn {
    padding: 0.5rem 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .timer-btn {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.timer-btn:hover,
.timer-btn.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.timer-display {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .timer-display {
    background-color: var(--gray-900);
}

#timer-time {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gray-900);
}

[data-theme="dark"] #timer-time {
    color: var(--gray-100);
}

.timer-control {
    padding: 0.5rem 1rem;
    background-color: var(--primary-600);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timer-control:hover {
    background-color: var(--primary-700);
}

.ambiance-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

[data-theme="dark"] .ambiance-checkbox {
    color: var(--gray-300);
}

.ambiance-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   Interactive Elements Styles
   ============================================ */

.interactive-elements {
    max-width: 700px;
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-poll {
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .article-poll {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.poll-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .poll-title {
    color: var(--gray-100);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

[data-theme="dark"] .poll-option {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.poll-option:hover {
    border-color: var(--primary-500);
    background-color: var(--primary-50);
}

[data-theme="dark"] .poll-option:hover {
    background-color: var(--primary-900);
}

.poll-option-text {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-900);
}

[data-theme="dark"] .poll-option-text {
    color: var(--gray-100);
}

.poll-option-bar {
    flex: 2;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

[data-theme="dark"] .poll-option-bar {
    background-color: var(--gray-700);
}

.poll-option-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transition: width 0.3s ease;
}

.poll-option-percent {
    min-width: 45px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

[data-theme="dark"] .poll-option-percent {
    color: var(--gray-300);
}

.article-quiz {
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .article-quiz {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.quiz-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .quiz-title {
    color: var(--gray-100);
}

.quiz-question p {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--gray-700);
    font-weight: 500;
}

[data-theme="dark"] .quiz-question p {
    color: var(--gray-300);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    padding: 0.875rem 1rem;
    background-color: var(--bg-light);
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

[data-theme="dark"] .quiz-option {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.quiz-option:hover {
    border-color: var(--primary-500);
    background-color: var(--primary-50);
}

[data-theme="dark"] .quiz-option:hover {
    background-color: var(--primary-900);
}

.quiz-option.correct {
    border-color: #10b981;
    background-color: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .quiz-option.correct {
    background-color: #064e3b;
    color: #6ee7b7;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background-color: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .quiz-option.incorrect {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    display: none;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

[data-theme="dark"] .quiz-feedback.correct {
    background-color: #064e3b;
    color: #6ee7b7;
    border-color: #10b981;
}

.quiz-feedback.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

[data-theme="dark"] .quiz-feedback.incorrect {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #ef4444;
}

.code-snippet {
    background-color: var(--gray-900);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--gray-800);
}

[data-theme="dark"] .code-snippet {
    background-color: #000000;
    border-color: var(--gray-900);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
}

[data-theme="dark"] .code-header {
    background-color: var(--gray-900);
}

.code-language {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--gray-700);
    color: var(--gray-300);
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-copy-btn:hover {
    background-color: var(--primary-600);
    color: white;
}

.code-copy-btn.copied {
    background-color: #10b981;
    color: white;
}

.code-content {
    padding: 1.25rem;
    margin: 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e5e7eb;
}

.code-content code {
    color: inherit;
}

.expandable-section {
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    overflow: hidden;
}

[data-theme="dark"] .expandable-section {
    border-color: var(--gray-700);
}

.expandable-toggle {
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: var(--gray-50);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .expandable-toggle {
    background-color: var(--gray-800);
    color: var(--gray-100);
}

.expandable-toggle:hover {
    background-color: var(--gray-100);
}

[data-theme="dark"] .expandable-toggle:hover {
    background-color: var(--gray-700);
}

.expandable-toggle svg {
    transition: transform 0.3s ease;
}

.expandable-toggle.active svg {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.25rem;
}

.expandable-content.expanded {
    max-height: 1000px;
    padding: 1.25rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--gray-300);
}

[data-theme="dark"] .expandable-content.expanded {
    background-color: var(--gray-900);
    border-top-color: var(--gray-700);
}

.expandable-content pre {
    margin: 0;
    background-color: var(--gray-900);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

[data-theme="dark"] .expandable-content pre {
    background-color: #000000;
}

.expandable-content code {
    color: #e5e7eb;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* ============================================
   Author Follow Section Styles
   ============================================ */

.author-follow-section {
    max-width: 700px;
    margin: 3rem auto;
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .author-follow-section {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.author-card-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar-mini {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-300);
}

[data-theme="dark"] .author-avatar-mini {
    border-color: var(--gray-700);
}

.author-info-mini {
    flex: 1;
}

.author-name-mini {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

[data-theme="dark"] .author-name-mini {
    color: var(--gray-100);
}

.author-bio-mini {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0;
}

[data-theme="dark"] .author-bio-mini {
    color: var(--gray-400);
}

.follow-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--primary-600);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.follow-btn:hover {
    background-color: var(--primary-700);
    transform: translateY(-1px);
}

.follow-btn.following {
    background-color: var(--gray-600);
}

.follow-btn.following:hover {
    background-color: var(--gray-700);
}

.author-notifications {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-300);
}

[data-theme="dark"] .author-notifications {
    border-top-color: var(--gray-700);
}

.notification-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

[data-theme="dark"] .notification-checkbox {
    color: var(--gray-300);
}

.notification-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   Community Highlights Styles
   ============================================ */

.community-highlights-section {
    padding: 4rem 0;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

[data-theme="dark"] .community-highlights-section {
    background-color: var(--gray-900);
    border-top-color: var(--gray-700);
}

.highlight-badge {
    padding: 0.375rem 0.75rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .highlight-badge {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
}

[data-theme="dark"] .highlight-card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .highlight-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.highlight-card.featured-highlight {
    border: 2px solid var(--primary-500);
    background: linear-gradient(135deg, var(--primary-50), var(--bg-light));
}

[data-theme="dark"] .highlight-card.featured-highlight {
    background: linear-gradient(135deg, var(--primary-900), var(--gray-800));
    border-color: var(--primary-500);
}

.highlight-badge-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--primary-600);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-badge-top.trending {
    background-color: #ef4444;
}

.highlight-badge-top.community {
    background-color: var(--accent-600);
}

.highlight-content {
    margin-top: 2rem;
}

.highlight-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.highlight-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

[data-theme="dark"] .highlight-title a {
    color: var(--gray-100);
}

.highlight-title a:hover {
    color: var(--primary-600);
}

.highlight-excerpt {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
}

[data-theme="dark"] .highlight-excerpt {
    color: var(--gray-400);
}

.highlight-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

[data-theme="dark"] .highlight-stats {
    color: var(--gray-400);
}

.highlight-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ============================================
   Dashboard Page Styles
   ============================================ */

.dashboard-page {
    padding: 90px 0 80px;
    min-height: 100vh;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.streak-card {
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    padding: 2rem;
    border-radius: 1.5rem;
    color: white;
    margin-bottom: 2rem;
}

.streak-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.streak-icon {
    font-size: 2.5rem;
}

.streak-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.streak-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.streak-display {
    text-align: center;
    margin-bottom: 2rem;
}

.streak-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.streak-label {
    font-size: 1rem;
    opacity: 0.9;
}

.streak-calendar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendar-week {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.calendar-day.active {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-600);
}

.calendar-day.today {
    background-color: white;
    color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.stat-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .stat-card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.stat-icon {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 1rem;
    flex-shrink: 0;
}

[data-theme="dark"] .stat-icon {
    background: linear-gradient(135deg, var(--primary-900), var(--accent-900));
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .stat-value {
    color: var(--gray-100);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .stat-label {
    color: var(--gray-400);
}

.stat-change {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat-change.positive {
    color: #10b981;
}

.topics-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topic-name {
    min-width: 100px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-900);
}

[data-theme="dark"] .topic-name {
    color: var(--gray-100);
}

.topic-bar {
    flex: 1;
    height: 24px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

[data-theme="dark"] .topic-bar {
    background-color: var(--gray-700);
}

.topic-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transition: width 0.3s ease;
    border-radius: 9999px;
}

.topic-percent {
    min-width: 45px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

[data-theme="dark"] .topic-percent {
    color: var(--gray-300);
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.goal-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .goal-card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.goal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

[data-theme="dark"] .goal-title {
    color: var(--gray-100);
}

.goal-progress {
    margin-bottom: 1rem;
}

.goal-progress-bar {
    width: 100%;
    height: 12px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .goal-progress-bar {
    background-color: var(--gray-700);
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transition: width 0.3s ease;
    border-radius: 9999px;
}

.goal-progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

[data-theme="dark"] .goal-progress-text {
    color: var(--gray-400);
}

.goal-edit-btn {
    padding: 0.5rem 1rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .goal-edit-btn {
    background-color: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.goal-edit-btn:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

[data-theme="dark"] .goal-edit-btn:hover {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .activity-item {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .activity-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.activity-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    border-radius: 0.5rem;
    flex-shrink: 0;
}

[data-theme="dark"] .activity-icon {
    background-color: var(--gray-700);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .activity-text {
    color: var(--gray-100);
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

[data-theme="dark"] .activity-time {
    color: var(--gray-400);
}

/* Distraction-Free Mode */
body.distraction-free .header,
body.distraction-free .footer,
body.distraction-free .blog-sidebar,
body.distraction-free .daily-knowledge-section,
body.distraction-free .community-highlights-section {
    display: none;
}

body.distraction-free .article-page {
    padding-top: 2rem;
}

body.distraction-free .blog-homepage {
    padding-top: 0;
}

/* Enhanced Difficulty Badges */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.difficulty-easy {
    background-color: #d1fae5;
    color: #065f46;
}

.difficulty-easy::before {
    content: '🟢';
    margin-right: 0.25rem;
}

[data-theme="dark"] .difficulty-easy {
    background-color: #064e3b;
    color: #6ee7b7;
}

.difficulty-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.difficulty-medium::before {
    content: '🟡';
    margin-right: 0.25rem;
}

[data-theme="dark"] .difficulty-medium {
    background-color: #78350f;
    color: #fde047;
}

.difficulty-advanced {
    background-color: #fee2e2;
    color: #991b1b;
}

.difficulty-advanced::before {
    content: '🔴';
    margin-right: 0.25rem;
}

[data-theme="dark"] .difficulty-advanced {
    background-color: #7f1d1d;
    color: #fca5a5;
}

/* ============================================
   Daily Knowledge Section (Tech News & Q&A)
   ============================================ */

.daily-knowledge-section {
    padding: 1.25rem 0;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    border-bottom: 2px solid var(--primary-200);
    margin-top: 0;
    margin-bottom: 2rem;
}

[data-theme="dark"] .daily-knowledge-section {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
    border-top-color: var(--gray-700);
    border-bottom-color: var(--gray-700);
}

.daily-knowledge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .daily-knowledge-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

.daily-news-card,
.daily-qa-card {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .daily-news-card,
[data-theme="dark"] .daily-qa-card {
    background-color: var(--gray-800);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: var(--gray-700);
}

.daily-news-card:hover,
.daily-qa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .daily-news-card:hover,
[data-theme="dark"] .daily-qa-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.daily-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .daily-card-header {
    border-bottom-color: var(--gray-700);
}

.daily-card-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 0.5rem;
    flex-shrink: 0;
}

[data-theme="dark"] .daily-card-icon {
    background: linear-gradient(135deg, var(--primary-900), var(--accent-900));
}

.daily-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    color: var(--gray-900);
    line-height: 1.3;
}

[data-theme="dark"] .daily-card-title {
    color: var(--gray-100);
}

.daily-card-subtitle {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
}

[data-theme="dark"] .daily-card-subtitle {
    color: var(--gray-400);
}

/* Daily News Styles */
.daily-content {
    position: relative;
    min-height: 120px;
    padding: 0 2.5rem;
    margin-bottom: 0.5rem;
}

.news-item {
    display: none;
    animation: fadeIn 0.5s ease;
}

.news-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-date {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .news-date {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.news-headline {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--gray-900);
}

[data-theme="dark"] .news-headline {
    color: var(--gray-100);
}

.news-summary {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .news-summary {
    color: var(--gray-300);
}

.news-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--gray-900);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
    padding: 0;
}

/* Show navigation buttons on card hover */
.daily-news-card:hover .news-nav-btn {
    opacity: 0.9;
    visibility: visible;
}

[data-theme="dark"] .news-nav-btn {
    background-color: var(--gray-100);
    color: var(--gray-900);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.daily-news-card:hover .news-nav-btn:hover {
    background-color: var(--primary-600);
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

[data-theme="dark"] .news-nav-btn:hover {
    background-color: var(--primary-400);
}

#prev-news {
    left: 0;
}

#next-news {
    right: 0;
}

@media (max-width: 768px) {
    .daily-content {
        padding: 0 2rem;
    }
    
    .news-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 1.125rem;
    }
    
    #prev-news {
        left: 0;
    }
    
    #next-news {
        right: 0;
    }
}

/* Q&A Styles */
.qa-content {
    position: relative;
    min-height: 120px;
    padding: 0 2.5rem;
    margin-bottom: 0.5rem;
}

.qa-item {
    display: none;
    animation: fadeIn 0.5s ease;
}

.qa-item.active {
    display: block;
}

.qa-date {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--accent-100);
    color: var(--accent-700);
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .qa-date {
    background-color: var(--accent-900);
    color: var(--accent-300);
}

.question-box {
    margin-bottom: 0.75rem;
}

.qa-question {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--gray-900);
}

[data-theme="dark"] .qa-question {
    color: var(--gray-100);
}

.reveal-btn {
    padding: 0.5rem 1rem;
    background-color: var(--primary-600);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .reveal-btn {
    background-color: var(--primary-500);
}

.reveal-btn:hover {
    background-color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .reveal-btn:hover {
    background-color: var(--primary-400);
}

.reveal-btn.active {
    background-color: var(--gray-600);
}

.reveal-btn.active:hover {
    background-color: var(--gray-700);
}

.answer-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
    padding: 0;
    margin: 0;
}

.answer-box.revealed {
    max-height: 300px;
    padding: 0.875rem;
    margin-top: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-500);
}

[data-theme="dark"] .answer-box.revealed {
    background-color: var(--gray-900);
    border-left-color: var(--primary-400);
}

.qa-answer {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0;
}

[data-theme="dark"] .qa-answer {
    color: var(--gray-300);
}

.qa-answer strong {
    color: var(--primary-700);
    font-weight: 600;
}

[data-theme="dark"] .qa-answer strong {
    color: var(--primary-400);
}

.qa-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--gray-900);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
    padding: 0;
}

/* Show navigation buttons on card hover */
.daily-qa-card:hover .qa-nav-btn {
    opacity: 0.9;
    visibility: visible;
}

[data-theme="dark"] .qa-nav-btn {
    background-color: var(--gray-100);
    color: var(--gray-900);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.daily-qa-card:hover .qa-nav-btn:hover {
    background-color: var(--accent-600);
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(212, 70, 239, 0.4);
}

[data-theme="dark"] .qa-nav-btn:hover {
    background-color: var(--accent-400);
}

#prev-qa {
    left: 0;
}

#next-qa {
    right: 0;
}

@media (max-width: 768px) {
    .qa-content {
        padding: 0 2rem;
    }
    
    .qa-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 1.125rem;
    }
    
    #prev-qa {
        left: 0;
    }
    
    #next-qa {
        right: 0;
    }
    
    .daily-news-card,
    .daily-qa-card {
        padding: 1rem;
    }
    
    .daily-card-title {
        font-size: 0.9375rem;
    }
    
    .news-headline {
        font-size: 0.875rem;
    }
    
    .qa-question {
        font-size: 0.8125rem;
    }
    
    .daily-knowledge-section {
        padding: 1rem 0;
    }
    
    /* Reading Mode Header - Mobile */
    .reading-mode-header .ambiance-panel {
        width: calc(100vw - 2rem);
        right: -1rem;
        max-width: 320px;
    }
}

/* ============================================
   Article Editor Styles
   ============================================ */

.article-editor-container {
    padding-top: 72px;
    min-height: calc(100vh - 72px);
    background-color: var(--bg-light);
}

[data-theme="dark"] .article-editor-container {
    background-color: var(--bg-light);
}

.editor-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 88px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .editor-toolbar {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--gray-300);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-group-right {
    margin-left: auto;
    border-right: none;
    border-left: 1px solid var(--gray-300);
    padding-left: 0.75rem;
    padding-right: 0;
}

[data-theme="dark"] .toolbar-group {
    border-color: var(--gray-700);
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

[data-theme="dark"] .toolbar-btn {
    color: var(--gray-300);
}

.toolbar-btn:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

[data-theme="dark"] .toolbar-btn:hover {
    background-color: var(--gray-700);
    color: var(--gray-100);
}

.toolbar-btn.active {
    background-color: var(--primary-100);
    color: var(--primary-700);
}

[data-theme="dark"] .toolbar-btn.active {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.editor-content {
    background-color: var(--bg-light);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    padding: 2rem;
    min-height: 500px;
}

[data-theme="dark"] .editor-content {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.article-metadata {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-300);
}

[data-theme="dark"] .article-metadata {
    border-color: var(--gray-700);
}

.article-title-input,
.article-subtitle-input,
.article-author-input,
.article-tags-input,
.article-image-input {
    width: 100%;
    border: none;
    background: none;
    font-family: var(--font-serif);
    color: var(--text-light);
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    outline: none;
}

.article-title-input {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.article-subtitle-input {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gray-600);
}

[data-theme="dark"] .article-subtitle-input {
    color: var(--gray-400);
}

.article-author-input,
.article-tags-input,
.article-image-input {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

[data-theme="dark"] .article-author-input,
[data-theme="dark"] .article-tags-input,
[data-theme="dark"] .article-image-input {
    color: var(--gray-400);
}

.article-title-input::placeholder,
.article-subtitle-input::placeholder,
.article-author-input::placeholder,
.article-tags-input::placeholder,
.article-image-input::placeholder {
    color: var(--gray-400);
}

[data-theme="dark"] .article-title-input::placeholder,
[data-theme="dark"] .article-subtitle-input::placeholder,
[data-theme="dark"] .article-author-input::placeholder,
[data-theme="dark"] .article-tags-input::placeholder,
[data-theme="dark"] .article-image-input::placeholder {
    color: var(--gray-600);
}

.editor-area {
    min-height: 400px;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    outline: none;
}

.editor-area:focus {
    outline: none;
}

.editor-area p {
    margin-bottom: 1.5rem;
}

.editor-area h1,
.editor-area h2,
.editor-area h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.editor-area h1 {
    font-size: 2.5rem;
}

.editor-area h2 {
    font-size: 2rem;
}

.editor-area h3 {
    font-size: 1.5rem;
}

.editor-area ul,
.editor-area ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.editor-area li {
    margin-bottom: 0.5rem;
}

.editor-area blockquote {
    border-left: 4px solid var(--primary-500);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray-600);
}

/* ============================================
   DocQStack Writer Enhancements
   ============================================ */

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

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

.editor-sidebar {
    background: var(--bg-light);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 96px;
}

[data-theme="dark"] .editor-sidebar {
    background: var(--gray-900);
    border-color: var(--gray-700);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    margin-bottom: 0.35rem;
}

.sidebar-header p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

[data-theme="dark"] .sidebar-header p {
    color: var(--gray-400);
}

.sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--gray-300);
    background: var(--bg-light);
    color: var(--gray-700);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-toggle span {
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    display: block;
    box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

.meter-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.04));
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .meter-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

.meter-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

.meter-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0.35rem;
}

.meter-tip {
    font-size: 0.85rem;
    color: var(--gray-600);
}

[data-theme="dark"] .meter-tip {
    color: var(--gray-400);
}

.sidebar-callout {
    background: var(--primary-50);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--primary-100);
}

[data-theme="dark"] .sidebar-callout {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--primary-900);
}

.sidebar-callout h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.sidebar-callout ul {
    margin-left: 1rem;
    color: var(--gray-600);
}

[data-theme="dark"] .sidebar-callout ul {
    color: var(--gray-400);
}

.toolbar-card-group {
    position: relative;
}

.toolbar-card-menu {
    position: relative;
}

.card-variant-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    background: var(--bg-light);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    padding: 0.5rem;
    display: none;
    z-index: 200;
}

[data-theme="dark"] .card-variant-menu {
    background: var(--gray-900);
    border-color: var(--gray-700);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-variant-menu.active {
    display: grid;
    gap: 0.25rem;
}

.card-variant-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-align: left;
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
}

.card-variant-btn:hover {
    background: var(--gray-100);
}

[data-theme="dark"] .card-variant-btn {
    color: var(--gray-300);
}

[data-theme="dark"] .card-variant-btn:hover {
    background: var(--gray-800);
}

.toolbar-btn-action {
    background: var(--gray-100);
    color: var(--gray-800);
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
}

.toolbar-btn-action:hover {
    background: var(--gray-200);
}

[data-theme="dark"] .toolbar-btn-action {
    background: var(--gray-800);
    color: var(--gray-200);
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
}

.toolbar-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
}

.narrative-card {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.04));
    position: relative;
}

.narrative-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-500), var(--primary-300));
    border-radius: 0.75rem 0 0 0.75rem;
}

.narrative-card .card-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-700);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.narrative-card .card-body {
    font-size: 1rem;
    color: var(--text-light);
}

[data-theme="dark"] .narrative-card {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .narrative-card .card-header {
    color: var(--primary-300);
}

.narrative-card[data-variant="warning"] {
    border-color: rgba(248, 113, 113, 0.35);
}

.narrative-card[data-variant="warning"]::before {
    background: linear-gradient(180deg, #f43f5e, #f97316);
}

.narrative-card[data-variant="example"]::before {
    background: linear-gradient(180deg, #10b981, #22c55e);
}

.narrative-card[data-variant="checklist"]::before {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}

.narrative-card-preview {
    margin: 1.5rem 0;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10000;
}

.toast {
    background: var(--gray-900);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .editor-layout {
        grid-template-columns: 1fr;
        padding-bottom: 6rem;
    }

    .editor-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        border-radius: 1.25rem 1.25rem 0 0;
        transform: translateY(70%);
        transition: transform 0.3s ease;
        padding-bottom: 2.5rem;
        z-index: 300;
    }

    .editor-sidebar.open {
        transform: translateY(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .toast-container {
        right: 1rem;
        left: 1rem;
        align-items: center;
    }
}

/* ============================================
   Block Editor Styles (DocQStack)
   ============================================ */

.block-editor-container {
    background: var(--bg-light);
}

[data-theme="dark"] .block-editor-container {
    background: var(--bg-light);
}

.block-editor-container .editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
    padding: 2.5rem 0 4rem;
}

.editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .editor-topbar {
    background: var(--gray-900);
    border-color: var(--gray-700);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.topbar-left h2 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.topbar-left p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

[data-theme="dark"] .topbar-left p {
    color: var(--gray-400);
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.topbar-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.topbar-group {
    display: inline-flex;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.25rem;
}

[data-theme="dark"] .topbar-group {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

.topbar-btn {
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    box-shadow: none;
}

.topbar-group-icons {
    padding: 0.2rem;
}

.topbar-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.topbar-icon-btn svg {
    display: block;
}

.topbar-btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
}

.topbar-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
}

.block-editor {
    background: var(--bg-light);
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 2rem;
}

[data-theme="dark"] .block-editor {
    background: var(--gray-900);
    border-color: var(--gray-700);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.editor-canvas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 320px;
}

#block-editor-root {
    width: 100%;
}

.block {
    position: relative;
    padding: 1.25rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.block:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.block.is-active {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.15);
}

.block-toolbar {
    position: absolute;
    top: -14px;
    right: 12px;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: var(--bg-light);
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.block:hover .block-toolbar,
.block.is-active .block-toolbar {
    opacity: 1;
    pointer-events: auto;
}

[data-theme="dark"] .block-toolbar {
    background: var(--gray-900);
    border-color: var(--gray-700);
}

.block-action {
    border: none;
    background: transparent;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-600);
    cursor: pointer;
}

.block-action:hover {
    color: var(--primary-600);
}

.block-body h1,
.block-body h2,
.block-body h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin: 0;
}

.block-title {
    font-size: 2.75rem;
    color: var(--text-light);
}

.block-subtitle {
    font-size: 1.5rem;
    color: var(--gray-600);
}

.block-heading {
    font-size: 2rem;
    color: var(--text-light);
}

.block-paragraph {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text-light);
}

.editor-error {
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.block-paragraph:empty::before,
.block-title:empty::before,
.block-subtitle:empty::before {
    content: attr(data-placeholder);
    color: var(--gray-400);
}

.block-list {
    margin-left: 1.5rem;
}

.block-list li {
    margin-bottom: 0.5rem;
}

.block-quote blockquote {
    border-left: 4px solid var(--primary-500);
    padding-left: 1rem;
    font-style: italic;
    margin: 0;
}

.quote-citation {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.quote-citation:empty::before {
    content: attr(data-placeholder);
    color: var(--gray-400);
}

.block-code textarea {
    width: 100%;
    min-height: 160px;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    padding: 1rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: var(--gray-900);
    color: #fff;
}

.block-image img {
    width: 100%;
    border-radius: 0.75rem;
}

.block-image img.image-inline {
    max-width: 380px;
}

.block-image img.image-full {
    width: 100%;
}

.image-placeholder {
    border: 1px dashed var(--gray-300);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
}

.image-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.image-caption:empty::before {
    content: attr(data-placeholder);
    color: var(--gray-400);
}

.block-divider {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1rem 0;
}

.block-callout {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.callout-checklist {
    display: grid;
    gap: 0.5rem;
}

.checklist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-row span[contenteditable="true"] {
    flex: 1;
    outline: none;
}

.checklist-add {
    margin-top: 0.5rem;
    width: max-content;
}

.block-callout.variant-warning {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
}

.block-callout.variant-example {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.block-callout.variant-checklist {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.block-embed input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.embed-preview iframe {
    width: 100%;
    height: 260px;
    border-radius: 0.75rem;
    border: none;
}

.embed-link-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    background: var(--bg-light);
    text-decoration: none;
    color: inherit;
}

.embed-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

.embed-url {
    font-size: 0.85rem;
    color: var(--primary-600);
    word-break: break-all;
}

.block-insert {
    display: flex;
    justify-content: center;
    margin: 0.25rem 0 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.block:hover + .block-insert,
.block-insert:hover {
    opacity: 1;
}

.insert-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    background: var(--bg-light);
    color: var(--gray-500);
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.insert-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.floating-menu {
    position: absolute;
    background: var(--bg-light);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    padding: 0.5rem;
    display: none;
    z-index: 4000;
}

.floating-menu.active {
    display: grid;
    gap: 0.25rem;
}

.menu-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.menu-item:hover,
.menu-item.active {
    background: var(--gray-100);
}

.panels-open .editor-sidebar {
    transform: translateY(0);
}

.sidebar-fab,
#panels-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    background: var(--primary-500);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    z-index: 5000;
}

@media (max-width: 980px) {
    #panels-btn {
        display: inline-flex;
    }
}

.menu-item-secondary {
    border-top: 1px solid var(--gray-200);
    margin-top: 0.25rem;
}

.sidebar-section {
    margin-top: 1.5rem;
}

.block-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.palette-btn {
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}

.palette-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.palette-btn-secondary {
    background: var(--primary-50);
    border-color: var(--primary-100);
}

.sidebar-muted {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    font-size: 0.85rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-toggle {
    background: var(--gray-100);
    border: none;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.meta-fields.collapsed {
    display: none;
}

.meta-fields label,
.setting-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--gray-600);
}

.meta-fields input,
.meta-fields select,
.setting-field input,
.setting-field select {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
}

.block-settings {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.format-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.format-btn {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.35rem 0.6rem;
    background: var(--bg-light);
    font-size: 0.8rem;
    cursor: pointer;
}

.writer-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.toggle-pill {
    border: 1px solid var(--gray-200);
    background: var(--bg-light);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.toggle-pill.active {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
}

.ambiance-presets,
.timer-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.preset-btn {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 0.8rem;
}

.preset-btn.active {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.slider-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.focus-timer {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.writer-ambiance-controls {
    margin-bottom: 1rem;
}

.timer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.timer-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.outline-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.35rem;
}

.outline-item {
    font-size: 0.85rem;
    color: var(--gray-600);
    cursor: pointer;
}

.outline-item.active {
    color: var(--primary-600);
    font-weight: 600;
}

.outline-item.level-2 {
    padding-left: 0.75rem;
}

.outline-item.level-3 {
    padding-left: 1.5rem;
}

.outline-tip {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.collections-picker {
    display: grid;
    gap: 0.5rem;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.collection-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.collection-create {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.goal-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.goal-progress .progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 999px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.goal-progress .progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    width: 0%;
}

.goal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.streak-days {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.streak-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--gray-200);
}

.streak-dot.met {
    background: var(--primary-500);
}

.streak-dot.touched {
    background: var(--gray-400);
}

.template-list {
    display: grid;
    gap: 0.5rem;
}

.template-list.collapsed {
    display: none;
}

.template-btn {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    font-size: 0.85rem;
    text-align: left;
}

.integrity-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.integrity-status.is-error {
    color: #ef4444;
}

.integrity-list {
    display: grid;
    gap: 0.4rem;
}

.integrity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    background: var(--gray-50);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.integrity-row.error {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.integrity-row.warning {
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.integrity-action {
    border: none;
    background: transparent;
    color: var(--primary-600);
    cursor: pointer;
}

.history-list {
    display: grid;
    gap: 0.5rem;
}

.history-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    background: var(--gray-50);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.history-restore {
    border: none;
    background: transparent;
    color: var(--primary-600);
    cursor: pointer;
}

.block-warning {
    border-color: rgba(239, 68, 68, 0.3);
}

.block-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
}

.block-highlight {
    box-shadow: 0 0 0 2px var(--primary-500);
}

.author-preview {
    display: grid;
    gap: 1.5rem;
}

.author-preview-issues ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.author-issue-badge {
    margin-left: 0.5rem;
    font-size: 0.65rem;
    color: #ef4444;
}

.author-block.has-issue {
    border-color: rgba(239, 68, 68, 0.3);
}

.author-preview-issues ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.author-preview-issues li.error {
    color: #ef4444;
}

.author-preview-issues li.warning {
    color: #f59e0b;
}

.author-block {
    border: 1px dashed var(--gray-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    position: relative;
}

.block-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--bg-light);
    padding: 0 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
}

.sidebar-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: var(--primary-500);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    z-index: 5000;
}

.sidebar-fab.active {
    display: inline-flex;
}

.zen-mode .editor-sidebar {
    display: none;
}

.zen-mode .editor-layout {
    grid-template-columns: 1fr;
}

.zen-mode .block-editor {
    max-width: 980px;
    margin: 0 auto;
}

.zen-mode .block-paragraph {
    font-size: 1.25rem;
}

.zen-mode .nav-links-desktop,
.zen-mode .nav-right,
.zen-mode .nav-menu-mobile,
.zen-mode .search-bar {
    display: none;
}

.zen-mode .header {
    padding: 0.5rem 0;
    box-shadow: none;
}

.settings-panel {
    display: grid;
    gap: 0.75rem;
}

.publish-actions {
    display: grid;
    gap: 0.5rem;
}

.preview-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.preview-subtitle {
    color: var(--gray-600);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.preview-meta {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.preview-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.preview-callout {
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(59, 130, 246, 0.08);
}

.preview-callout.variant-warning {
    background: rgba(248, 113, 113, 0.1);
}

.preview-image.full img {
    width: 100%;
}

.preview-image.inline img {
    max-width: 360px;
}

@media (max-width: 980px) {
    .block-editor-container .editor-layout {
        grid-template-columns: 1fr;
    }

    .block-editor {
        padding: 1.5rem;
    }

    .editor-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .editor-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        transform: translateY(70%);
        border-radius: 1.5rem 1.5rem 0 0;
        z-index: 300;
    }
}

[data-theme="dark"] .editor-area blockquote {
    color: var(--gray-400);
    border-color: var(--primary-400);
}

.editor-area pre {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

[data-theme="dark"] .editor-area pre {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.editor-area code {
    background-color: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

[data-theme="dark"] .editor-area code {
    background-color: var(--gray-900);
}

.editor-area img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-300);
}

[data-theme="dark"] .editor-actions {
    border-color: var(--gray-700);
}

.btn-editor {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-900);
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--gray-700);
    color: var(--gray-100);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--gray-600);
}

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

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

.btn-success {
    background-color: var(--accent-600);
    color: white;
}

.btn-success:hover {
    background-color: var(--accent-700);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-large {
    max-width: 900px;
}

[data-theme="dark"] .modal-content {
    background-color: var(--gray-800);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-300);
}

[data-theme="dark"] .modal-header {
    border-color: var(--gray-700);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

[data-theme="dark"] .modal-close {
    color: var(--gray-400);
}

[data-theme="dark"] .modal-close:hover {
    background-color: var(--gray-700);
    color: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

#json-output {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: var(--gray-50);
    color: var(--gray-900);
    resize: vertical;
}

[data-theme="dark"] #json-output {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
    color: var(--gray-100);
}

#copy-json-btn {
    margin-top: 1rem;
    width: 100%;
}

#preview-content {
    font-family: var(--font-sans);
    line-height: 1.8;
}

#preview-content h1,
#preview-content h2,
#preview-content h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#preview-content h1 {
    font-size: 2.5rem;
}

#preview-content h2 {
    font-size: 2rem;
}

#preview-content h3 {
    font-size: 1.5rem;
}

#preview-content p {
    margin-bottom: 1.5rem;
}

#preview-content ul,
#preview-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

#preview-content blockquote {
    border-left: 4px solid var(--primary-500);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray-600);
}

[data-theme="dark"] #preview-content blockquote {
    color: var(--gray-400);
}

#preview-content pre {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
}

[data-theme="dark"] #preview-content pre {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

#preview-content code {
    background-color: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

[data-theme="dark"] #preview-content code {
    background-color: var(--gray-900);
}

#preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .editor-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .editor-toolbar {
        top: 72px;
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .toolbar-group {
        padding-right: 0.5rem;
    }
    
    .toolbar-group-right {
        padding-left: 0.5rem;
    }
    
    .editor-content {
        padding: 1rem;
    }
    
    .article-title-input {
        font-size: 2rem;
    }
    
    .article-subtitle-input {
        font-size: 1.25rem;
    }
    
    .editor-actions {
        flex-direction: column;
    }
    
    .btn-editor {
        width: 100%;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
    }
}

/* ============================================
   Learning Blocks Styles
   ============================================ */

.learning-block {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--gray-50);
    border-left: 4px solid var(--primary-500);
}

[data-theme="dark"] .learning-block {
    background: var(--gray-800);
}

.tldr-block {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

[data-theme="dark"] .tldr-block {
    background: rgba(245, 158, 11, 0.1);
}

.tldr-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tldr-icon {
    font-size: 1.5rem;
}

.tldr-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.tldr-content {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.takeaways-block {
    background: #d1fae5;
    border-left-color: #10b981;
}

[data-theme="dark"] .takeaways-block {
    background: rgba(16, 185, 129, 0.1);
}

.takeaways-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.takeaways-icon {
    font-size: 1.5rem;
}

.takeaways-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.takeaway-item input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.concept-card {
    background: #e0f2fe;
    border-left-color: #0284c7;
}

[data-theme="dark"] .concept-card {
    background: rgba(2, 132, 199, 0.1);
}

.concept-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.concept-icon {
    font-size: 1.5rem;
}

.concept-term {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--gray-900);
}

.concept-definition {
    margin: 1rem 0;
    line-height: 1.6;
}

.concept-example {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-style: italic;
}

.concept-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
}

.practice-block {
    background: #fce7f3;
    border-left-color: #ec4899;
}

[data-theme="dark"] .practice-block {
    background: rgba(236, 72, 153, 0.1);
}

.practice-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.practice-icon {
    font-size: 1.5rem;
}

.practice-prompt {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.practice-answer {
    margin-top: 1rem;
}

.practice-answer summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-600);
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.practice-answer summary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.practice-answer-content {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    line-height: 1.6;
}

.quiz-block {
    background: #ede9fe;
    border-left-color: #8b5cf6;
}

[data-theme="dark"] .quiz-block {
    background: rgba(139, 92, 246, 0.1);
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quiz-icon {
    font-size: 1.5rem;
}

.quiz-question {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.quiz-question:last-child {
    border-bottom: none;
}

.quiz-question-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.quiz-option.correct {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.quiz-option.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.quiz-feedback.correct {
    background: #d1fae5;
    color: #065f46;
}

.quiz-feedback.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Annotations & Highlights
   ============================================ */

.annotation-mode {
    cursor: text;
}

.text-highlight {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.text-highlight:hover {
    background: #fde68a;
}

.highlight-private {
    background: #fef3c7;
}

.highlight-shared {
    background: #dbeafe;
}

.highlight-public {
    background: #fce7f3;
}

.annotation-popup {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
}

.annotation-popup-content {
    padding: 1rem;
}

.annotation-selected-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.annotation-note-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.annotation-privacy {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.annotation-privacy label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.annotation-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.annotation-tooltip {
    background: var(--gray-900);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Audience Level Toggle
   ============================================ */

.audience-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 6px;
    margin-bottom: 2rem;
}

.audience-toggle button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.audience-toggle button.active {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   Pathway Navigation
   ============================================ */

.pathway-navigation {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.pathway-progress {
    margin-bottom: 1.5rem;
}

.pathway-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pathway-progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.pathway-progress-fill {
    height: 100%;
    background: var(--primary-500);
    transition: width 0.3s;
}

.pathway-progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.pathway-articles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pathway-article-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}

.pathway-article-item.completed {
    border-color: #10b981;
    background: #d1fae5;
}

.pathway-article-item.current {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.pathway-article-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

.pathway-article-item.completed .pathway-article-number {
    background: #10b981;
    color: white;
}

.pathway-article-item.current .pathway-article-number {
    background: var(--primary-500);
    color: white;
}

.pathway-article-content {
    flex: 1;
}

.pathway-article-status {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.pathway-article-link {
    display: block;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.pathway-prerequisites {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-style: italic;
}

/* ============================================
   Citations Display
   ============================================ */

.article-citations {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

.article-citations h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.citations-list {
    list-style: decimal;
    padding-left: 2rem;
}

.citation-reference {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.citation-reference a {
    color: var(--primary-600);
    text-decoration: none;
}

.citation-reference a:hover {
    text-decoration: underline;
}
