:root {
    --bg: #0a1018;
    --bg-soft: #101a25;
    --surface: rgba(11, 20, 31, 0.82);
    --surface-strong: rgba(16, 29, 43, 0.95);
    --line: rgba(158, 181, 201, 0.18);
    --text: #edf4fa;
    --muted: #a7b7c8;
    --accent: #67f0b4;
    --accent-strong: #27d3b6;
    --accent-warm: #ffb86b;
    --danger: #ff7e88;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(35, 211, 182, 0.22), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(255, 184, 107, 0.16), transparent 24%),
        linear-gradient(180deg, #09111a 0%, #0d1622 35%, #081018 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

:not(pre) > code {
    padding: 0.16em 0.42em;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dff9ef;
    font-size: 0.94em;
}

a {
    color: #8df2c5;
    text-decoration-line: underline;
    text-decoration-color: rgba(103, 240, 180, 0.34);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
    color: #c6ffe4;
    text-decoration-color: rgba(167, 255, 209, 0.88);
}

.shell {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 12px;
}

.skip-link:focus {
    left: 12px;
    z-index: 1000;
    background: #fff;
    color: #111;
    padding: 10px 14px;
    border-radius: 999px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(7, 12, 19, 0.66);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .shell,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-header .shell {
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(39, 211, 182, 0.2);
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a,
.lang-switch a,
.brand,
.button,
.screenshot-link,
.filename-chip,
.sidebar-group a,
.guide-inline-list a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav a:hover,
.lang-switch a:hover,
.nav a:focus-visible,
.lang-switch a:focus-visible,
.sidebar-group a:hover,
.sidebar-group a:focus-visible,
.guide-inline-list a:hover,
.guide-inline-list a:focus-visible {
    color: var(--text);
}

.button:hover,
.button:focus-visible,
.brand:hover,
.brand:focus-visible,
.screenshot-link:hover,
.screenshot-link:focus-visible,
.filename-chip:hover,
.filename-chip:focus-visible {
    text-decoration: none;
}

.lang-switch {
    display: inline-flex;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.lang-switch .active {
    color: var(--text);
}

.hero {
    padding: 72px 0 44px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
    gap: 32px;
    align-items: stretch;
}

.panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 25, 37, 0.92), rgba(9, 15, 24, 0.92));
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 0.84rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.02;
}

h1 {
    margin-top: 18px;
    font-size: clamp(1rem, 9vw, 3rem);
    letter-spacing: 0.02em;
    max-width: 20ch;
}

.lead {
    margin-top: 22px;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.hero-actions,
.meta-list,
.chip-row,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    color: #071116;
    background: linear-gradient(135deg, var(--accent), #a7ffd1);
}

.button-secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.meta-list {
    margin-top: 26px;
}

.meta-card,
.chip,
.stat,
.feature-card,
.step-card,
.faq-card,
.screenshot-card,
.seo-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.meta-card {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    min-width: 168px;
}

.meta-card strong,
.stat strong {
    display: block;
    font-size: 1.15rem;
}

.meta-card span,
.stat span,
.feature-card p,
.step-card p,
.faq-card p,
.section-copy,
.support-list,
.site-footer p {
    color: var(--muted);
}

.hero-visual {
    min-height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(140deg, rgba(39, 211, 182, 0.12), transparent 40%),
        linear-gradient(320deg, rgba(255, 184, 107, 0.12), transparent 30%);
}

.orbital-art {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(4, 7, 12, 0.75);
}

.terminal-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(8, 12, 17, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.terminal-head {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.terminal-head span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.terminal-head span:nth-child(1) { background: var(--danger); }
.terminal-head span:nth-child(2) { background: var(--accent-warm); }
.terminal-head span:nth-child(3) { background: var(--accent); }

.terminal-card code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    color: #dce8f6;
    font-size: 0.95rem;
    line-height: 1.8;
}

.chip-row {
    margin-top: 16px;
}

.chip {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    color: var(--muted);
}

.section {
    padding: 34px 0;
}

.section-top {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.section-top h2 {
    font-size: clamp(0.7rem, 5vw, 2.1rem);
    letter-spacing: 0.02em;
}

.feature-grid,
.steps-grid,
.faq-grid,
.seo-grid {
    display: grid;
    gap: 18px;
}

.feature-grid,
.faq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.step-card,
.faq-card,
.seo-card {
    padding: 22px;
    border-radius: 22px;
}

.feature-card h3,
.step-card h3,
.faq-card h3,
.seo-card h3 {
    font-size: 1.15rem;
}

.feature-card p,
.step-card p,
.faq-card p,
.seo-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

.stat-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.stat {
    padding: 20px;
    border-radius: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.gallery-stack {
    display: grid;
    gap: 18px;
}

.screenshot-card {
    overflow: hidden;
    border-radius: 24px;
}

.screenshot-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-copy {
    padding: 18px 18px 20px;
    background: rgba(8, 12, 17, 0.94);
}

.screenshot-copy h3 {
    font-size: 1.08rem;
}

.screenshot-copy p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.support-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 18px;
    align-items: stretch;
}

.support-card,
.repo-card {
    padding: 26px;
}

.support-list {
    margin: 18px 0 0;
    padding-left: 18px;
    line-height: 1.9;
}

.repo-card {
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(103, 240, 180, 0.2), transparent 35%),
        rgba(255, 255, 255, 0.03);
}

.repo-card strong {
    display: block;
    margin: 16px 0 8px;
    font-size: 1.15rem;
}

.cta-panel {
    padding: 30px;
    display: grid;
    gap: 16px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(39, 211, 182, 0.2), transparent 42%),
        linear-gradient(315deg, rgba(255, 184, 107, 0.18), transparent 28%),
        rgba(255, 255, 255, 0.04);
}

.site-footer {
    padding: 28px 0 42px;
}

.site-footer p {
    margin: 0;
    font-size: 0.92rem;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero-grid,
    .section-top,
    .gallery,
    .support-panel {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .faq-grid,
    .steps-grid,
    .stat-bar,
    .seo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-header .shell,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-copy,
    .support-card,
    .repo-card,
    .cta-panel,
    .feature-card,
    .step-card,
    .faq-card,
    .seo-card {
        padding: 20px;
    }

    .feature-grid,
    .faq-grid,
    .steps-grid,
    .stat-bar,
    .seo-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: clamp(2.5rem, 13vw, 4rem);
    }
}

.guide-shell {
    width: min(calc(100% - 32px), 1280px);
    margin: 0 auto;
}

.guide-hero {
    padding: 56px 0 28px;
}

.guide-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
    gap: 24px;
    align-items: stretch;
}

.guide-copy,
.guide-summary,
.guide-sidebar,
.guide-section,
.guide-step,
.screenshot-panel,
.guide-nav-card,
.guide-card,
.compare-card,
.checklist,
.callout {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.guide-copy,
.guide-summary,
.guide-sidebar,
.guide-section,
.guide-nav-card,
.guide-card,
.compare-card {
    border-radius: 24px;
}

.guide-copy,
.guide-summary,
.guide-sidebar,
.guide-section,
.guide-nav-card,
.guide-card,
.compare-card,
.guide-step,
.screenshot-panel,
.checklist,
.callout {
    padding: 24px;
}

.guide-copy h1 {
    max-width: 100ch;
}

.guide-summary {
    display: grid;
    gap: 14px;
    background:
        linear-gradient(135deg, rgba(39, 211, 182, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.04);
}

.summary-grid,
.guide-card-grid,
.compare-grid,
.resource-grid {
    display: grid;
    gap: 18px;
}

.summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-main {
    padding: 20px 0 40px;
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.guide-sidebar {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.sidebar-group {
    display: grid;
    gap: 10px;
}

.sidebar-group h2,
.guide-section h2,
.guide-step h3,
.guide-card h3,
.compare-card h3,
.guide-nav-card h3 {
    font-size: 1.15rem;
}

.sidebar-group a,
.guide-inline-list a {
    color: var(--muted);
}

.sidebar-group a:hover,
.guide-inline-list a:hover {
    color: var(--text);
}

.guide-content {
    display: grid;
    gap: 24px;
}

.guide-section {
    display: grid;
    gap: 18px;
}

.guide-section p,
.guide-section li,
.guide-step p,
.guide-step li,
.guide-card p,
.compare-card p,
.guide-nav-card p,
.guide-summary p,
.guide-summary li,
.guide-sidebar p,
.checklist li,
.callout p {
    color: var(--muted);
    line-height: 1.8;
}

.guide-section ol,
.guide-section ul,
.guide-step ol,
.guide-step ul,
.checklist ul {
    margin: 0;
    padding-left: 20px;
}

.guide-step {
    border-radius: 22px;
    display: grid;
    gap: 16px;
    background: rgba(7, 13, 21, 0.86);
}

.step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(103, 240, 180, 0.16);
    color: var(--accent);
    font-weight: 700;
}

.code-block {
    position: relative;
    overflow-x: auto;
    border-radius: 16px;
    padding: 58px 18px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42px),
        rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.code-block code {
    white-space: pre;
    color: #edf4fa;
    font-size: 0.94rem;
    line-height: 1.7;
}

.code-toolbar {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.code-title {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(103, 240, 180, 0.18);
    background: rgba(103, 240, 180, 0.08);
    color: #b6ffd7;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-copy {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #dce8f6;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.code-copy:hover,
.code-copy:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(167, 255, 209, 0.36);
    background: rgba(103, 240, 180, 0.12);
    color: #f4fffb;
}

.code-copy svg {
    width: 17px;
    height: 17px;
}

.code-copy.is-copied {
    border-color: rgba(103, 240, 180, 0.45);
    background: rgba(103, 240, 180, 0.18);
    color: #b6ffd7;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.screenshot-panel {
    border-radius: 20px;
    display: grid;
    gap: 14px;
    background: rgba(9, 16, 25, 0.82);
}

.screenshot-link {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.screenshot-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #0b121c;
}

.filename-chip {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
    word-break: break-all;
}

.guide-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.guide-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.guide-card-grid .guide-card,
.compare-card,
.guide-nav-card {
    display: grid;
    gap: 12px;
}

.guide-card .button,
.guide-nav-card .button {
    width: fit-content;
}

.compare-card strong,
.guide-summary strong {
    display: block;
    font-size: 1rem;
}

.callout {
    border-radius: 20px;
    background: rgba(103, 240, 180, 0.08);
}

.checklist {
    border-radius: 20px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 7, 12, 0.84);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-dialog {
    width: min(100%, 1040px);
    max-height: 100%;
    overflow: auto;
    border-radius: 24px;
    padding: 20px;
    background: #07111b;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.lightbox-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.lightbox-head p {
    margin: 0;
    color: var(--muted);
}

.lightbox-close {
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.lightbox img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.api-meta-grid,
.api-card-grid {
    display: grid;
    gap: 18px;
}

.api-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.api-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-card,
.api-table-wrap {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.api-card {
    padding: 22px;
    display: grid;
    gap: 12px;
}

.api-card p,
.api-card li,
.api-table td,
.api-table th {
    line-height: 1.75;
}

.api-card ul {
    margin: 0;
    padding-left: 20px;
}

.api-table-wrap {
    overflow: auto;
}

.api-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.api-table th,
.api-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.api-table thead th {
    position: sticky;
    top: 0;
    background: rgba(7, 13, 21, 0.94);
    color: var(--text);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.api-table tbody tr:last-child td {
    border-bottom: none;
}

.api-table td {
    color: var(--muted);
}

.api-table strong,
.api-card strong {
    color: var(--text);
}

.api-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.api-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(103, 240, 180, 0.18);
    background: rgba(103, 240, 180, 0.08);
    color: #b6ffd7;
    font-size: 0.82rem;
}

.api-callout {
    border-left: 3px solid var(--accent);
    padding-left: 16px;
}

@media (max-width: 1080px) {
    .guide-layout,
    .guide-hero-grid {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        position: static;
    }

    .guide-card-grid,
    .compare-grid,
    .resource-grid,
    .api-meta-grid,
    .api-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .summary-grid,
    .guide-card-grid,
    .compare-grid,
    .resource-grid,
    .api-meta-grid,
    .api-card-grid,
    .screenshot-grid,
    .guide-nav-grid {
        grid-template-columns: 1fr;
    }

    .guide-copy,
    .guide-summary,
    .guide-sidebar,
    .guide-section,
    .guide-step,
    .screenshot-panel,
    .guide-nav-card,
    .guide-card,
    .compare-card,
    .checklist,
    .callout {
        padding: 20px;
    }
}
