/* CSS Variables */
:root {
    --header-height: 64px;
    --footer-height: 80px;
    --image_height: 120px;
    --page-max-width: 1380px;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --border: rgba(148, 163, 184, 0.22);
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #2563eb;
    --accent-soft: #e8f0ff;
    --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.10);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--text-main);
    font-family: 'Lato', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(52, 211, 153, 0.14), transparent 24%),
        linear-gradient(180deg, #f6f9ff 0%, #eef4ff 44%, #f6f8fc 100%);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    z-index: 1000;
    box-sizing: border-box;
}

nav button {
    background: transparent;
    padding: 10px 14px;
    margin: 0;
    border: none;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

nav button:hover {
    background: #eef3fb;
    transform: translateY(-1px);
}

.title {
    position: fixed;
    top: 0;
    left: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1001;
    pointer-events: none;
    padding: 0 22px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.content {
    min-height: 150dvh;
    background-color: transparent;
}

main {
    max-width: var(--page-max-width);
    margin: var(--header-height) auto var(--footer-height);
    padding: 28px 28px 0;
    box-sizing: border-box;
}

.error {
    min-height: calc(100dvh - var(--header-height) - var(--footer-height));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: bold;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--footer-height);
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.98) 36%);
    z-index: 1000;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

footer img {
    height: var(--image_height);
    margin-top: -20px;
}

.guide-page {
    padding-top: 8px;
}

.guide-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.86fr);
    gap: 28px;
    margin-bottom: 30px;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 246, 255, 0.90) 44%, rgba(236, 253, 245, 0.90) 100%);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.guide-hero::before,
.guide-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.guide-hero::before {
    width: 320px;
    height: 320px;
    right: -120px;
    top: -150px;
    background: rgba(37, 99, 235, 0.10);
}

.guide-hero::after {
    width: 260px;
    height: 260px;
    left: -80px;
    bottom: -150px;
    background: rgba(16, 185, 129, 0.10);
}

.guide-hero-text,
.guide-hero-panel {
    position: relative;
    z-index: 1;
}

.guide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.guide-hero h1 {
    margin: 18px 0 14px;
    max-width: 820px;
    font-size: 52px;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.guide-hero p {
    margin: 0;
    max-width: 760px;
    font-size: 18px;
    line-height: 1.75;
    color: var(--text-muted);
}

.guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.guide-button:hover {
    transform: translateY(-1px);
}

.guide-button-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #0ea5e9 100%);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.guide-button-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.guide-hero-panel,
.guide-sidebar-card,
.guide-card,
.guide-note,
.guide-section,
.guide-table-wrapper {
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
}

.guide-hero-panel {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.guide-panel-title {
    margin: 18px 0 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main);
}

.guide-badge-list,
.guide-code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-badge,
.guide-code-list code {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf3ff;
    color: #274690;
    border: 1px solid rgba(37, 99, 235, 0.08);
    font-size: 13px;
    font-weight: 800;
}

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

.guide-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.guide-sidebar-card {
    padding: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.95) 100%);
}

.guide-sidebar-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.guide-nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.guide-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.guide-nav-link:hover,
.guide-nav-link.active {
    background: linear-gradient(135deg, #edf4ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.10);
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.guide-section {
    position: relative;
    padding: 28px;
    scroll-margin-top: calc(var(--header-height) + 28px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.guide-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 26px 26px 0 0;
    background: linear-gradient(90deg, #2563eb 0%, #22c55e 100%);
}

.guide-section h2 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.guide-section p,
.guide-section li,
.guide-table td,
.guide-table th {
    font-size: 16px;
    line-height: 1.68;
    color: #334155;
}

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

.guide-card {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 255, 0.94) 100%);
}

.guide-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.guide-list,
.guide-steps {
    margin: 0;
    padding-left: 22px;
}

.guide-note {
    margin-top: 18px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.82) 100%);
    border-color: rgba(245, 158, 11, 0.22);
}

.guide-table-wrapper {
    margin-top: 18px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.96);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
}

.guide-table th,
.guide-table td {
    padding: 18px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

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

.guide-table th {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    font-size: 13px;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.guide-page code {
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef3ff;
    color: #1d4ed8;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92em;
    font-weight: 700;
}

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

    .guide-sidebar {
        position: static;
    }

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

@media (max-width: 700px) {
    main {
        padding: 18px 12px 0;
    }

    .title,
    header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .guide-hero {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .guide-hero h1 {
        font-size: 34px;
    }

    .guide-section {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .guide-section::before {
        border-radius: 20px 20px 0 0;
    }

    .guide-section h2 {
        font-size: 26px;
    }

    .guide-hero-panel,
    .guide-sidebar-card,
    .guide-card,
    .guide-note,
    .guide-table-wrapper {
        border-radius: 18px;
    }

    .guide-nav {
        grid-template-columns: 1fr;
    }

    .guide-table th,
    .guide-table td {
        padding: 14px;
    }
}