/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Dark-themed color scheme matching navbar */
:root {
    --navbar: #1a1a2e;
    --bg-primary: #0f0f1e;
    --bg-secondary: #16162a;
    --bg-tertiary: #1e1e35;
    --bg-card: #252543;
    --text-primary: #e0e0f0;
    --text-secondary: #a8a8c0;
    --text-muted: #7575a0;
    --border: #2a2a45;
    --border-light: #35355a;
    --link: #6b8cff;
    --link-hover: #8fa8ff;
    --discord: #8b9dff;
    --reddit: #ff6b4a;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --accent: #9333ea;
    --accent-light: #a855f7;

    /* Typography system */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --text-h1: 2.75rem;
    --text-h2: 1.875rem;
    --text-h3: 1.25rem;
    --text-h4: 1.1rem;
    --leading-heading: 1.15;
    --leading-body: 1.65;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--leading-body);
    font-size: 16px;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: var(--leading-heading);
}

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

/* Header - Sticky Navbar */
.header {
    background: #1a1a2e !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem 0;
    height: 70px; /* Fixed height for consistency */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.logo-image {
    height: 40px;
    width: auto;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    color: #ffffff;
    border-bottom-color: var(--accent);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.25rem;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
    padding: 0.3rem;
    display: flex;
    align-items: center;
}

.nav-icon:hover {
    transform: scale(1.1);
}

.nav-icon.discord-icon:hover {
    color: #8b9dff;
}

.nav-icon.reddit-icon:hover {
    color: #ff6b4a;
}

/* Auth section - reserve space to prevent layout shift */
#authSection {
    min-width: 80px;
    display: inline-block;
}

.nav-signin {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.nav-signin:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Header Banner - Now below navbar */
.header-banner {
    position: relative;
    width: 100%;
    /* 1024:256 = 4:1 aspect ratio, use padding-bottom trick to maintain it */
    height: 0;
    padding-bottom: 25%; /* 256/1024 = 25% */
    margin-top: 70px; /* Account for fixed navbar height */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.header-banner.has-image {
    background-size: 100% 100% !important;
    background-position: center center !important;
}

.header-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);  /* No tint at all */
    z-index: 1;
    display: none;
}

/* Main Content Area */
.main {
    background: transparent;
    min-height: calc(100vh - 70px);
    padding-top: 2rem;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
}

.sidebar-card {
    background: rgba(37, 37, 67, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sidebar-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    padding: 0.35rem 0;
}

.quick-links a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
}

.quick-links a:hover {
    text-decoration: underline;
}

.quick-links li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.guide-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.guide-badge.new {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.stats {
    font-size: 0.9rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
}

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

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.25rem;
}

.recent-posts a:hover {
    text-decoration: underline;
}

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

/* Main Content */
.content {
    min-width: 0;
}

/* Welcome Section */
.welcome-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
}

