:root {
    --bg-primary: #0f0e1a;
    --bg-secondary: #181626;
    --bg-panel: #12101f;
    --bg-code: #0a0914;
    --bg-hover: rgba(255,255,255,0.04);
    --text-main: #e2dff0;
    --text-sub: #9a94b0;
    --text-dim: rgba(255,255,255,0.25);
    --text-head: #f0edff;
    --accent: #a78bfa;
    --accent-soft: rgba(167,139,250,0.12);
    --accent-hover: #c4b5fd;
    --accent-glow: rgba(167,139,250,0.15);
    --border: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.03);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --base: 16px;
    --line: 1.65;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --content-max: 56rem;
    --container-max: 80rem;
    --sidebar-width-left: 280px;
    --sidebar-width-right: 220px;
    --sidebar-offset: 20px;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: var(--base);
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: var(--bg-primary);
    line-height: var(--line);
    -webkit-font-smoothing: antialiased;
    padding-top: 76px;
    min-height: 100vh;
    padding-left: calc(var(--sidebar-width-left) + var(--sidebar-offset) * 2);
    padding-right: calc(var(--sidebar-width-right) + var(--sidebar-offset) * 2);
}
::selection {
    background: var(--accent-glow);
    color: #fff;
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,0.25);
    border-radius: 3px;
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-hover);
}
a:focus,
a:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 {
    color: var(--text-head);
    font-weight: 500;
    line-height: 1.3;
    margin-top: 1.6em;
    margin-bottom: 0.7rem;
}
h1 {
    font-size: 2.2rem;
    font-weight: 600;
}
h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
h3 {
    font-size: 1.1rem;
}
p {
    margin-bottom: 1rem;
}
strong {
    color: #f0edff;
}
code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    padding: 0.15em 0.4em;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: #cbc3e0;
    word-break: break-all;
}
pre {
    background: var(--bg-code);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    margin: 1.5rem 0;
}
pre code {
    background: none;
    border: none;
    padding: 0;
}
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(167,139,250,0.2), transparent);
    margin: 2rem 0;
}
ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
li {
    margin-bottom: 0.25rem;
}
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    height: 76px;
}
.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
}
.logo {
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-head);
    white-space: nowrap;
}
.logo:hover {
    color: var(--accent);
}
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
}
.nav-link {
    display: block;
    padding: 8px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-sub);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--text-head);
    background: var(--bg-hover);
}
.nav-link.highlight {
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(167,139,250,0.15);
}
.nav-link.highlight:hover {
    background: rgba(167,139,250,0.2);
}
.sidebar-panel {
    position: fixed;
    top: calc(76px + var(--sidebar-offset));
    left: var(--sidebar-offset);
    bottom: var(--sidebar-offset);
    width: var(--sidebar-width-left);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.sidebar-panel::-webkit-scrollbar {
    width: 4px;
}
.sidebar-panel::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-panel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
.sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
.sidebar-panel .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-panel .sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-head);
}
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-nav > ul > li {
    margin-bottom: 0.3rem;
}
.sidebar-nav .nav-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: var(--text-sub);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    user-select: none;
}
.sidebar-nav .nav-label:hover {
    color: var(--text-head);
    background: var(--bg-hover);
}
.sidebar-nav .nav-label .chevron-icon {
    display: inline-block;
    font-size: 0.8rem;
    transition: transform 0.2s;
    opacity: 0.6;
    margin-left: 8px;
}
.sidebar-nav a.nav-label {
    text-decoration: none;
}
.sidebar-nav .sub-toggle {
    display: none;
}
.sidebar-nav .dropdown {
    display: none;
    padding-left: 0.5rem;
    margin-top: 0.2rem;
}
.sidebar-nav .dropdown li {
    list-style: none;
    margin: 0;
}
.sidebar-nav .dropdown a {
    display: block;
    padding: 6px 12px 6px 24px;
    font-size: 0.85rem;
    color: var(--text-sub);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.sidebar-nav .dropdown a:hover {
    color: var(--text-head);
    background: var(--bg-hover);
}
.sidebar-nav .sub-toggle:checked + .nav-label + .dropdown,
.sidebar-nav .sub-toggle:checked ~ .dropdown {
    display: block;
}
.sidebar-nav .sub-toggle:checked + .nav-label {
    color: var(--text-head);
    background: var(--bg-hover);
}
.sidebar-nav .sub-toggle:checked + .nav-label .chevron-icon {
    transform: rotate(180deg);
}
.sidebar-nav .sub-label .chevron-icon {
    font-size: 0.7rem;
}
.sidebar-nav .sub-toggle:checked + .sub-label {
    color: var(--text-head);
    background: var(--bg-hover);
}
.sidebar-nav .sub-toggle:checked + .sub-label .chevron-icon {
    transform: rotate(180deg);
}
.reference-sidebar {
    position: fixed;
    top: calc(76px + var(--sidebar-offset));
    right: var(--sidebar-offset);
    bottom: var(--sidebar-offset);
    width: var(--sidebar-width-right);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}
.reference-sidebar::-webkit-scrollbar {
    width: 4px;
}
.reference-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.reference-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
.reference-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
.reference-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.reference-sidebar-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}
.reference-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.reference-sidebar nav ul li {
    margin-bottom: 0.3rem;
}
.reference-sidebar nav a {
    display: block;
    padding: 6px 8px;
    font-size: 0.85rem;
    color: var(--text-sub);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 10px;
}
.reference-sidebar nav a:hover {
    color: var(--text-head);
    background: var(--bg-hover);
    border-left-color: var(--accent);
}
.content-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.main-area {
    flex: 1;
    max-width: var(--content-max);
    padding: 2rem 1.5rem 3rem;
}
.guide-article {
    max-width: var(--content-max);
}
.hero-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(145deg, #12101f, #1a182e);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
}
.hero-text {
    flex: 1;
}
.hero-text h1 {
    margin-top: 0;
    border-bottom: none;
    font-size: 2.4rem;
}
.hero-text p {
    font-size: 1.1rem;
    color: var(--text-sub);
}
.hero-image {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.hero-image img {
    max-width: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}
.hero-image .hero-gif {
    max-width: 220px;
    border-radius: var(--radius-md);
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}
.badge {
    display: inline-block;
    background: var(--bg-hover);
    color: var(--text-sub);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}
.badge.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.badge.primary:hover {
    background: var(--accent-hover);
}
.badge:hover {
    background: var(--bg-hover);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 1.5rem 0 2rem;
}
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem 1rem;
    transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}
