/* 咸鱼风格首页模板 */
:root {
    --xy-primary: #1677ff;
    --xy-primary-hover: #4096ff;
    --xy-primary-light: #e6f4ff;
    --xy-bg: #f5f7fb;
    --xy-bg-gradient: linear-gradient(180deg, #eef4ff 0%, #f5f7fb 45%, #f5f7fb 100%);
    --xy-card: #ffffff;
    --xy-text: #1f2937;
    --xy-text-secondary: #6b7280;
    --xy-border: #e5e7eb;
    --xy-success: #52c41a;
    --xy-danger: #ff4d4f;
    --xy-warning: #faad14;
    --xy-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(15,23,42,0.06);
    --xy-shadow-lg: 0 8px 32px rgba(15,23,42,0.08);
    --xy-radius: 12px;
    --xy-radius-lg: 16px;
    --xy-nav-height: 64px;
}

* { box-sizing: border-box; }

body.xy-home {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--xy-bg-gradient);
    color: var(--xy-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.xy-no-scroll { overflow: hidden; }

/* ========== 导航 ========== */
.xy-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--xy-nav-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--xy-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.xy-navbar-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.xy-brand-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1677ff, #69b1ff);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
}

.xy-nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.xy-nav-links::-webkit-scrollbar { display: none; }

.xy-nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--xy-text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.xy-nav-link .nav-icon {
    font-size: 17px;
    line-height: 1;
}

.xy-nav-link:hover, .xy-nav-link.active {
    color: var(--xy-primary);
    background: var(--xy-primary-light);
}

.xy-nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.xy-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 500;
    border: none; cursor: pointer; text-decoration: none; transition: all 0.2s;
}

.xy-btn-primary { background: var(--xy-primary); color: #fff; }
.xy-btn-primary:hover { background: var(--xy-primary-hover); color: #fff; }
.xy-btn-outline { background: #fff; color: var(--xy-primary); border: 1px solid var(--xy-primary); }
.xy-btn-outline:hover { background: var(--xy-primary-light); color: var(--xy-primary); }
.xy-btn-sm { padding: 6px 14px; font-size: 13px; }
.xy-btn-block { width: 100%; }
.xy-btn-lg { padding: 12px 24px; font-size: 15px; }

.xy-user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--xy-border); border-radius: 999px;
    background: #fff; cursor: pointer; font-size: 14px; color: var(--xy-text);
}

.xy-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--xy-primary), #69b1ff);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}

.xy-dropdown { position: relative; }

.xy-dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 160px; background: #fff; border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius); box-shadow: var(--xy-shadow-lg);
    padding: 6px; display: none; z-index: 1001;
}

.xy-dropdown.open .xy-dropdown-menu {
    display: block;
    animation: xyDropIn 0.2s ease;
}

@keyframes xyDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.xy-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 8px;
    text-decoration: none; color: var(--xy-text); font-size: 14px;
    transition: background 0.15s;
}

.xy-dropdown-item:hover { background: var(--xy-bg); }

/* ========== 通用组件 ========== */
.xy-card {
    background: var(--xy-card);
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius-lg);
    box-shadow: var(--xy-shadow);
    overflow: hidden;
}

.xy-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--xy-border);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.xy-card-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xy-card-header i { color: var(--xy-primary); font-size: 18px; }

.xy-card-body { padding: 20px; }

.xy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.xy-badge-success { background: #f6ffed; color: #389e0d; }
.xy-badge-danger { background: #fff2f0; color: #cf1322; }
.xy-badge-warning { background: #fffbe6; color: #d48806; }

.xy-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: var(--xy-text-secondary);
}

.xy-tag-method { background: var(--xy-primary-light); color: var(--xy-primary); }
.xy-tag-free { background: #f6ffed; color: #389e0d; }
.xy-tag-bill { background: #fff7e6; color: #d48806; }
.xy-tag-key { background: #f9f0ff; color: #722ed1; }

.xy-method-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: ui-monospace, monospace;
}

.xy-method-get { background: #e6f4ff; color: #0958d9; }
.xy-method-post { background: #f6ffed; color: #389e0d; }
.xy-method-put { background: #fff7e6; color: #d48806; }
.xy-method-patch { background: #f9f0ff; color: #722ed1; }
.xy-method-delete { background: #fff2f0; color: #cf1322; }

.xy-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--xy-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--xy-text);
}

.xy-input:focus {
    outline: none;
    border-color: var(--xy-primary);
    box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
}

.xy-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(22,119,255,0.2);
    border-top-color: var(--xy-primary);
    border-radius: 50%;
    animation: xySpin 0.7s linear infinite;
    vertical-align: middle;
}

.xy-spinner-sm { width: 14px; height: 14px; }

@keyframes xySpin { to { transform: rotate(360deg); } }

.xy-footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--xy-text-secondary);
    border-top: 1px solid var(--xy-border);
    background: rgba(255,255,255,0.6);
}

.xy-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--xy-text-secondary);
}

.xy-empty-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px;
    color: var(--xy-text-secondary);
    font-size: 14px;
    background: #f8fafc;
    border-radius: 8px;
}

/* ========== 首页 Hero ========== */
.xy-hero {
    padding: calc(var(--xy-nav-height) + 48px) 24px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.xy-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1f2937 0%, #1677ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.xy-hero .subtitle {
    font-size: 16px;
    color: var(--xy-text-secondary);
    margin-bottom: 36px;
}

.xy-hero-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.xy-hero-stat {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius-lg);
    padding: 16px 28px;
    box-shadow: var(--xy-shadow);
    min-width: 120px;
    transition: transform 0.2s;
}