.welcome-section h1 {
    font-size: var(--text-h1);
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.intro {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-action:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-action.discord {
    background: #5865f2;
    color: white;
    border-color: #5865f2;
}

.btn-action.discord:hover {
    background: #6b7fcf;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.btn-action.reddit {
    background: #ff4500;
    color: white;
    border-color: #ff4500;
}

.btn-action.reddit:hover {
    background: #ff5722;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

.btn-action.secondary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-action.secondary:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

/* Button click feedback */
.btn-action:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

button:active, .btn-small:active {
    transform: scale(0.97);
}

/* Focus-visible for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Sections */
section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.section-header h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Community News Section */
.news-section {
    margin-bottom: 2rem;
}

.news-section .section-header {
    margin-bottom: 1rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-light);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.news-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.news-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.news-badge.update { background: var(--success); color: #0f0f1e; }
.news-badge.event { background: var(--discord); }
.news-badge.alert { background: var(--danger); }

.news-item h3 {
    font-size: 1rem;
    font-weight: 600;
}

.news-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

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

.news-link {
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.news-link:hover {
    text-decoration: underline;
}

/* Pinned Section */
.pinned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.pinned-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pinned-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.pinned-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pin-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    background: var(--warning);
    color: white;
    border-radius: 2px;
    margin-bottom: 0.75rem;
}
.pin-badge.practice-badge {
    background: #22c55e;
}

.pinned-card h3 {
    font-size: var(--text-h3);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pinned-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Techniques Section */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab.active {
    background: #5865f2;
    color: #ffffff;
    border-color: #5865f2;
}

.techniques-list {
    display: grid;
    gap: 1rem;
}

.technique-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.technique-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.technique-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.technique-header h3 {
    font-size: var(--text-h3);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.difficulty {
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty.beginner {
    background: #e7f5ff;
    color: #1971c2;
}

.difficulty.intermediate {
    background: #fff3cd;
    color: #e67700;
}

.difficulty.advanced {
    background: #ffe3e3;
    color: #c92a2a;
}

.technique-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.read-more {
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

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

.view-all-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--link);
    text-decoration: none;
    font-size: 0.95rem;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Expandable guides */
.techniques-hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.techniques-hidden.expanded {
    max-height: 1200px;
    opacity: 1;
    margin-top: 1rem;
}

.show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.show-more-btn:hover {
    color: var(--text-primary);
    border-color: var(--link);
    background: rgba(107, 140, 255, 0.05);
}

.show-more-btn i {
    transition: transform 0.35s ease;
    font-size: 0.8rem;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Resources Section */
.resource-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.resource-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.resource-tab:hover {
    color: var(--text-primary);
}

.resource-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

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

.resource-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.resource-item h4 {
    font-size: var(--text-h4);
    margin-bottom: 0.25rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.resource-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

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

/* Community Section */
.community-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.community-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.community-card.discord {
    border-top: 3px solid var(--discord);
}

.community-card.reddit {
    border-top: 3px solid var(--reddit);
}

.platform-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.community-card.discord .platform-icon {
    color: var(--discord);
}

.community-card.reddit .platform-icon {
    color: var(--reddit);
}

.community-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.community-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.community-features li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.community-features li::before {
    content: "→";
    position: absolute;
    left: 0;
}

.join-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.join-btn:hover {
    background: var(--bg-tertiary);
}

.community-card.discord .join-btn {
    background: var(--discord);
    color: white;
    border-color: var(--discord);
}

.community-card.reddit .join-btn {
    background: var(--reddit);
    color: white;
    border-color: var(--reddit);
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
}

.faq-section > h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.faq-section > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.0625rem;
    list-style: none;
    position: relative;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    padding: 0 1rem 1rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: rgba(26, 26, 46, 0.85);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--link);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.username-link {
    font-weight: 500;
    cursor: pointer;
}

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

.user-menu a:hover {
    background: var(--bg-tertiary);
}

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

    .sidebar {
        display: none;
    }

    .header {
        height: auto;
        padding: 0.4rem 0;
    }

    .header-content {
        padding: 0 0.5rem;
        height: auto;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .nav {
        flex-wrap: wrap;
        gap: 0.4rem 0.6rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .nav-divider {
        display: none;
    }

    .nav-icon {
        font-size: 0.95rem;
        padding: 0.2rem;
    }

    .nav-signin {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
        margin-left: 0;
    }

    .header-banner {
        height: 200px;  /* Smaller on mobile but still shows more */
        margin-top: 70px; /* Adjust for fixed navbar */
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .welcome-section h1 {
        font-size: 2rem;
        letter-spacing: -0.02em;
    }

    .section-header h2,
    .faq-section > h2 {
        font-size: 1.5rem;
    }

    .community-card h3 {
        font-size: 1.25rem;
    }
}

/* Small mobile - tighter nav */
@media (max-width: 480px) {
    .nav {
        gap: 0.25rem 0.5rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .logo-image {
        height: 32px !important;
    }
}

/* Auth Gate Overlay */
#authGateOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-gate-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.auth-gate-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.auth-gate-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.auth-gate-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.auth-gate-card p {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-gate-btn {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.auth-gate-btn:hover {
    opacity: 0.9;
}

.auth-gate-btn.primary {
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
}

.auth-gate-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.auth-gate-btn.secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.auth-gate-note {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

/* ─── Content Gate (articles & single-page techniques) ─── */

.content-gate {
    position: relative;
    margin-top: -4rem;
    padding-top: 0;
}

.content-gate-fade {
    height: 6rem;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.content-gate-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.content-gate-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.content-gate-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.content-gate-card p {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.content-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.content-gate-btn {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.content-gate-btn:hover { opacity: 0.9; }

.content-gate-btn.primary {
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
}

.content-gate-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.content-gate-btn.secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.content-gate-note {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

/* ─── Book Library Styles (shared) ─── */

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

.book-item {
    width: 90px;
    text-align: center;
    position: relative;
}

.book-cover {
    width: 90px;
    height: 130px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    background: var(--bg-tertiary);
    display: block;
}

.book-cover-placeholder {
    width: 90px;
    height: 130px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.25rem;
    line-height: 1.2;
}

.book-title {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.book-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    display: none;
}

.book-item:hover .book-remove { display: block; }

.book-search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.book-search-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'IBM Plex Sans', sans-serif;
    box-sizing: border-box;
}

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

.book-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 4px 4px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.book-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.book-result-item:hover { background: var(--bg-tertiary); }
.book-result-item:last-child { border-bottom: none; }

.book-result-cover {
    width: 40px;
    height: 58px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.book-result-info { flex: 1; min-width: 0; }

.book-result-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-result-author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.book-category {
    margin-bottom: 1.5rem;
}

.book-category-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.books-loading,
.books-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-family: Georgia, serif;
    font-style: italic;
}

/* ─── Comment Reply Threading ─────────────────────── */
.comment-item.comment-reply {
    margin-left: 2.5rem;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: var(--bg-tertiary);
}

.comment-replying-to {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.comment-replying-to strong {
    color: var(--link);
}

.reply-form {
    margin-top: 0.75rem;
}

.reply-form textarea {
    min-height: 60px;
}

@media (max-width: 600px) {
    .comment-item.comment-reply {
        margin-left: 1.25rem;
    }
}

