:root {
    --bg: #0f1724;
    --card: #0b1220;
    --muted: #9aa8c0;
    --accent: #6ee7b7;
    --accent2: #60a5fa;
    --glass: rgba(255, 255, 255, 0.03);
}

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

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, #071029 0%, #071a2b 60%);
    color: #e6eef6;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    overflow-y: scroll;
}

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

/* Layout */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex: 1;
}

.left-column {
    width: 280px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 30px 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

/* Beautified Sidebar Navigation */
.left-column h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin: 24px 0 12px 0;
    font-weight: 700;
}

.left-column h3:first-child {
    margin-top: 0;
}

.left-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-column li {
    margin-bottom: 4px;
}

.left-column a {
    text-decoration: none;
    color: #c9d1d9;
    font-weight: 500;
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.left-column a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 18px;
}

.left-column a.active {
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent2);
    border-left-color: var(--accent2);
    font-weight: 600;
}

.right-column {
    flex: 1;
    min-width: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005));
    padding: 40px 50px;
    width: 1200px;
}

/* Responsive */
@media (max-width: 900px) {
    .page-wrapper {
        flex-direction: column;
    }

    .left-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .right-column {
        padding: 30px 20px;
    }
}

/* Header */
header {
    background-color: #1e3a8a;
    color: white;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

header .categories {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

header a {
    color: #e0f2fe;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

header a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(180deg, #0a0f1a, #050810);
    color: var(--muted);
    text-align: center;
    padding: 20px;
    width: 100%;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

footer a {
    color: var(--accent2);
    text-decoration: none;
    margin: 0 12px;
}

footer a:hover {
    color: var(--accent);
}

/* Content Styles */
h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-top: 0;
}

/* Hero Section (Common) */
.hero,
#questions-list>div:first-child {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
}

#questions-list>div:first-child h2 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
    font-weight: 800;
    border: none;
    padding: 0;
}

#questions-list>div:first-child p {
    color: rgba(255, 255, 255, 0.95);
    margin: 8px 0 0 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Accordion */
.accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
}

.accordion-header {
    background: rgba(96, 165, 250, 0.1);
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent2);
    display: flex;
    justify-content: space-between;
}

.accordion-header:hover {
    background: rgba(96, 165, 250, 0.15);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-body {
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #d1d9e0;
    background: rgba(15, 23, 36, 0.5);
}

.accordion-content {
    background: rgba(15, 23, 36, 0.5) !important;
}

/* Formatted Answer Elements */
.accordion-body p {
    margin-bottom: 10px;
}

.accordion-body ul {
    margin-bottom: 10px;
    padding-left: 20px;
}

.accordion-body li {
    margin-bottom: 5px;
}

.code-block {
    background: #020617;
    color: #cfeef0;
    padding: 12px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    margin: 10px 0;
    font-size: 0.85rem;
}

.inline-code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--accent);
}

/* Timeline and Features Grid (Index) */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 2px solid rgba(96, 165, 250, 0.3);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent2);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Guide Content (Guide) */
.content-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-header .icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #04263b;
    font-size: 18px;
}

.content-header h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    border: none;
}

.content-header .meta {
    margin-top: 6px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent2);
    font-weight: 600;
    font-size: 0.75rem;
}

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

.guide-content section {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.guide-content h1 {
    font-size: 2.2rem;
    color: #e6eef6;
    margin-bottom: 25px;
}

.guide-content h2 {
    font-size: 1.6rem;
    color: #e6eef6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.guide-content h3 {
    font-size: 1.3rem;
    color: #e6eef6;
    margin-top: 30px;
    margin-bottom: 15px;
}

.guide-content p {
    margin: 8px 0;
    color: #d1d9e0;
}

.guide-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: #a3a3a3;
}

.guide-content li {
    margin-bottom: 8px;
}

.guide-content pre {
    background: #0d1117;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    margin: 20px 0;
}

.guide-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.guide-content pre code {
    background: none;
    padding: 0;
}

.code-block {
    background: #0d1117;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: var(--accent);
    white-space: pre-wrap;
    margin: 10px 0;
    overflow-x: auto;
}

/* Topic Grid (Go Tutorial) */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.topic-card {
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: #e6eef6;
    display: flex;
    align-items: center;
}

.topic-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.02);
}

.topic-number {
    font-weight: 700;
    color: var(--muted);
    margin-right: 15px;
    font-size: 1.2em;
    min-width: 30px;
}

.topic-title {
    font-weight: 600;
    color: #e6eef6;
}

/* Floating TOC (Guide) */
.toc {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toc h4 {
    margin-top: 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

nav.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav.toc a {
    color: var(--accent2);
    text-decoration: none;
    margin-right: 14px;
    font-weight: 600;
    font-size: 0.85rem;
}

nav.toc a:hover {
    color: var(--accent);
}