/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-color: #326ce5;
    --primary-dark: #2558c4;
    --primary-light: #5a8ff0;
    --secondary-color: #1a1a2e;
    --accent-color: #00d4aa;
    
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --header-height: 64px;
}

[data-theme="dark"] {
    --primary-color: #5a8ff0;
    --primary-dark: #326ce5;
    --primary-light: #7aa8f5;
    
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    
    --bg-color: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    
    --border-color: #374151;
    --border-light: #1f2937;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

/* Offset for anchor links to account for fixed header */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
    scroll-margin-top: calc(var(--header-height) + 2rem);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

a:hover {
    color: var(--primary-dark);
}

/* ===== Header ===== */
.site-header {
    background: var(--secondary-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.logo-icon {
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
}

.main-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.main-nav a.active {
    color: white;
    background: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Show moon in light mode (to switch to dark), sun in dark mode (to switch to light) */
.theme-icon-sun {
    display: none;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

[data-theme="dark"] .theme-icon-sun {
    display: block;
}

.search-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Search Overlay ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

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

.search-modal {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: 0 1rem;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-color);
    outline: none;
}

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

.search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.search-close:hover {
    color: var(--text-color);
}

.search-results {
    max-height: calc(70vh - 80px);
    overflow-y: auto;
    padding: 0.5rem;
}

.search-hint,
.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-section {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.search-result-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.2s;
}

/* ===== Main Content ===== */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d4a 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin: -2rem 0 2rem;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-color);
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-color);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* For buttons on dark backgrounds (e.g., hero) that should stay light regardless of theme */
.btn-secondary-dark {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary-dark:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

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

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

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ===== Sections ===== */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-footer {
    text-align: center;
    margin-top: 2.5rem;
}

.section-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.section-cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.section-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    cursor: pointer;
}

.card h3 a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.card .tag,
.card-tags {
    position: relative;
    z-index: 2;
}

.card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-content {
    padding: 1.5rem;
}

.card-content .difficulty {
    margin-bottom: 0.75rem;
}

.card-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card-meta-top .difficulty {
    margin-bottom: 0;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card h3 {
    margin-bottom: 0.75rem;
}

.card h3 a {
    color: var(--text-color);
}

.card h3 a:hover {
    color: var(--primary-color);
}

.card p {
    color: var(--text-muted);
}

.card-tags {
    display: flex;
    gap: 0.5rem;
}

/* ===== Tags ===== */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== Difficulty Badges ===== */
.difficulty {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

[data-theme="dark"] .difficulty-beginner {
    background: #065f46;
    color: #d1fae5;
}

[data-theme="dark"] .difficulty-intermediate {
    background: #92400e;
    color: #fef3c7;
}

[data-theme="dark"] .difficulty-advanced {
    background: #991b1b;
    color: #fee2e2;
}

/* ===== Preview Badge ===== */
.preview-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

/* Preview card overlay */
.card-preview {
    position: relative;
}

.card-preview .card-image img {
    filter: blur(4px);
}

.card-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.guide-card.card-preview .card-preview-overlay {
    position: absolute;
    height: auto;
    top: 1rem;
    right: 1rem;
    left: auto;
    bottom: auto;
    background: none;
}

[data-theme="dark"] .card-image {
    background: #374151;
}

[data-theme="dark"] .article-content img,
[data-theme="dark"] .guide-content img {
    background: #374151;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.duration {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ===== Blog List ===== */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    cursor: pointer;
}

.blog-card h2 a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.blog-card .tag,
.blog-card-tags {
    position: relative;
    z-index: 2;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-card h2 a {
    color: var(--text-color);
}

.blog-card h2 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-card-tags {
    display: flex;
    gap: 0.5rem;
}

/* ===== Guides Grid ===== */
.guides-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

.guide-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.guide-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    cursor: pointer;
}

.guide-card h2 a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.guide-card .topic,
.guide-topics {
    position: relative;
    z-index: 2;
}

.guide-card .card-image {
    height: 140px;
}

.guide-card-content {
    padding: 1.5rem;
}

.guide-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.guide-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.guide-icon {
    position: relative;
    top: -2px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

[data-theme="dark"] .guide-icon {
    background: #374151;
}

.guide-icon-large {
    width: 60px;
    height: 60px;
}

.guide-title-row-large {
    margin-bottom: 1rem;
}

.guide-title-row-large h1 {
    margin-bottom: 0;
}

.guide-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.guide-card h2 a {
    color: var(--text-color);
}

.guide-card h2 a:hover {
    color: var(--primary-color);
}

.guide-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.guide-topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.topic {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

/* ===== Article Styles ===== */
.guide-article {
    padding-bottom: 2rem;
}

.guide-header h1 {
    margin-bottom: 0.75rem;
}

.guide-description {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.article-meta,
.guide-meta-top {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.prerequisites {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
}

.prerequisites h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.prerequisites ul {
    margin-left: 1.25rem;
}

.prerequisites li {
    color: var(--text-muted);
}

/* ===== Guide Layout ===== */
.guide-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.guide-toc {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.guide-toc h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-toc ul {
    list-style: none;
}

.guide-toc li {
    margin-bottom: 0.5rem;
}

.guide-toc a {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.guide-toc a:hover,
.guide-toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* ===== Article Content ===== */
.article-content,
.guide-content {
    max-width: 900px;
    margin: 0 auto;
}

.guide-layout .guide-content {
    max-width: none;
    margin: 0;
    min-width: 0;
}

.article-header,
.guide-header {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.article-content > *,
.guide-content > * {
    margin-bottom: 1.5rem;
}

.article-content h2,
.guide-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.article-content h2:first-child,
.guide-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content h3,
.guide-content h3 {
    margin-top: 2rem;
}

.article-content p,
.guide-content p {
    color: var(--text-color);
}

.article-content ul,
.article-content ol,
.guide-content ul,
.guide-content ol {
    margin-left: 1.5rem;
}

.article-content li,
.guide-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote,
.guide-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin-left: 0;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Callouts (GitHub-style) ===== */
.callout {
    padding: 1rem 1rem 1rem 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    border-radius: var(--radius-md);
}

.callout-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.callout-title svg {
    flex-shrink: 0;
}

.callout-content {
    color: var(--text-color);
}

.callout-content p:last-child {
    margin-bottom: 0;
}

/* Note - Blue */
.callout-note {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.callout-note .callout-title {
    color: #3b82f6;
}

/* Tip - Green */
.callout-tip {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.callout-tip .callout-title {
    color: #10b981;
}

/* Important - Purple */
.callout-important {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

.callout-important .callout-title {
    color: #8b5cf6;
}

/* Warning - Yellow */
.callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.callout-warning .callout-title {
    color: #d97706;
}

[data-theme="dark"] .callout-warning .callout-title {
    color: #fbbf24;
}

/* Caution - Red */
.callout-caution {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.callout-caution .callout-title {
    color: #ef4444;
}

/* ===== Math (KaTeX) ===== */
.katex-display {
    display: block;
    text-align: center;
    margin: 1.5rem 0;
}

.katex-inline {
    display: inline;
}

.article-content code,
.guide-content code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875em;
}

/* Clickable inline code (opt-in via shortcode) */
code.copyable {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.1s ease;
}

code.copyable:hover {
    background: var(--primary-color);
    color: white;
}

code.copyable:active {
    transform: scale(0.95);
}

/* Reference sheet (shortcode) */
/* Reference sheet */
.ref-sheet {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.ref-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24ch, 42ch);
    align-items: center;
    gap: 1rem;
    padding-right: 0.5rem;
}

.ref-item:nth-child(odd) {
    background: var(--bg-tertiary);
}

.ref-item:nth-child(even) {
    background: var(--bg-secondary);
}

.ref-label {
    font-size: 0.9375rem;
    color: var(--text-color);
    padding: 0.875rem 1rem;
}

.ref-item code.copyable {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875rem;
    display: block;
    width: 100%;
    justify-self: stretch;
    background: var(--bg-tertiary);
    color: var(--text-color);
    padding: 0.625rem 1rem;
    margin: 0.5rem 0.5rem 0.5rem 0;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

[data-theme="dark"] .ref-item code.copyable {
    background: var(--secondary-color);
    color: #e5e7eb;
}

.ref-item code.copyable:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-2px);
}

.ref-item code.copyable.copied {
    transform: scale(0.98);
}

.ref-item code.copyable.copied::after {
    content: '✓ Copied';
    margin-left: 0.75rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ref-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .references-list .ref-item {
        grid-template-columns: 1fr;
    }
    
    .ref-label {
        padding-bottom: 0;
    }
    
    .ref-item code.copyable {
        width: auto;
        margin: 0 0.75rem 0.75rem;
        white-space: normal;
        word-break: break-all;
    }
}

/* References page */
.references-list .ref-item {
    grid-template-columns: minmax(0, 1fr) minmax(30ch, 48%);
}

@media (max-width: 768px) {
    .references-list .ref-item {
        grid-template-columns: 1fr;
    }
}

.references-search {
    margin-bottom: 1.5rem;
}

.references-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
}

.references-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(50, 108, 229, 0.1);
}

.references-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reference-card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.reference-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.reference-source {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.reference-source:hover {
    color: var(--primary-color);
}

.reference-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reference-card .ref-sheet {
    margin-bottom: 0;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
}

.article-content pre,
.guide-content pre {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Hugo highlight wrapper */
.highlight {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    position: relative;
}

.highlight pre {
    margin: 0;
    background: #282a36 !important;
    border-radius: var(--radius-md);
}

/* Code Copy Button */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    z-index: 10;
}

.highlight:hover .code-copy-btn,
.article-content pre:hover .code-copy-btn,
.guide-content pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.code-copy-btn.copied {
    color: #50fa7b;
}

.code-copy-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.highlight table {
    margin: 0;
    width: auto;
    border: none;
}

.highlight td {
    padding: 0;
    border: none;
}

.highlight .lntd:first-child {
    width: 10px;
    user-select: none;
}

.highlight .lntd:first-child pre {
    padding-right: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.highlight .lntd:last-child pre {
    padding-left: 0;
}

.article-content pre code,
.guide-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    display: block;
    width: max-content;
    min-width: 100%;
}

.article-content img,
.guide-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.article-content table,
.guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content th,
.article-content td,
.guide-content th,
.guide-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content th,
.guide-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

/* ===== Article Footer ===== */
.article-footer {
    max-width: 900px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-discussion {
    max-width: 900px;
    margin: 0 auto;
}

.prev-next {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.prev-next:hover {
    background: var(--bg-tertiary);
}

.prev-next span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.prev-next strong {
    color: var(--text-color);
}

/* ===== Discussion Styles ===== */
.discussions-page {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.discussions-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.discussions-nav {
    margin-top: 1.5rem;
}

.discussions-nav h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.discussions-nav ul {
    list-style: none;
}

.discussions-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.discussions-nav a:hover,
.discussions-nav a.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.discussions-stats {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.discussions-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
}

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

.discussion-item {
    display: block;
    padding: 1.25rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.discussion-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.discussion-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.discussion-item h3 {
    font-size: 1.125rem;
    color: var(--text-color);
}

.discussion-item-category {
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.discussion-item-excerpt {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.discussion-item-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* ===== Discussion Thread ===== */
.discussion-thread {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

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

.discussion-detail {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.discussion-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.discussion-detail h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.discussion-detail-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.discussion-detail-content {
    line-height: 1.7;
}

.replies-section {
    margin-bottom: 2rem;
}

.replies-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

.reply-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.reply-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reply-item-content {
    color: var(--text-color);
}

.reply-form-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.reply-form-section h3 {
    margin-bottom: 1rem;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(50, 108, 229, 0.15);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.discussion-form {
    padding: 1.5rem;
}

/* ===== Article Discussion Embed ===== */
.article-discussion {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-discussion h2 {
    margin-bottom: 0.5rem;
}

.discussion-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.discussion-auth {
    margin-bottom: 1.5rem;
}

.discussion-auth-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.discussion-auth-card p {
    margin: 0;
    color: var(--text-muted);
}

.discussion-auth-actions {
    display: flex;
    gap: 0.75rem;
}

.discussion-auth-modal .modal-content {
    max-width: 480px;
}

.discussion-auth-error {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(210, 46, 46, 0.12);
    color: #8d1f1f;
    font-size: 0.875rem;
}

.discussion-auth-note {
    margin: -0.5rem 0 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.discussion-auth-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.discussion-auth-switch span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* OAuth Section */
.discussion-oauth-section {
    margin-bottom: 1.5rem;
}

.btn-github {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #24292f;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.btn-github:hover {
    background: #32383f;
    color: white;
}

.btn-github svg {
    flex-shrink: 0;
}

.discussion-oauth-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    gap: 1rem;
}

.discussion-oauth-divider::before,
.discussion-oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.discussion-oauth-divider span {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#discussion-embed {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 200px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
}

.pagination a:hover {
    background: var(--bg-secondary);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Loading State ===== */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 4rem;
    margin-bottom: 2rem;
    align-items: start;
}

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

.footer-brand .logo-icon {
    font-size: 2rem;
}

.footer-logo-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    object-fit: contain;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: inline-block;
    transition: color 0.2s;
}

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

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
    
    .guide-toc {
        position: static;
        margin-bottom: 2rem;
    }
    
    .discussions-page {
        grid-template-columns: 1fr;
    }
    
    .discussions-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
    }
    
    .discussions-sidebar .btn {
        order: 1;
    }
    
    .discussions-nav {
        order: 2;
        margin-top: 0;
    }
    
    .discussions-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .discussions-stats {
        order: 3;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .header-right {
        gap: 0.5rem;
    }
    
    .header-right .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--secondary-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .header-right .main-nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand-header {
        justify-content: center;
    }
    
    .footer-brand p {
        max-width: none;
    }
    
    .guide-nav {
        grid-template-columns: 1fr;
    }
    
    .discussions-toolbar {
        flex-direction: column;
    }

    .discussion-auth-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .discussion-auth-switch {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Discussion Preview (Homepage) ===== */
.discussions-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.discussion-preview-item {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.discussion-preview-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.discussion-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.discussion-preview-category {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-transform: capitalize;
}

.discussion-preview-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.discussion-preview-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.discussion-preview-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.discussion-preview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== Embedded Discussion Styles ===== */
.embed-no-discussion {
    text-align: center;
    padding: 2rem;
}

.embed-no-discussion p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.embed-no-discussion .discussion-auth-actions {
    justify-content: center;
}

.embed-form {
    margin-top: 1rem;
}

.embed-discussion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.embed-discussion-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.embed-replies {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.embed-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.embed-original-post {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.embed-original-post .reply-item-content {
    margin-top: 0.5rem;
}

.embed-reply-form {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.form-group-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.form-group-inline input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

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

.no-replies {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Error & Empty States ===== */
.discussions-empty,
.discussions-error {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.discussions-empty p,
.discussions-error p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.discussions-error button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

/* ===== Stats ===== */
.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item strong {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