.card h3 {
    margin-top: 0;
    font-size: 1rem;
}
.card p {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 0.5rem;
}
.card a {
    font-size: 0.85rem;
    font-weight: 500;
}
.news-block {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
}
.news-item {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.6rem;
}
.news-item:last-child {
    border-bottom: none;
}
.news-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}
.news-source {
    font-size: 0.7rem;
}
.news-source a {
    color: var(--accent);
}
.news-item strong {
    color: var(--text-head);
}
.mirror-block {
    background: var(--bg-code);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    margin: 0.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid var(--border-light);
}
.mirror-block code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-main);
}
.info-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    color: #d0cbd8;
}
.info-box strong {
    color: var(--accent);
}
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.page-nav__label {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.page-nav__title {
    font-weight: 500;
    color: var(--accent);
}
.global-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-sub);
}
.global-footer__links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: nowrap;
}
.global-footer__links a {
    color: var(--text-sub);
    white-space: nowrap;
}
.global-footer__links a:hover {
    color: var(--accent);
}
.global-footer__copy {
    white-space: nowrap;
}
@media (max-width: 1024px) {
    :root {
        --sidebar-width-left: 240px;
        --sidebar-width-right: 200px;
    }
    body {
        padding-left: calc(var(--sidebar-width-left) + var(--sidebar-offset) * 2);
        padding-right: calc(var(--sidebar-width-right) + var(--sidebar-offset) * 2);
    }
}
@media (max-width: 768px) {
    :root {
        --sidebar-width-left: 220px;
        --sidebar-width-right: 180px;
        --sidebar-offset: 10px;
    }
    body {
        padding-left: calc(var(--sidebar-width-left) + var(--sidebar-offset) * 2);
        padding-right: calc(var(--sidebar-width-right) + var(--sidebar-offset) * 2);
        padding-top: 60px;
    }
    .main-header {
        height: 60px;
    }
    .header-container {
        padding: 0 1rem;
    }
    .main-nav .nav-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    .main-nav ul {
        gap: 0.3rem;
    }
    .sidebar-panel {
        top: calc(60px + var(--sidebar-offset));
        width: var(--sidebar-width-left);
        padding: 1rem 0.8rem;
    }
    .sidebar-panel .sidebar-title {
        font-size: 1rem;
    }
    .sidebar-nav .nav-label {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    .sidebar-nav .dropdown a {
        font-size: 0.8rem;
        padding: 5px 10px 5px 20px;
    }
    .reference-sidebar {
        top: calc(60px + var(--sidebar-offset));
        width: var(--sidebar-width-right);
        padding: 1rem 0.8rem;
    }
    .reference-sidebar-title {
        font-size: 0.7rem;
    }
    .reference-sidebar nav a {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    .hero-section {
        flex-direction: column;
        padding: 1.5rem;
    }
    .hero-image img,
    .hero-image .hero-gif {
        max-width: 100%;
    }
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
    .main-area {
        padding: 1rem;
    }
    .global-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    .global-footer__links {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    :root {
        --sidebar-width-left: 160px;
        --sidebar-width-right: 140px;
        --sidebar-offset: 8px;
    }
    body {
        padding-left: calc(var(--sidebar-width-left) + var(--sidebar-offset) * 2);
        padding-right: calc(var(--sidebar-width-right) + var(--sidebar-offset) * 2);
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .main-nav .nav-link {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    .main-nav ul {
        gap: 0.2rem;
    }
    .sidebar-panel {
        padding: 0.8rem 0.6rem;
    }
    .sidebar-nav .nav-label {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    .sidebar-nav .dropdown a {
        font-size: 0.75rem;
        padding: 4px 8px 4px 16px;
    }
    .reference-sidebar {
        padding: 0.8rem 0.6rem;
    }
    .reference-sidebar nav a {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}