/*
 * 优时开放平台 · 开发者中心：深空灰 + 灵动绿（与控制台、运营后台同一套视觉）
 */
:root {
    --op-primary: #10b981;
    --op-primary-hover: #059669;
    --op-primary-soft: #ecfdf5;
    --op-neon: #00e599;
    --op-dark: #0f172a;
    --op-success: #16a34a;
    --op-success-soft: #dcfce7;
    --op-text: #0f172a;
    --op-text-2: #475569;
    --op-text-3: #94a3b8;
    --op-border: #e2e8f0;
    --op-bg: #f5f7fb;
    --op-surface: #ffffff;
    --op-radius: 12px;
    --op-radius-sm: 8px;
    --op-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .05);
    --op-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    --op-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--op-surface); color: var(--op-text); font-family: var(--op-font); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--op-primary); text-decoration: none; }
a:hover { color: var(--op-primary-hover); }
h1, h2, h3, h4 { color: var(--op-text); line-height: 1.35; }

/* ---------- 按钮 ---------- */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: var(--op-radius-sm); font-size: 15px; font-weight: 500; border: 1px solid transparent; transition: all .15s; white-space: nowrap; }
.pt-btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.pt-btn-primary { background: linear-gradient(135deg, #10b981 0%, #00c389 100%); color: #fff; box-shadow: 0 6px 16px rgba(16, 185, 129, .25); }
.pt-btn-primary:hover { background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: #fff; }
.pt-btn-light { background: linear-gradient(135deg, #10b981 0%, #00c389 100%); color: #fff; box-shadow: 0 8px 24px rgba(0, 229, 153, .25); }
.pt-btn-light:hover { background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: #fff; }
.pt-btn-ghost { color: #e2e8f0; border-color: rgba(148, 163, 184, .45); background: rgba(15, 23, 42, .35); }
.pt-btn-ghost:hover { color: #fff; border-color: rgba(0, 229, 153, .6); background: rgba(16, 185, 129, .12); }

/* ---------- 顶栏 ---------- */
.pt-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--op-border); }
.pt-header-inner { display: flex; align-items: center; gap: 36px; max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 24px; }
.pt-brand { display: flex; align-items: center; gap: 10px; color: var(--op-text); font-size: 17px; font-weight: 600; }
.pt-brand img { width: 32px; height: 32px; border-radius: 8px; }
.pt-nav { display: flex; gap: 4px; flex: 1; }
.pt-nav a { white-space: nowrap; padding: 6px 14px; border-radius: var(--op-radius-sm); color: var(--op-text-2); font-size: 15px; }
.pt-nav a:hover { color: var(--op-primary); background: #f8fafc; }
.pt-nav a.active { color: var(--op-primary-hover); font-weight: 600; box-shadow: inset 0 -2px 0 var(--op-primary); border-radius: 0; }

/* ---------- 首页 ---------- */
.pt-hero {
    position: relative; overflow: hidden; color: #e2e8f0;
    background:
        radial-gradient(ellipse at 82% 12%, rgba(0, 229, 153, .18), transparent 45%),
        linear-gradient(100deg, rgba(8, 13, 26, .96) 0%, rgba(11, 17, 32, .88) 45%, rgba(15, 23, 42, .5) 100%),
        url(/console/assets/car-scene.jpg) 65% center / cover no-repeat,
        #0b1120;
}
.pt-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at 35% 50%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse at 35% 50%, #000 25%, transparent 75%);
}
.pt-hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 104px 24px 88px; }
.pt-hero h1 { margin: 0 0 20px; color: #f8fafc; font-size: 44px; font-weight: 700; letter-spacing: .5px; }
.pt-hero p { max-width: 640px; margin: 0 0 36px; color: #94a3b8; font-size: 17px; }
.pt-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-top: 56px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, .16); background: rgba(15, 23, 42, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
.pt-metrics div { padding: 16px 20px; }
.pt-metrics div + div { border-left: 1px solid rgba(148, 163, 184, .14); }
.pt-metrics b { display: block; color: var(--op-neon); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(0, 229, 153, .35); }
.pt-metrics span { color: #94a3b8; font-size: 13px; }
.pt-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.pt-section { padding: 72px 0; }
.pt-section-alt { background: var(--op-bg); }
.pt-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.pt-section-title { margin: 0 0 32px; font-size: 26px; font-weight: 600; text-align: center; }
.pt-grid { display: grid; gap: 20px; }
.pt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-card { display: block; padding: 28px; background: var(--op-surface); border: 1px solid var(--op-border); border-radius: var(--op-radius); box-shadow: var(--op-shadow); color: var(--op-text); }
.pt-card h3 { margin: 14px 0 8px; font-size: 18px; }
.pt-card p { margin: 0; color: var(--op-text-2); font-size: 14px; }
.pt-card-muted { background: #fbfcfe; }
.pt-card-link { transition: border-color .15s, transform .15s; }
.pt-card-link h3 { margin-top: 0; }
.pt-card-link:hover { border-color: var(--op-primary); transform: translateY(-2px); color: var(--op-text); }
.pt-more { display: inline-block; margin-top: 16px; color: var(--op-primary); font-size: 14px; font-weight: 500; }
.pt-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: var(--op-text-3); font-size: 12px; font-weight: 500; }
.pt-tag-ok { background: var(--op-success-soft); color: var(--op-success); }
.pt-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.pt-steps li { position: relative; padding: 28px 28px 28px 84px; background: var(--op-surface); border: 1px solid var(--op-border); border-radius: var(--op-radius); counter-increment: step; }
.pt-steps li::before { content: counter(step); position: absolute; left: 28px; top: 28px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--op-dark); color: var(--op-neon); font-weight: 700; box-shadow: 0 0 0 1px rgba(0, 229, 153, .35), 0 0 14px rgba(0, 229, 153, .25); }
.pt-steps b { display: block; margin-bottom: 6px; font-size: 17px; }
.pt-steps span { color: var(--op-text-2); font-size: 14px; }
.pt-console-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.pt-console-cta h2 { margin: 0 0 8px; font-size: 22px; }
.pt-console-cta p { margin: 0; color: var(--op-text-2); max-width: 720px; }

/* ---------- 文档 ---------- */
.pt-docs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; }
.pt-sidebar { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 8px; }
.pt-sidebar-group { margin-bottom: 28px; }
.pt-sidebar-title { margin-bottom: 8px; color: var(--op-text-3); font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.pt-sidebar-link { display: block; padding: 6px 12px; border-radius: 6px; color: var(--op-text-2); font-size: 14px; line-height: 1.5; }
.pt-sidebar-link:hover { background: #f8fafc; color: var(--op-primary); }
.pt-sidebar-link.active { background: var(--op-primary-soft); color: var(--op-primary); font-weight: 600; }
.pt-sidebar-sub { font-size: 13px; }
.pt-breadcrumb { margin-bottom: 8px; color: var(--op-text-3); font-size: 13px; }
.pt-breadcrumb a { color: var(--op-text-3); }

.pt-markdown { max-width: 880px; }
.pt-markdown h1 { margin: 0 0 24px; font-size: 30px; }
.pt-markdown h2 { margin: 48px 0 16px; padding-top: 8px; font-size: 23px; border-top: 1px solid var(--op-border); padding-top: 32px; }
.pt-markdown h3 { margin: 32px 0 12px; font-size: 18px; }
.pt-markdown h4 { margin: 24px 0 10px; font-size: 16px; }
.pt-markdown p, .pt-markdown ul, .pt-markdown ol { margin: 0 0 14px; color: #1e293b; }
.pt-markdown li { margin: 4px 0; }
.pt-markdown blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--op-primary); background: var(--op-primary-soft); border-radius: 0 var(--op-radius-sm) var(--op-radius-sm) 0; color: var(--op-text-2); }
.pt-markdown blockquote p { margin: 0; }
.pt-markdown code { padding: 2px 6px; border-radius: 4px; background: #f1f5f9; color: #047857; font-family: var(--op-mono); font-size: 13px; }
.pt-markdown pre { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--op-radius-sm); background: #0f172a; border-left: 3px solid var(--op-primary); overflow-x: auto; }
.pt-markdown pre code { padding: 0; background: none; color: #e2e8f0; font-size: 13px; line-height: 1.6; }
.pt-markdown table { display: block; width: 100%; margin: 0 0 18px; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.pt-markdown th, .pt-markdown td { padding: 9px 14px; border: 1px solid var(--op-border); text-align: left; vertical-align: top; }
.pt-markdown th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.pt-markdown hr { margin: 40px 0; border: 0; border-top: 1px solid var(--op-border); }
.pt-markdown .doc-section + .doc-section { margin-top: 56px; padding-top: 8px; border-top: 2px solid var(--op-border); }

/* ---------- 页脚 ---------- */
.pt-footer { border-top: 1px solid var(--op-border); background: var(--op-surface); }
.pt-footer-inner { display: flex; justify-content: space-between; gap: 16px; max-width: 1200px; margin: 0 auto; padding: 28px 24px; color: var(--op-text-3); font-size: 13px; }
.pt-footer-links { display: flex; gap: 20px; }
.pt-footer-links a { color: var(--op-text-3); }
.pt-footer-links a:hover { color: var(--op-primary); }

@media (max-width: 900px) {
    .pt-header-inner { gap: 8px; padding: 0 16px; }
    .pt-brand span { display: none; }
    .pt-nav a { padding: 6px 10px; }
    .pt-hero-inner { padding: 64px 20px 72px; }
    .pt-hero h1 { font-size: 30px; }
    .pt-metrics { grid-template-columns: 1fr; }
    .pt-metrics div + div { border-left: 0; border-top: 1px solid rgba(148, 163, 184, .14); }
    .pt-grid-3, .pt-steps { grid-template-columns: 1fr; }
    .pt-console-cta { flex-direction: column; align-items: flex-start; }
    .pt-docs { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px 60px; }
    .pt-sidebar { position: static; max-height: none; }
    .pt-sidebar-group:last-child { display: none; }
    .pt-footer-inner { flex-direction: column; }
}
