/* ==========================================
   心屿推送 - 全局样式
   ========================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; color: #333; background: #f5f6fa; line-height: 1.6; min-height: 100vh; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== 认证页 ========== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: #fff; border-radius: 12px; padding: 36px; width: 100%; max-width: 400px; box-shadow: 0 2px 16px rgba(0,0,0,.06); }
.auth-title { font-size: 22px; font-weight: 700; text-align: center; color: #1a1a1a; margin-bottom: 4px; }
.auth-sub { text-align: center; color: #6b7280; font-size: 13px; margin-bottom: 24px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: #6b7280; }

/* ========== 顶部导航条 ========== */
.topbar { display: flex; align-items: center; justify-content: space-between; background: #1a1a2e; color: #fff; padding: 0 20px; height: 56px; position: sticky; top: 0; z-index: 200; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-toggle { display: none; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; padding: 6px; line-height: 1; }
.topbar-toggle:hover { color: #a5b4fc; }
.topbar-brand { font-size: 16px; font-weight: 700; color: #fff; text-decoration: none; }
.topbar-brand:hover { color: #fff; text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-user { font-size: 13px; color: #a5b4fc; }
.topbar-link { color: #d1d5db; font-size: 13px; text-decoration: none; }
.topbar-link:hover { color: #fff; }
.topbar-logout { color: #f87171; }

/* ========== 侧边栏布局 ========== */
.layout { display: flex; min-height: calc(100vh - 56px); }

/* 侧边栏本体 */
.sidebar { width: 220px; background: #16213e; color: #d1d5db; padding: 20px 0; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; flex-shrink: 0; transition: transform .25s ease; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a3a5e; border-radius: 3px; }

.sidebar-section { margin-bottom: 18px; }
.sidebar-title { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 1px; padding: 0 20px 8px; font-weight: 700; }
.sidebar-menu { list-style: none; }
.sidebar-item a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #cbd5e1; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; border-left: 3px solid transparent; }
.sidebar-item a:hover { background: #1f2a4a; color: #fff; text-decoration: none; }
.sidebar-item a.active { background: #1e293b; color: #60a5fa; border-left-color: #60a5fa; font-weight: 600; }
.sidebar-icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-divider { height: 1px; background: #2a3a5e; margin: 8px 0; }
.sidebar-footer { padding: 16px 20px; font-size: 12px; color: #6b7280; border-top: 1px solid #2a3a5e; margin-top: auto; }

/* 主内容区 */
.main { flex: 1; padding: 28px 32px; max-width: 100%; overflow-x: hidden; min-width: 0; }

/* 移动端侧边栏 */
@media (max-width: 768px) {
    .topbar-toggle { display: inline-block; }
    .sidebar { position: fixed; top: 56px; left: 0; z-index: 150; transform: translateX(-100%); box-shadow: 2px 0 12px rgba(0,0,0,.2); }
    .sidebar.open { transform: translateX(0); }
    .main { padding: 20px 16px; }
    .layout { position: relative; }
    .sidebar-backdrop { display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 140; }
    .sidebar-backdrop.show { display: block; }
}

.page-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.page-subtitle { color: #6b7280; font-size: 13px; margin-bottom: 24px; }

/* ========== 卡片 ========== */
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 8px rgba(0,0,0,.05); }
.card-title { font-size: 16px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: #6b7280; margin-bottom: 16px; }

/* ========== 表单 ========== */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.field-group input,
.field-group textarea,
.field-group select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; }
.field-group input:focus,
.field-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field-group .hint { font-size: 12px; color: #6b7280; margin-top: 3px; }
textarea.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; resize: vertical; }

/* ========== 按钮 ========== */
.btn { display: inline-block; padding: 8px 18px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; background: #fff; color: #333; text-align: center; line-height: 1.5; }
.btn:hover { background: #f3f4f6; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ========== Alert ========== */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 20px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-success code { display: block; background: #f3f4f6; padding: 10px; border-radius: 6px; font-size: 13px; margin-top: 8px; word-break: break-all; }

/* ========== Tabs ========== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 20px; }
.tab { padding: 10px 20px; border: none; background: none; font-size: 14px; font-weight: 500; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab:hover { color: #333; }
.tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f9fafb; font-weight: 600; color: #6b7280; text-align: left; padding: 10px 12px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; }
.data-table tbody tr:hover { background: #f9fafb; }
.empty-msg { text-align: center; color: #9ca3af; padding: 32px 0; }

/* ========== 分区标题 ========== */
.section-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.section-count { font-size: 13px; color: #9ca3af; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.text-fail { color: #dc2626; cursor: help; }

/* ========== Badge ========== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-bilibili { background: #e0f2fe; color: #0369a1; }
.badge-douyin { background: #fdf2f8; color: #be185d; }
.badge-kuaishou { background: #fff7ed; color: #c2410c; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag-ok { background: #f0fdf4; color: #16a34a; }
.tag-warn { background: #fffbeb; color: #d97706; }
.tag-fail { background: #fef2f2; color: #dc2626; }

/* ========== API Key ========== */
.api-key-box { display: flex; align-items: center; gap: 12px; background: #f9fafb; padding: 14px 16px; border-radius: 8px; border: 1px solid #e5e7eb; }
.api-key-value { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; color: #1a1a2e; word-break: break-all; flex: 1; user-select: all; }
.api-key-display { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; user-select: all; display: block; word-break: break-all; }

/* ========== 代码示例 ========== */
.code-example { margin-top: 20px; background: #1a1a2e; color: #e5e7eb; border-radius: 10px; padding: 20px; overflow-x: auto; }
.code-example h4 { color: #a5b4fc; font-size: 14px; margin-bottom: 12px; }
.code-example pre { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; line-height: 1.8; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* ========== 分页 ========== */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.page { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 13px; background: #fff; border: 1px solid #e5e7eb; color: #333; }
.page:hover { background: #f3f4f6; text-decoration: none; }
.page.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ========== API 文档专用样式 ========== */
.endpoint-card { background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 8px rgba(0,0,0,.05); margin-bottom: 18px; }
.endpoint-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.endpoint-method { display: inline-block; padding: 4px 10px; border-radius: 5px; font-family: 'SF Mono', monospace; font-size: 12px; font-weight: 700; color: #fff; }
.method-post { background: #16a34a; }
.method-get  { background: #2563eb; }
.endpoint-path { font-family: 'SF Mono', monospace; font-size: 14px; color: #1a1a2e; font-weight: 600; }
.endpoint-desc { color: #6b7280; font-size: 13px; margin-bottom: 14px; }

.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.doc-table th { background: #f9fafb; text-align: left; padding: 8px 12px; font-weight: 600; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
.doc-table td { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.doc-table code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #1a1a2e; }
.doc-table .required { color: #dc2626; font-size: 12px; margin-left: 4px; }

.code-block { background: #1a1a2e; color: #e5e7eb; border-radius: 8px; padding: 16px; overflow-x: auto; margin: 12px 0; position: relative; }
.code-block pre { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 12px; line-height: 1.7; margin: 0; white-space: pre-wrap; word-break: break-all; color: #e5e7eb; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; background: #2a3a5e; color: #fff; border: 0; padding: 4px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; }
.code-block .copy-btn:hover { background: #3b4a6e; }
.code-block .comment { color: #6b7280; }
.code-block .keyword { color: #c084fc; }
.code-block .string { color: #86efac; }
.code-block .function { color: #fbbf24; }

.doc-section { margin-bottom: 30px; }
.doc-section h2 { font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid #2563eb; display: inline-block; }
.doc-section h3 { font-size: 15px; font-weight: 700; color: #1a1a1a; margin: 18px 0 10px; }
.doc-section p { color: #4b5563; margin-bottom: 10px; line-height: 1.8; }
.doc-section ul { margin: 10px 0 10px 20px; color: #4b5563; }
.doc-section ul li { margin-bottom: 6px; line-height: 1.7; }

.copyable-input { display: flex; align-items: center; gap: 8px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
.copyable-input input { flex: 1; border: 0; background: transparent; outline: 0; font-family: 'SF Mono', monospace; font-size: 13px; color: #1a1a2e; user-select: all; }
.copyable-input .copy-btn { background: #2563eb; color: #fff; border: 0; padding: 5px 12px; border-radius: 5px; font-size: 12px; cursor: pointer; }
.copyable-input .copy-btn:hover { background: #1d4ed8; }

.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }

.steps { counter-reset: step-num; padding: 0; list-style: none; }
.steps li { counter-increment: step-num; position: relative; padding-left: 40px; margin-bottom: 14px; line-height: 1.7; color: #4b5563; }
.steps li::before { content: counter(step-num); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; background: #2563eb; color: #fff; border-radius: 50%; text-align: center; line-height: 26px; font-size: 13px; font-weight: 700; }

/* ========== 统计卡片 ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.04); text-align: center; border-left: 4px solid #2563eb; }
.stat-card-ok { border-left-color: #16a34a; }
.stat-num { font-size: 28px; font-weight: 800; color: #1a1a2e; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* ========== 图形验证码与行内按钮 ========== */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; letter-spacing: 2px; }
.captcha-row input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.captcha-img { height: 42px; width: 132px; border-radius: 6px; border: 1px solid #e5e7eb; cursor: pointer; flex-shrink: 0; display: block; }

.inline-btn-row { display: flex; gap: 10px; align-items: stretch; }
.inline-btn-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; letter-spacing: 4px; }
.inline-btn-row input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.send-code-btn { white-space: nowrap; background: #eef2ff; color: #2563eb; border: 1px solid #c7d2fe; padding: 0 14px; font-size: 13px; cursor: pointer; }
.send-code-btn:hover:not(:disabled) { background: #e0e7ff; }
.send-code-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ========== 首页落地页 ========== */
.land-body { background: #fff; color: #1f2937; }

.btn-outline { background: #fff; color: #2563eb; border-color: #bfdbfe; }
.btn-outline:hover { background: #eff6ff; }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: 8px; }

.land-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #eef2f7; }
.land-nav-inner { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.land-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #111827; }
.land-brand b { font-size: 17px; letter-spacing: .5px; }
.land-logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #2563eb, #7c3aed); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.land-nav-links { display: flex; gap: 22px; margin-left: auto; }
.land-nav-links a { text-decoration: none; color: #4b5563; font-size: 14px; }
.land-nav-links a:hover { color: #2563eb; }
.land-nav-actions { display: flex; gap: 10px; align-items: center; }
.land-nav-actions .btn { text-decoration: none; }

.land-hero { max-width: 1080px; margin: 0 auto; padding: 72px 24px 64px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.land-hero h1 { font-size: 44px; line-height: 1.2; margin: 0 0 16px; background: linear-gradient(90deg, #1d4ed8, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-tagline { font-size: 18px; color: #4b5563; line-height: 1.8; margin: 0 0 26px; }
.land-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.land-cta-row .btn { text-decoration: none; }
.land-hero-note { margin-top: 18px; font-size: 13px; color: #9ca3af; }

.land-hero-demo { position: relative; min-height: 300px; }
.land-msg-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(37,99,235,.10); max-width: 340px; }
.land-hero-demo .land-msg-card:first-child { transform: rotate(-2deg); }
.land-msg-delay { position: absolute; right: 0; bottom: 12px; transform: rotate(2.5deg); opacity: .92; }
.land-msg-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.land-msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.land-msg-title { font-weight: 700; font-size: 15px; color: #111827; margin-bottom: 6px; }
.land-msg-line { font-size: 13px; color: #374151; line-height: 1.7; }
.land-msg-time { margin-top: 8px; font-size: 12px; color: #9ca3af; }

.land-section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.land-section-alt { max-width: none; background: #f8fafc; }
.land-section-alt > * { max-width: 1032px; margin-left: auto; margin-right: auto; }
.land-h2 { text-align: center; font-size: 28px; margin: 0 0 8px; }
.land-sub { text-align: center; color: #6b7280; font-size: 15px; margin: 0 0 36px; }

.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.land-card { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 24px; transition: box-shadow .2s, transform .2s; }
.land-card:hover { box-shadow: 0 12px 32px rgba(17,24,39,.08); transform: translateY(-3px); }
.land-icon { width: 44px; height: 44px; border-radius: 10px; background: #eff6ff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.land-card h3 { margin: 0 0 8px; font-size: 16px; }
.land-card p { margin: 0; font-size: 13.5px; color: #6b7280; line-height: 1.75; }

.land-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding-bottom: 8px; }
.land-badge { background: #fff; border: 1px solid #dbeafe; color: #1d4ed8; font-size: 14px; padding: 9px 22px; border-radius: 999px; }

.land-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.land-step { background: #f8fafc; border-radius: 14px; padding: 24px; text-align: center; }
.land-step i { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: #2563eb; color: #fff; font-style: normal; font-weight: 700; align-items: center; justify-content: center; margin-bottom: 12px; }
.land-step h3 { margin: 0 0 8px; font-size: 16px; }
.land-step p { margin: 0; font-size: 13.5px; color: #6b7280; line-height: 1.75; }

.land-final-cta { text-align: center; margin-top: 40px; }
.land-final-cta .btn { text-decoration: none; }

.land-footer { border-top: 1px solid #eef2f7; padding: 28px 24px 36px; text-align: center; color: #9ca3af; font-size: 13px; }
.land-footer a { color: #6b7280; text-decoration: none; }
.land-footer a:hover { color: #2563eb; }

@media (max-width: 860px) {
    .land-nav-links { display: none; }
    .land-hero { grid-template-columns: 1fr; padding-top: 48px; }
    .land-hero-demo { min-height: 240px; }
    .land-hero h1 { font-size: 34px; }
}

