/* ============================================================
   Domain Marketplace - 前台样式
   响应式 + 暗黑模式
============================================================ */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f1f5f9;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-muted: #6b7280;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.04);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.10);
}
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-soft: #334155;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.2);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    transition: background-color .2s, color .2s;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }

/* ============================================================
   头部导航
============================================================ */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo img { height: 36px; width: auto; }
.logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff; display: grid; place-items: center;
    font-size: 22px; font-weight: bold;
}
.logo-text strong { display: block; font-size: 16px; line-height: 1.2; }
.logo-text small { color: var(--text-muted); font-size: 11px; }

.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: background .15s;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-mini {
    display: flex;
    background: var(--bg-soft);
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
}
.search-mini input {
    border: 0; padding: 0 12px; background: transparent;
    color: var(--text); width: 180px; outline: none; font-size: 13px;
}
.search-mini button {
    border: 0; background: transparent; color: var(--text-muted);
    padding: 0 10px; cursor: pointer;
}
.search-mini button:hover { color: var(--primary); }

.theme-toggle {
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.theme-toggle:hover { color: var(--primary); text-decoration: none; }
.theme-toggle .icon { margin-right: 0; }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-login-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}
.btn-login-icon .icon { margin-right: 0; }

[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: none; }

/* ============================================================
   首页 · 顶部专业面板
============================================================ */
.section-home-top {
    padding-top: 20px;
    padding-bottom: 8px;
}
.home-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.home-panel-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px 28px;
    padding: 28px 28px 22px;
    border-bottom: 1px solid var(--border);
}
.home-intro { flex: 1; min-width: 240px; max-width: 640px; }
.home-title {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.25;
}
.home-lead {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}
.home-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.btn-home-primary,
.btn-home-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-home-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.btn-home-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}
.btn-home-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-home-ghost:hover {
    background: var(--bg-soft);
    text-decoration: none;
}

/* 统计：扁平分隔，中性配色 */
.home-statbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.home-stat-item {
    padding: 18px 16px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.home-stat-item:last-child { border-right: 0; }
.home-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.home-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* 分类导航 */
.home-categories {
    padding: 14px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.home-categories-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.category-pills-inline {
    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 8px;
}
.category-pills-inline a {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}
.category-pills-inline a .pill-count {
    opacity: .65;
    font-size: 11px;
    margin-left: 4px;
}

/* 底部：展示切换 */
.home-panel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.home-footer-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.5;
}

.view-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.view-toolbar-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 4px;
}
.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.view-btn:hover {
    background: var(--bg-soft);
    color: var(--text);
}
.view-btn.is-active {
    border-color: var(--primary);
    background: rgba(59,130,246,.08);
    color: var(--primary);
    font-weight: 600;
}
.view-btn span { line-height: 1; }

