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

:root {
    --gradient-1: #667eea;
    --gradient-2: #764ba2;
    --gradient-3: #f093fb;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text: #fff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --accent: #fbbf24;
    --green: #34d399;
    --card-bg: rgba(255, 255, 255, 0.06);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 40%, #24243e 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a {
    color: #a5b4fc;
}

a:hover {
    color: #c4b5fd;
}

.bg-glow {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-glow::before,
.bg-glow::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: guideFloat 15s ease-in-out infinite;
}

.bg-glow::before {
    top: -200px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: var(--gradient-1);
}

.bg-glow::after {
    right: -100px;
    bottom: -150px;
    width: 500px;
    height: 500px;
    background: var(--gradient-3);
    animation-delay: -7s;
}

@keyframes guideFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 20px) scale(0.95);
    }
}

.container {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 0 24px;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text);
}

.hero {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 0 42px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(196, 181, 253, 0.25);
    border-radius: 999px;
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.12);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero h1 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 6vw, 3.25rem);
    line-height: 1.12;
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.7;
}

.section {
    padding: 26px 0;
}

.section-title {
    margin-bottom: 10px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.section-title.with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
}

.ai-title-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 9px;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    box-shadow: inset 0 0 12px rgba(52, 211, 153, 0.08);
}

.ai-title-icon svg {
    display: block;
}

.browser-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    line-height: 1.25;
}

.browser-title-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.browser-title-tail {
    min-width: 0;
}

.section-subtitle {
    margin-bottom: 26px;
    color: var(--text-muted);
    line-height: 1.65;
}

.card {
    margin-bottom: 24px;
    padding: 32px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.card h2,
.card h3 {
    margin-bottom: 12px;
}

.card h3:not(:first-child) {
    margin-top: 24px;
}

.card p,
.card li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card ul,
.card ol {
    margin: 12px 0;
    padding-left: 20px;
}

.card li {
    margin-bottom: 8px;
}

.card code {
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ddd6fe;
    font-size: 0.85rem;
}

.browser-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    vertical-align: -4px;
}

.browser-link img {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.browser-name {
    color: rgba(255, 255, 255, 0.94);
    font-weight: 600;
    white-space: nowrap;
}

.step-list {
    counter-reset: step;
    padding-left: 0 !important;
    list-style: none;
}

.step-list li {
    position: relative;
    min-height: 34px;
    padding-left: 44px;
    counter-increment: step;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    font-size: 0.9rem;
    font-weight: 700;
}

.step-description {
    margin-top: 8px;
}

.step-media {
    margin: 16px 0 8px;
}

.step-media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.step-media--compact img {
    width: auto;
    max-width: 100%;
    margin-inline: auto;
}

.step-media figcaption {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    text-align: center;
}

.media-block {
    margin: 22px 0;
    text-align: center;
}

.media-block img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.media-block video {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: #0f0c29;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.media-caption {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.8rem !important;
}

.info-block,
.warning-block {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.info-block {
    border: 1px solid rgba(102, 126, 234, 0.25);
    background: rgba(102, 126, 234, 0.09);
}

.warning-block {
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: rgba(251, 191, 36, 0.08);
}

.ai-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ai-cost-note {
    margin-top: 12px;
}

.ai-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ai-tab svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.ai-tab:hover,
.ai-tab:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.ai-tab.active {
    border-color: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.17);
}

.ai-tab-content {
    display: none;
}

.ai-tab-content.active {
    display: block;
}

.endpoint-fields {
    padding: 0 !important;
    list-style: none;
}

.endpoint-fields li {
    margin-bottom: 10px;
    padding: 14px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.endpoint-fields strong,
.endpoint-fields span {
    display: block;
}

.endpoint-fields strong {
    margin-bottom: 4px;
    color: var(--text);
}

.endpoint-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.endpoint-examples span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.82rem;
}

.endpoint-examples svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #34d399;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.models-table {
    width: 100%;
    min-width: 680px;
    margin-top: 16px;
    border-collapse: collapse;
}

.models-table th,
.models-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
}

.models-table th {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.models-table td {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.usage-insight {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(102, 126, 234, 0.08));
}

.usage-insight h3 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.usage-insight p + p {
    margin-top: 10px;
}

.usage-cost-table {
    min-width: 720px;
    margin-top: 14px;
}

.usage-cost-table strong {
    color: var(--text-primary);
}

.usage-cost-average {
    color: #86efac;
    font-weight: 700;
}

.usage-cost-note {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.usage-insight .step-media {
    margin-bottom: 0;
}

.level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level-low {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
}

.level-medium {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
}

.level-high {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.level-ultra {
    color: #f093fb;
    background: rgba(240, 147, 251, 0.15);
}

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

.guide-link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.guide-link:hover {
    transform: translateY(-2px);
    border-color: rgba(196, 181, 253, 0.4);
    color: var(--text);
    background: rgba(139, 92, 246, 0.1);
}

.guide-link strong {
    font-size: 1rem;
}

.guide-link span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.copy-row-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.copy-row-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.copy-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #ddd6fe;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9rem;
}

.copy-button {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(196, 181, 253, 0.3);
    border-radius: 8px;
    color: #fff;
    background: rgba(139, 92, 246, 0.18);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
}

.copy-button:hover,
.copy-button:focus-visible {
    background: rgba(139, 92, 246, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.58);
}

.center-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

footer {
    margin-top: 36px;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 100;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    visibility: hidden;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.scroll-top.visible {
    visibility: visible;
    opacity: 1;
}

.scroll-top:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 42px 0 28px;
    }

    .section {
        padding: 18px 0;
    }

    .card {
        padding: 22px 18px;
        background: rgba(30, 27, 60, 0.82);
        backdrop-filter: none;
    }

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

    .copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
    }

    .scroll-top {
        right: 18px;
        bottom: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .bg-glow::before,
    .bg-glow::after {
        animation: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
