/* Simple, clean, community-focused design */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #767676;
    --border: #e0e0e0;
    --link: #0066cc;
    --link-hover: #0052a3;
    --discord: #5865F2;
    --reddit: #FF4500;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

.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: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

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

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

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #ffffff;
}

.discord-link {
    color: #8b9dff !important; /* Lighter Discord color for dark background */
}

.reddit-link {
    color: #ff6b4a !important; /* Lighter Reddit color for dark background */
}

/* Header Banner - Now below navbar */
.header-banner {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 70px; /* Account for fixed navbar height */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
}

.header-banner.has-image {
    /* Background image set via JavaScript */
    background-size: cover !important;
    background-position: 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;
}


/* 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;
}

.sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.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;
}

.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-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.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-primary);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.btn-action:first-child {
    background: var(--discord);
    color: white;
    border-color: var(--discord);
}

.btn-action:first-child:hover {
    background: #4752c4;
}

.btn-action.secondary {
    background: transparent;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.pinned-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem;
    position: relative;
}

.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;
}

.pinned-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.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;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

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

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

.technique-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem;
}

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

.technique-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.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;
}

/* 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-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem;
}

.resource-item h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.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-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}

.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.25rem;
    margin-bottom: 0.5rem;
}

.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-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    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: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    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;
    }

    .nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-content {
        padding: 0 0.5rem;
        height: 50px;
    }

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

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

    .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;
    }
}