@media (max-width: 768px) {
    .home-panel-main { padding: 22px 18px 18px; }
    .home-statbar { grid-template-columns: repeat(2, 1fr); }
    .home-stat-item { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .home-stat-item:nth-child(2n) { border-right: 0; }
    .home-stat-item:nth-last-child(-n+2) { border-bottom: 0; }
    .home-categories { flex-direction: column; align-items: stretch; }
    .category-pills-inline { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .home-panel-footer { flex-direction: column; align-items: stretch; }
    .view-toolbar { justify-content: flex-end; }
    .view-btn span { display: none; }
}

/* 域名列表根（网格 / 列表） */
:is(#home-domain-root, #search-domain-root)[data-view="list"] .home-domain-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 20px;
    row-gap: 6px;
    padding: 14px 18px;
    border-radius: 0;
    margin: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    transform: none !important;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .home-domain-grid .domain-card:first-of-type {
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .home-domain-grid .domain-card:last-of-type {
    border-radius: 0 0 var(--radius) var(--radius);
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card:hover {
    box-shadow: none;
    background: var(--bg-soft);
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .badge-row {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 2px;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .name {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    font-size: 17px;
    align-self: center;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .desc {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    min-height: 0;
    font-size: 12.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .price-row {
    grid-column: 2;
    grid-row: 2 / 4;
    border: 0;
    padding: 0;
    margin: 0;
    align-self: center;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .price {
    font-size: 18px;
}
:is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .meta {
    font-size: 11px;
}

@media (max-width: 560px) {
    :is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .name,
    :is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .desc {
        grid-row: auto;
    }
    :is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    :is(#home-domain-root, #search-domain-root)[data-view="list"] .domain-card .price-row {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed var(--border);
    }
}

/* 通用图标 */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-primary { color: var(--primary); }
.icon-warning { color: var(--warning); }
.icon-success { color: var(--success); }
.icon-danger  { color: var(--danger); }
h2 .icon, h3 .icon { vertical-align: -3px; margin-right: 4px; }
button .icon, .btn-primary .icon, .btn-secondary .icon, a .icon { vertical-align: -2px; margin-right: 4px; }
.badge .icon { vertical-align: -1px; margin-right: 2px; }
[data-theme="light"] #theme-toggle .icon-moon,
[data-theme="dark"]  #theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: inline-flex; }

/* ============================================================
   首页 · 介绍板块
============================================================ */
.section-title-center { justify-content: center; text-align: center; }
.section-title-center > div { width: 100%; }
.section-title-center h2 { font-size: 28px; }
.section-title-center p { font-size: 14px; }

/* 服务介绍 */
.section-features { background: var(--bg-soft); margin-top: 30px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.feature-icon {
    width: 54px; height: 54px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(139,92,246,.12));
    color: var(--primary);
    display: grid; place-items: center;
}
.feature-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.feature-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.65;
}

/* 交易流程 */
.section-process { padding-top: 60px; }
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    position: relative;
}
.process-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    position: relative;
    overflow: hidden;
}
.step-num {
    position: absolute;
    top: 16px; right: 18px;
    font-size: 32px;
    font-weight: 800;
    color: var(--bg-soft);
    line-height: 1;
    letter-spacing: -1px;
}
[data-theme="dark"] .step-num { color: rgba(255,255,255,.06); }
.step-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(59,130,246,.1);
    color: var(--primary);
    display: grid; place-items: center;
    margin-bottom: 14px;
}
.process-step h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}
.process-step p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* 近期成交 */
.section-sold { background: var(--bg-soft); }
.sold-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.sold-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    text-decoration: none;
    color: var(--text);
    transition: transform .2s, box-shadow .2s;
    display: block;
}
.sold-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.sold-item .sold-name {
    font-size: 16px;
    font-weight: 700;
    word-break: break-all;
    margin-bottom: 6px;
}
.sold-item .sold-price {
    color: var(--success);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.sold-item .sold-cat {
    color: var(--text-muted);
    font-size: 12px;
}

/* CTA 双卡 */
.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.cta-card {
    border-radius: var(--radius);
    padding: 36px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
    position: relative;
}
.cta-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 60%, #8b5cf6 100%);
}
.cta-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
}
.cta-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}
.cta-card p {
    margin: 0 0 18px;
    opacity: .85;
    font-size: 14px;
    line-height: 1.6;
    max-width: 380px;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 7px;
    font-weight: 550;
    font-size: 13px;
    text-decoration: none;
}
.btn-cta:hover { background: #f8fafc; text-decoration: none; }
.btn-cta-light {
    background: rgba(255,255,255,.12);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
}
.btn-cta-light:hover { background: rgba(255,255,255,.2); }
.cta-icon { opacity: .25; flex-shrink: 0; }

/* 常见问题 */
.section-faq { padding-bottom: 60px; }
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 22px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 22px; top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform .2s;
}
.faq-item[open] summary::after {
    content: '−';
    color: var(--primary);
}
.faq-item p {
    margin: 0;
    padding: 0 22px 18px;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .cta-grid { grid-template-columns: 1fr; }
    .cta-icon { display: none; }
    .cta-card { padding: 28px; }
    .cta-card h3 { font-size: 19px; }
    .faq-grid { grid-template-columns: 1fr; }
    .section-title-center h2 { font-size: 22px; }
}

/* ============================================================
   Section
============================================================ */
.section { padding: 50px 0; }
.section-title {
    display: flex; justify-content: space-between; align-items: end;
    margin-bottom: 24px; flex-wrap: wrap; gap: 10px;
}
.section-title h2 { margin: 0; font-size: 24px; font-weight: 700; }
.section-title p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.section-title a { font-size: 13px; }

/* ============================================================
   筛选栏
============================================================ */
.filter-bar {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow);
    display: flex; gap: 14px; flex-wrap: wrap; align-items: end;
    margin-bottom: 24px;
}
.filter-bar .field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1; }
.filter-bar label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.filter-bar input, .filter-bar select {
    border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 11px; font-size: 14px; background: var(--bg);
    color: var(--text); outline: none;
}
.filter-bar input:focus, .filter-bar select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.search-filter-bar .field label,
.search-filter-bar .btn-primary,
.search-filter-bar button[type="submit"] {
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary); color: #fff; border: 0;
    padding: 8px 16px; border-radius: 7px; font-size: 13px;
    cursor: pointer; font-weight: 600;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
    background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
    padding: 8px 14px; border-radius: 7px; font-size: 13px;
    cursor: pointer; text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover { background: var(--border); text-decoration: none; }