.xy-hero-stat:hover { transform: translateY(-2px); }

.xy-hero-stat .num {
    font-size: 32px;
    font-weight: 700;
    color: var(--xy-primary);
    line-height: 1.2;
}

.xy-dev-num {
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    position: relative;
    display: inline-block;
}

.xy-hero-stat .xy-dev-num,
.xy-doc-stat-val.xy-dev-num {
    color: #0ea5e9;
    text-shadow: 0 0 12px rgba(14,165,233,0.25);
}

.xy-dev-num-active::after {
    content: '_';
    display: inline-block;
    margin-left: 1px;
    animation: xyCursorBlink 0.9s step-end infinite;
    color: #22c55e;
    font-weight: 400;
}

.xy-dev-num-done::after {
    display: none;
}

.xy-dev-num-scramble {
    color: #22d3ee !important;
    text-shadow: 0 0 10px rgba(34,211,238,0.35);
}

.xy-call-count .xy-dev-num {
    color: #059669;
    font-size: 14px;
    text-shadow: none;
}

@keyframes xyCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.xy-hero-stat .label {
    font-size: 13px;
    color: var(--xy-text-secondary);
    margin-top: 4px;
}

.xy-search-wrap {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.xy-search-wrap i {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
}

.xy-search-input {
    width: 100%;
    height: 48px;
    padding: 0 20px 0 48px;
    border: 1px solid var(--xy-border);
    border-radius: 999px;
    font-size: 15px;
    background: #fff;
    box-shadow: var(--xy-shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.xy-search-input:focus {
    outline: none;
    border-color: var(--xy-primary);
    box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

/* ========== 首页列表 ========== */
.xy-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.xy-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.xy-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.xy-filter-tab {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--xy-border);
    background: #fff;
    color: var(--xy-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.xy-filter-tab:hover,
.xy-filter-tab.active {
    border-color: var(--xy-primary);
    color: var(--xy-primary);
    background: var(--xy-primary-light);
}

.xy-sort-select {
    padding: 8px 14px;
    border: 1px solid var(--xy-border);
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: var(--xy-text);
}

.xy-sort-select:focus {
    outline: none;
    border-color: var(--xy-primary);
    box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
}

.xy-announcement {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--xy-primary-light);
    border: 1px solid #91caff;
    border-radius: var(--xy-radius);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--xy-primary);
}

.xy-api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.xy-api-card {
    background: var(--xy-card);
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius-lg);
    padding: 20px;
    box-shadow: var(--xy-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.xy-api-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--xy-shadow-lg);
    border-color: #91caff;
}

.xy-api-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.xy-api-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--xy-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xy-pin { color: #faad14; font-size: 16px; }

.xy-api-desc {
    font-size: 14px;
    color: var(--xy-text-secondary);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xy-api-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.xy-api-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

.xy-call-count {
    font-size: 13px;
    color: var(--xy-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.xy-call-count strong { color: var(--xy-text); }

/* ========== 文档页 ========== */
.xy-doc-wrap {
    padding: calc(var(--xy-nav-height) + 20px) 24px 100px;
    max-width: 960px;
    margin: 0 auto;
}

.xy-doc-hero { margin-bottom: 24px; }

.xy-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--xy-text-secondary);
    margin-bottom: 16px;
}

.xy-breadcrumb a {
    color: var(--xy-text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.xy-breadcrumb a:hover { color: var(--xy-primary); }

.xy-breadcrumb i.mdi-chevron-right { font-size: 14px; opacity: 0.5; }

.xy-doc-hero-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.xy-doc-hero-text {
    flex: 1;
    min-width: 0;
}

.xy-back-btn {
    flex-shrink: 0;
    align-self: flex-start;
    white-space: nowrap;
}

.xy-doc-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.xy-doc-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.xy-doc-desc {
    color: var(--xy-text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    max-width: 640px;
}

.xy-doc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.xy-doc-stat {
    background: var(--xy-card);
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--xy-shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.xy-doc-stat:hover {
    border-color: #91caff;
    box-shadow: var(--xy-shadow-lg);
}

.xy-doc-stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--xy-primary-light);
    color: var(--xy-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.xy-doc-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--xy-text);
    line-height: 1.2;
}

.xy-doc-stat-val-sm { font-size: 13px; font-weight: 600; line-height: 1.4; }

.xy-doc-stat-label {
    font-size: 12px;
    color: var(--xy-text-secondary);
    margin-top: 2px;
}

.xy-doc-section { margin-bottom: 20px; }

.xy-url-field { margin-bottom: 16px; }
.xy-url-field:last-child { margin-bottom: 0; }

.xy-url-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--xy-text-secondary);
    margin-bottom: 8px;
}

.xy-url-box {
    display: flex;
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid var(--xy-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.xy-url-box:hover { border-color: #91caff; }

.xy-url-box code {
    flex: 1;
    padding: 12px 14px;
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #334155;
    line-height: 1.5;
}

.xy-copy-btn {
    flex-shrink: 0;
    width: 44px;
    border: none;
    border-left: 1px solid var(--xy-border);
    background: #fff;
    color: var(--xy-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.xy-copy-btn:hover {
    background: var(--xy-primary-light);
    color: var(--xy-primary);
}

.xy-copy-btn-sm {
    width: auto;
    border: 1px solid var(--xy-border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    gap: 4px;
}

.xy-table-wrap { overflow-x: auto; border-radius: 8px; }

.xy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.xy-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--xy-text);
    border-bottom: 2px solid var(--xy-border);
    white-space: nowrap;
}

.xy-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.xy-table tbody tr:hover td { background: #fafbfc; }
.xy-table tbody tr:last-child td { border-bottom: none; }

.xy-param-name {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #0f172a;
}

.xy-type-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--xy-primary-light);
    color: var(--xy-primary);
    border-radius: 4px;
    font-size: 12px;
    font-family: ui-monospace, monospace;
}

.xy-required {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.xy-required.yes { background: #fff2f0; color: #cf1322; }
.xy-required.no { background: #f6ffed; color: #389e0d; }

.xy-cell-desc { color: var(--xy-text-secondary); line-height: 1.6; }

.xy-http-code {
    display: inline-block;
    min-width: 36px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    font-size: 13px;
}

.xy-http-code.ok { background: #f6ffed; color: #389e0d; }
.xy-http-code.err { background: #fff2f0; color: #cf1322; }
.xy-http-code.warn { background: #fffbe6; color: #d48806; }

.xy-test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.xy-form-field { margin-bottom: 16px; }

.xy-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--xy-text);
    font-family: ui-monospace, monospace;
}

.xy-required-mark { color: var(--xy-danger); margin-left: 2px; }

.xy-test-submit { margin-top: 8px; }

.xy-test-result {
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.xy-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.xy-result-header span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.xy-result-status {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.xy-result-status.ok { background: rgba(82,196,26,0.2); color: #95de64; }
.xy-result-status.err { background: rgba(255,77,79,0.2); color: #ff7875; }

.xy-result-body {
    flex: 1;
    background: #0f172a;
    overflow: auto;
    max-height: 400px;
}

.xy-result-body pre {
    margin: 0;
    padding: 16px;
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

.xy-code-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--xy-border);
    border-bottom: none;
}

.xy-code-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--xy-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.xy-code-tab:hover { color: var(--xy-primary); }

.xy-code-tab.active {
    background: #fff;
    color: var(--xy-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.xy-code-panels {
    border: 1px solid var(--xy-border);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.xy-code-panel { display: none; }
.xy-code-panel.active { display: block; }

.xy-code-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #1e293b;
    color: #64748b;
    font-size: 12px;
}

.xy-code-panel pre {
    margin: 0;
    padding: 16px 20px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    overflow-x: auto;
    max-height: 360px;
}

.xy-code-panel code { color: inherit; }

/* ========== 浮动 API 面板 ========== */
.xy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.xy-overlay.show {
    opacity: 1;
    visibility: visible;
}

.xy-fab-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
}

.xy-fab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 0 16px;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--xy-primary), #4096ff);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(22,119,255,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.xy-fab-btn i { font-size: 22px; }

.xy-fab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(22,119,255,0.45);
}

.xy-fab-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 340px;
    max-height: min(520px, calc(100vh - 120px));
    background: #fff;
    border-radius: var(--xy-radius-lg);
    box-shadow: 0 12px 48px rgba(15,23,42,0.15);
    border: 1px solid var(--xy-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.xy-fab-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.xy-fab-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--xy-border);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.xy-fab-panel-header h5 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xy-fab-panel-header h5 i { color: var(--xy-primary); }

.xy-fab-panel-header p {
    margin: 0;
    font-size: 12px;
    color: var(--xy-text-secondary);
}

.xy-fab-close {
    width: 32px; height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--xy-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.xy-fab-close:hover { background: #f1f5f9; color: var(--xy-text); }

.xy-fab-search {
    position: relative;
    padding: 10px 12px;
    border-bottom: 1px solid var(--xy-border);
}

.xy-fab-search i {
    position: absolute;
    left: 22px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
}

.xy-fab-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--xy-border);
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.xy-fab-search input:focus {
    outline: none;
    border-color: var(--xy-primary);
    background: #fff;
}

.xy-fab-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.xy-fab-item {
    display: block;
    position: relative;
    padding: 12px 36px 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--xy-text);
    transition: background 0.15s;
    margin-bottom: 2px;
}

.xy-fab-item:hover { background: var(--xy-primary-light); }

.xy-fab-item.active {
    background: var(--xy-primary-light);
    border: 1px solid #91caff;
}

.xy-fab-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.xy-fab-item-endpoint {
    font-size: 12px;
    color: var(--xy-text-secondary);
    font-family: ui-monospace, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xy-fab-item-check {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--xy-primary);
    font-size: 18px;
}

.xy-fab-empty, .xy-fab-loading {
    text-align: center;
    padding: 32px 16px;
    color: var(--xy-text-secondary);
    font-size: 13px;
}

.xy-fab-empty i {
    display: block;
    margin: 0 auto 8px;
    font-size: 28px;
    opacity: 0.5;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .xy-navbar { padding: 0 10px; }
    .xy-navbar-inner { gap: 8px; }
    .xy-brand { font-size: 0; gap: 0; min-width: 32px; }
    .xy-brand-text { display: none; }
    .xy-brand-icon { width: 32px; height: 32px; font-size: 16px; }
    .xy-nav-links {
        gap: 2px;
        flex: 1;
        justify-content: flex-start;
        mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 8px), transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 8px), transparent);
    }
    .xy-nav-link {
        padding: 7px 10px;
        font-size: 0;
        gap: 0;
    }
    .xy-nav-link span { display: none; }
    .xy-nav-link .nav-icon { font-size: 18px; margin: 0; }
    .xy-nav-right { gap: 4px; flex-shrink: 0; }
    .xy-nav-right .xy-nav-btn {
        padding: 7px 10px;
        font-size: 0;
        gap: 0;
        min-width: 34px;
    }
    .xy-nav-right .xy-nav-btn span { display: none; }
    .xy-nav-right .xy-nav-btn .nav-icon { font-size: 16px; color: inherit; }
    .xy-user-btn { font-size: 0; padding: 4px; }
    .xy-user-btn .xy-avatar { width: 28px; height: 28px; font-size: 12px; }
    .xy-user-btn .mdi-chevron-down { display: none; }

    .xy-hero {
        padding: calc(var(--xy-nav-height) + 28px) 16px 28px;
    }
    .xy-hero h1 { font-size: 26px; line-height: 1.25; }
    .xy-hero .subtitle {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.6;
        padding: 0 4px;
    }
    .xy-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 24px;
    }
    .xy-hero-stat {
        min-width: 0;
        width: auto;
        padding: 12px 8px;
    }
    .xy-hero-stat .num { font-size: 22px; }
    .xy-hero-stat .label { font-size: 11px; }

    .xy-search-wrap { max-width: none; }
    .xy-search-input { height: 44px; font-size: 14px; }

    .xy-main, .xy-doc-wrap { padding-left: 16px; padding-right: 16px; }
    .xy-main { padding-bottom: 32px; }

    .xy-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
    }
    .xy-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .xy-filter-tabs::-webkit-scrollbar { display: none; }
    .xy-filter-tab { flex-shrink: 0; }
    .xy-sort-select { width: 100%; }

    .xy-announcement {
        font-size: 13px;
        padding: 12px 14px;
        line-height: 1.55;
    }

    .xy-api-grid { grid-template-columns: 1fr; gap: 14px; }
    .xy-api-card { padding: 16px; }
    .xy-api-name { font-size: 16px; }
    .xy-api-footer {
        flex-wrap: wrap;
        gap: 10px;
    }
    .xy-api-footer .xy-btn-sm {
        margin-left: auto;
    }

    .xy-doc-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .xy-doc-hero-main {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    .xy-doc-title { font-size: 20px; }
    .xy-doc-desc { font-size: 14px; }
    .xy-back-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 36px;
    }
    .xy-back-btn span { display: none; }

    .xy-breadcrumb { font-size: 12px; margin-bottom: 12px; }
    .xy-test-grid { grid-template-columns: 1fr; }
    .xy-code-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    .xy-code-tab { flex-shrink: 0; }
    .xy-fab-panel { width: calc(100vw - 32px); right: -8px; }
    .xy-fab-wrap { right: 16px; bottom: 16px; }
    .xy-fab-label { display: none; }
    .xy-fab-btn {
        padding: 0;
        width: 52px;
        justify-content: center;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .xy-doc-stats { grid-template-columns: 1fr 1fr; }
    .xy-doc-stat { padding: 12px; gap: 10px; }
    .xy-doc-stat-icon { width: 36px; height: 36px; font-size: 18px; }
    .xy-doc-stat-val { font-size: 16px; }
}

/* 友情链接 */
.xy-links-hero { padding-bottom: 32px; }
.xy-links-main { max-width: 1100px; margin: 0 auto; padding-bottom: 48px; }
.xy-links-section { margin-bottom: 36px; }
.xy-links-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--xy-text);
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--xy-primary);
}
.xy-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.xy-link-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--xy-card);
    border: 1px solid var(--xy-border);
    border-radius: var(--xy-radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.xy-link-card:hover {
    border-color: var(--xy-primary);
    box-shadow: var(--xy-shadow);
    transform: translateY(-2px);
    color: inherit;
}
.xy-link-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--xy-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.xy-link-logo img { width: 100%; height: 100%; object-fit: cover; }
.xy-link-logo-fallback {
    font-size: 20px;
    font-weight: 700;
    color: var(--xy-primary);
}
.xy-link-body { min-width: 0; flex: 1; }
.xy-link-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.xy-link-desc { font-size: 13px; color: var(--xy-text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.xy-links-modal {
    background: var(--xy-card);
    border-radius: var(--xy-radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    border: 1px solid var(--xy-border);
}
.xy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--xy-border);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.xy-modal-header h3 { margin: 0; font-size: 18px; color: var(--xy-text); }
.xy-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--xy-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.xy-modal-close:hover {
    background: var(--xy-primary-light);
    color: var(--xy-text);
}
.xy-modal-body { padding: 20px; }
.xy-links-notice, .xy-links-site-info {
    background: var(--xy-primary-light);
    border: 1px solid rgba(22,119,255,0.12);
    border-radius: var(--xy-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--xy-text);
}
.xy-links-notice strong, .xy-links-site-info strong { color: var(--xy-text); }
.xy-links-site-info ul { margin: 8px 0 0; padding: 0; list-style: none; }
.xy-links-site-info li { margin-bottom: 4px; }
.xy-links-site-info li span { color: var(--xy-text-secondary); }
.xy-links-modal .xy-form-group { margin-bottom: 16px; }
.xy-links-modal .xy-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--xy-text);
}
.xy-links-modal .xy-form-group .required { color: var(--xy-danger); }
.xy-links-modal .xy-input,
.xy-links-modal select.xy-input,
.xy-links-modal textarea.xy-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    color: var(--xy-text);
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.xy-links-modal .xy-input::placeholder { color: #9ca3af; opacity: 1; }
.xy-links-modal select.xy-input {
    cursor: pointer;
    appearance: auto;
    color: var(--xy-text);
}
.xy-links-modal .xy-input:focus,
.xy-links-modal select.xy-input:focus,
.xy-links-modal textarea.xy-input:focus {
    outline: none;
    border-color: var(--xy-primary);
    box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
    background: #fff;
}
.xy-links-modal textarea.xy-input { resize: vertical; min-height: 88px; }
.xy-form-msg { padding: 10px 12px; border-radius: var(--xy-radius); font-size: 13px; margin-bottom: 12px; }
.xy-form-msg.success { background: #e8f5e9; color: #2e7d32; }
.xy-form-msg.error { background: #ffebee; color: #c62828; }
.xy-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
@media (max-width: 767.98px) {
    .xy-links-grid { grid-template-columns: 1fr; }
}

