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

:root {
    --bg-primary: #313338;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #1e1f22;
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --discord: #5865F2;
    --accent: #00a8fc;
    --border: #1e1f22;
    --red: #da373c;
    --green: #23a55a;
    --sidebar-width: 280px;
    --topbar-height: 60px;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(49, 51, 56, 0.92);
    z-index: -1;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    display: none;
}

.topbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    gap: 12px;
}

.topbar-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.topbar-btn.discord:hover {
    background: #4752c4;
}

.topbar-btn.home {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 24px 0;
    z-index: 999;
    transition: transform 0.3s;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.sidebar-category {
    margin-bottom: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

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

.category-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.category-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.category-icon.open {
    transform: rotate(90deg);
}

.category-items {
    display: none;
    padding: 4px 0;
}

.category-items.open {
    display: block;
}

.sidebar-item {
    padding: 8px 24px 8px 40px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

a.sidebar-item {
    color: var(--text-secondary);
}

.sidebar-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.sidebar-item .chevron {
    font-size: 10px;
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.2s;
}

.sidebar-item .chevron.open {
    transform: rotate(90deg);
}

.sidebar-item-content {
    display: flex;
    align-items: center;
    flex: 1;
}

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

.sidebar-item.active {
    color: var(--discord);
    background: rgba(88, 101, 242, 0.1);
    border-left-color: var(--discord);
}

.sidebar-subitem {
    padding: 6px 24px 6px 56px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

a.sidebar-subitem {
    color: var(--text-secondary);
}

.sidebar-subitem:hover {
    color: var(--text-primary);
}

.sidebar-subitems {
    display: none;
}

.sidebar-subitems.open {
    display: block;
}

.sidebar-footer {
    margin-top: 32px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.sidebar-footer-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-link:hover {
    color: var(--discord);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 40px;
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--discord);
}

.breadcrumb-separator {
    color: var(--text-secondary);
}

.content h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Author Info */
.author-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 32px;
}

.author-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.author-username {
    font-size: 14px;
    color: var(--discord);
    text-decoration: none;
    transition: opacity 0.2s;
}

.author-username:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.author-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

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

.author-date strong {
    color: var(--text-primary);
}

.content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.content-image-large {
    width: 100%;
    border-radius: 12px;
    margin: 32px 0;
    border: 1px solid var(--border);
}

.content-image-small {
    width: 200px;
    border-radius: 8px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    margin: 24px 0;
    transition: all 0.3s;
}

.btn-full i {
    font-size: 18px;
}

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

.btn-full.discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

.btn-small {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    margin: 8px 8px 8px 0;
    transition: all 0.3s;
}

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

.btn-small.discord:hover {
    background: #4752c4;
}

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

.btn-small.red:hover {
    background: #b72e32;
}

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

.btn-small.green:hover {
    background: #1d8a4a;
}

.content a {
    color: var(--discord);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Code Block */
.code-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-primary);
    overflow-x: auto;
    line-height: 1.6;
}

.code-block code {
    color: var(--accent);
}

/* Comment Box */
.comment-box {
    background: rgba(0, 168, 252, 0.1);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 4px;
}

.comment-box-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-box-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Icon Button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    margin: 8px 8px 8px 0;
}

.btn-icon:hover {
    background: var(--discord);
    border-color: var(--discord);
    color: white;
    transform: translateY(-2px);
}

.btn-icon.red {
    border-color: var(--red);
    color: var(--red);
}

.btn-icon.red:hover {
    background: var(--red);
    color: white;
}

.btn-icon.green {
    border-color: var(--green);
    color: var(--green);
}

.btn-icon.green:hover {
    background: var(--green);
    color: white;
}

/* Quote Block */
.quote-block {
    background: var(--bg-secondary);
    border-left: 4px solid var(--discord);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 4px;
    font-style: italic;
}

.quote-block p {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.7;
}

.quote-author {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: normal;
    font-weight: 600;
}

.related-section {
    margin-top: 80px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.related-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.related-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.related-card:hover {
    border-color: var(--discord);
    transform: translateY(-2px);
}

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

.related-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 24px 16px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .topbar-btn span {
        display: none;
    }

    .content h1 {
        font-size: 28px;
    }

    .related-links {
        grid-template-columns: 1fr;
    }

    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .author-right {
        text-align: left;
    }
}