/* ============================================================
   域名卡片网格
============================================================ */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.domain-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    position: relative; display: flex; flex-direction: column;
    border: 1px solid var(--border);
}
.domain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.domain-card .badge-row { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.domain-card .name {
    font-size: 22px; font-weight: 700; word-break: break-all;
    margin: 0 0 6px; color: var(--text);
}
.domain-card .name .tld { color: var(--primary); }
.domain-card .desc { color: var(--text-muted); font-size: 13px; min-height: 38px; margin: 0 0 16px; }
.domain-card .price-row {
    display: flex; justify-content: space-between; align-items: end;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
}
.domain-card .price {
    color: var(--primary); font-size: 22px; font-weight: 700;
    line-height: 1; display: flex; align-items: baseline;
}
.domain-card .price small { font-size: 12px; color: var(--text-muted); margin-left: 6px; font-weight: normal; }
.domain-card .meta { font-size: 12px; color: var(--text-muted); }
.domain-card a.cover-link { position: absolute; inset: 0; border-radius: var(--radius); }
.more-card {
    text-decoration: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    border-style: dashed;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
}
.more-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
    text-decoration: none;
}
.more-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(59,130,246,.12);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.more-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}
.more-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}
/* 徽标 */
.badge {
    display: inline-block; padding: 3px 9px;
    font-size: 11px; border-radius: 999px; font-weight: 600;
    line-height: 1.4;
}
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,.12);  color: var(--danger); }
.badge-muted   { background: var(--bg-soft);       color: var(--text-muted); }
.badge-primary { background: rgba(59,130,246,.12); color: var(--primary); }
.badge-featured {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

/* ============================================================
   分类标签
============================================================ */
.category-pills {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}
.category-pills a {
    padding: 7px 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 999px;
    color: var(--text); font-size: 13px; text-decoration: none;
}
.category-pills a:hover, .category-pills a.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
    text-decoration: none;
}

/* ============================================================
   分页
============================================================ */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.page {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); background: var(--bg-card);
    text-decoration: none; font-size: 14px; min-width: 40px; text-align: center;
}
.page:hover { background: var(--bg-soft); text-decoration: none; }
.page.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page.disabled { opacity: .45; pointer-events: none; }

/* ============================================================
   域名详情页
============================================================ */
.detail-page { padding-top: 24px; }

/* 面包屑 */
.crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}
.crumbs a {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    text-decoration: none;
}
.crumbs a:hover { color: var(--primary); text-decoration: none; }
.crumbs-sep { color: var(--text-muted); opacity: .5; }
.crumbs-current { color: var(--text); font-weight: 500; }

/* Hero */
.dom-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 32px 0;
    margin-bottom: 22px;
    overflow: hidden;
}
.dom-hero-main { padding-bottom: 24px; }
.dom-hero .meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.dom-name {
    margin: 0 0 12px;
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-all;
    color: var(--text);
}
.dom-name-main { color: var(--text); }
.dom-name-tld { color: var(--primary); }
.dom-desc {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-muted);
}
.dom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 7px;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-soft:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

/* Hero 内嵌指标条 */
.dom-quickstats {
    list-style: none;
    margin: 0 -32px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}
.dom-quickstats li {
    padding: 16px 18px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dom-quickstats li:last-child { border-right: 0; }
.qs-label {
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}
.qs-value {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.qs-tld { color: var(--primary); }
.qs-date { font-size: 15px; }

/* 主体双栏 */
.dom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: flex-start;
}
.dom-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dom-side { min-width: 0; }
.side-sticky {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 通用卡片 */
.card, .side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-head, .side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
}
.card-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.side-card-head h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}
.card-head-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* 域名信息 dl */
.info-list { margin: 0; padding: 4px 22px 8px; }
.info-list > div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list dt {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}
.info-list dd {
    margin: 0;
    font-size: 14px;
    color: var(--text);
    word-break: break-word;
}
.info-list dd .muted { font-size: 12.5px; }
.kw-chip {
    display: inline-block;
    padding: 2px 9px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 4px 4px 0;
}

/* Whois */
.whois-box { padding: 14px 22px 18px; }
.whois-box summary {
    list-style: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--primary);
    padding: 6px 0;
    user-select: none;
}
.whois-box summary::-webkit-details-marker { display: none; }
.whois-box summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform .15s;
    margin-right: 4px;
}
.whois-box[open] summary::before { transform: rotate(90deg); }
.whois-pre {
    margin: 10px 0 0;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 320px;
    overflow: auto;
}

/* 询价表单 */
.inquiry-form { padding: 18px 22px 22px; }
.inquiry-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.inquiry-form .form-group { margin-bottom: 14px; }
.inquiry-form .req { color: var(--danger); margin-left: 2px; }
.input-prefix {
    position: relative;
    display: flex;
    align-items: stretch;
}
.input-prefix span {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    color: var(--text-muted);
    font-size: 14px;
}
.input-prefix input {
    border-radius: 0 8px 8px 0 !important;
    flex: 1;
    min-width: 0;
}
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* 价格卡 */
.price-card {
    padding: 0;
    background: var(--bg-card);
}
.price-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}
.price-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}
.price-amount {
    padding: 22px 20px 4px;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.price-currency {
    padding: 0 20px 18px;
    font-size: 12px;
    color: var(--text-muted);
}
.price-card .btn-primary {
    margin: 0 20px;
    width: calc(100% - 40px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-block { width: 100%; }
.btn-lg { padding: 10px 18px; font-size: 14px; }

.price-perks {
    list-style: none;
    margin: 16px 0 0;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.price-perks li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.price-perks li .icon { color: var(--success); }

/* 联系卡 */
.contact-list {
    list-style: none;
    margin: 0;
    padding: 6px 20px 14px;
}
.contact-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    min-height: 36px;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .lbl {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.contact-list strong, .contact-list a {
    color: var(--text);
    word-break: break-all;
    text-align: right;
}
.contact-list a:hover { color: var(--primary); }
.contact-empty {
    flex-direction: row;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.6;
}
.copy-btn {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text);
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}
.copy-btn:hover {
    border-style: solid;
    border-color: var(--primary);
    color: var(--primary);
}

/* 安全提示 */
.tips-list {
    margin: 0;
    padding: 12px 20px 18px 36px;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.7;
}
.tips-list li { margin-bottom: 4px; }

/* 相似域名 */
.similar-section .section-title h2 { font-size: 22px; }
.similar-section .section-title p { font-size: 13px; }

/* 暗黑下提升对比 */
[data-theme="dark"] .dom-hero,
[data-theme="dark"] .card,
[data-theme="dark"] .side-card { background: var(--bg-card); }
[data-theme="dark"] .price-card-head,
[data-theme="dark"] .dom-quickstats { background: rgba(255,255,255,.03); }

@media (max-width: 960px) {
    .dom-grid { grid-template-columns: 1fr; }
    .side-sticky { position: static; }
    .dom-hero { padding: 24px 22px 0; }
    .dom-quickstats { margin: 0 -22px; }
    .info-list { padding: 4px 18px 8px; }
    .inquiry-form { padding: 16px 18px 18px; }
}
@media (max-width: 600px) {
    .dom-quickstats { grid-template-columns: repeat(2, 1fr); }
    .dom-quickstats li {
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }
    .dom-quickstats li:nth-child(2n) { border-right: 0; }
    .dom-quickstats li:nth-last-child(-n+2) { border-bottom: 0; }
    .info-list > div { grid-template-columns: 96px 1fr; gap: 10px; }
    .inquiry-form .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   表单
============================================================ */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; background: var(--bg);
    color: var(--text); font-family: inherit; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.form-group textarea { min-height: 90px; resize: vertical; }

/* ============================================================
   提示
============================================================ */
.alert { padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-size: 14px; }
.alert-info    { background: rgba(59,130,246,.12); color: var(--primary); border: 1px solid rgba(59,130,246,.3); }
.alert-success { background: rgba(16,185,129,.12); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.alert-error   { background: rgba(239,68,68,.12);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.alert-warning { background: rgba(245,158,11,.12); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }

/* ============================================================
   Footer
============================================================ */
.site-footer {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
    border-top: 1px solid var(--border);
    margin-top: 50px; padding: 42px 0 20px; color: var(--text-muted);
    font-size: 13px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 30px; margin-bottom: 24px;
}
.footer-brand p { margin: 0 0 8px; line-height: 1.75; }
.footer-quick-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-quick-nav > a {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1;
}
.footer-quick-nav > a:hover {
    color: var(--primary);
    border-color: var(--primary);
    text-decoration: none;
}
.footer-nav-more {
    position: relative;
}
.footer-nav-more summary {
    list-style: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.footer-nav-more summary::-webkit-details-marker { display: none; }
.footer-nav-more[open] summary,
.footer-nav-more summary:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.footer-nav-pop {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    z-index: 5;
}
.footer-nav-pop a {
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
}
.footer-nav-pop a:hover {
    background: var(--bg-soft);
    color: var(--primary);
    text-decoration: none;
}
.footer-contact p {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-grid h4 { color: var(--text); margin: 0 0 12px; font-size: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px dashed var(--border);
    padding-top: 16px; text-align: center; font-size: 12px;
    display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}

/* ============================================================
   响应式
============================================================ */
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .main-nav a { padding: 8px 12px; }
    .header-actions {
        margin-left: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }
    .search-mini input { width: 130px; }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .domain-detail .name { font-size: 28px; }
    .domain-detail { padding: 24px; }

    .search-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }
    .search-filter-bar .field {
        min-width: 140px;
        flex: 0 0 auto;
    }
    .search-filter-bar .field[style*="flex: 0"] {
        min-width: auto;
    }
}
@media (max-width: 560px) {
    .container { padding: 0 14px; }
    .section { padding: 34px 0; }
    .domain-grid { grid-template-columns: 1fr; }
    .filter-bar {
        padding: 12px;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .filter-bar .field {
        width: auto;
        min-width: 130px;
        flex: 0 0 auto;
    }
    .filter-bar .field[style*="flex: 0"] { min-width: auto; }
    .filter-bar .btn-primary,
    .filter-bar button[type="submit"] {
        width: auto;
        white-space: nowrap;
    }

    .home-panel-main { padding: 18px 14px 14px; }
    .home-intro { min-width: 0; }
    .home-title { font-size: 22px; }
    .home-panel-actions { width: 100%; }
    .home-panel-actions .btn-home-primary,
    .home-panel-actions .btn-home-ghost {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    .search-mini {
        flex: 1;
        min-width: 0;
    }
    .search-mini input { width: 100%; }
    .btn-ghost { padding: 7px 10px; }

    .dom-hero { padding: 18px 14px 0; }
    .dom-quickstats { margin: 0 -14px; }
    .dom-actions .btn-soft {
        flex: 1 1 100%;
        justify-content: center;
    }
}
