/* ============================================================
   VPS BOY - 共享样式表
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ─── Header ─── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span { color: var(--text); font-weight: 400; font-size: 14px; }

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all .2s;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

/* ─── Hero / Banner ─── */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    padding: 48px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 16px;
    opacity: .9;
    max-width: 700px;
    margin: 0 auto;
}

.hero .tags {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .tag {
    background: rgba(255,255,255,.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(4px);
}

/* ─── Breaking News ─── */
.breaking-news {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding: 0 20px;
}

.breaking-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breaking-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all .25s;
    cursor: pointer;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.news-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.news-card .date {
    font-size: 13px;
    color: var(--text-lighter);
}

.news-card .badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ─── AI 中转场景推荐 ─── */
.ai-relay {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

.ai-relay .section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.ai-relay .section-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.relay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.relay-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all .25s;
    border-top: 4px solid var(--primary);
}

.relay-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.relay-outbound { border-top-color: var(--primary); }
.relay-inbound  { border-top-color: var(--success); }

.relay-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.relay-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.relay-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.relay-outbound .relay-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.relay-inbound .relay-badge {
    background: #d1fae5;
    color: #065f46;
}

.relay-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.relay-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.relay-point strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.relay-point p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}

.relay-point ul {
    list-style: none;
    padding: 0;
}

.relay-point li {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.9;
    padding-left: 16px;
    position: relative;
}

.relay-point li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.relay-point a {
    font-weight: 500;
}

/* ─── Section ─── */
.section {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .left::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title .filter-tabs {
    display: flex;
    gap: 6px;
}

.section-title .filter-tabs button {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-light);
    transition: all .2s;
}

.section-title .filter-tabs button.active,
.section-title .filter-tabs button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ─── VPS Table ─── */
.vps-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--bg-card);
}

.vps-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.vps-table thead {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
}

.vps-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.vps-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    white-space: nowrap;
}

.vps-table tbody tr {
    transition: background .15s;
}

.vps-table tbody tr:hover {
    background: var(--primary-light);
}

.vps-table .vendor {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vps-table .vendor .recommend {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.vps-table .price {
    font-weight: 700;
    color: var(--danger);
    font-size: 15px;
}

.vps-table .btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
    margin-right: 4px;
}

.vps-table .btn-tutorial {
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.vps-table .btn-tutorial:hover {
    background: var(--border);
}

.vps-table .btn-detail {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.vps-table .btn-detail:hover {
    background: var(--primary-dark);
}

/* ─── Article ─── */
.article {
    max-width: 860px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    margin-bottom: 32px;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.article-meta {
    font-size: 13px;
    color: var(--text-lighter);
    display: flex;
    gap: 16px;
    align-items: center;
}

.article-body {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.8;
}

.article-body ul, .article-body ol {
    margin: 0 0 16px 20px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-body .toc {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.article-body .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-body .toc li {
    margin-bottom: 6px;
}

.article-body .toc a {
    font-size: 14px;
    color: var(--text-light);
}

.article-body .toc a:hover {
    color: var(--primary);
}

.article-body .deal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-body .deal-table thead {
    background: var(--primary);
    color: #fff;
}

.article-body .deal-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}

.article-body .deal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.article-body .deal-table tbody tr:hover {
    background: var(--primary-light);
}

.article-body .deal-table .buy-link {
    display: inline-block;
    background: var(--success);
    color: #fff;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}

.article-body .deal-table .buy-link:hover {
    background: #059669;
    transform: translateY(-1px);
}

.article-body .deal-table .price-cell {
    font-weight: 700;
    color: var(--danger);
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
}

.article-body .info-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 20px 0;
    color: #92400e;
    line-height: 1.8;
}

.article-body .info-box p { margin: 0; color: #92400e; }

.article-body code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--danger);
    font-family: 'Fira Code', 'Consolas', monospace;
}

.article-body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

/* ─── Promo Banner ─── */
.promo-banner {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 20px 28px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.promo-banner .text { flex: 1; }
.promo-banner h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.promo-banner p { font-size: 14px; opacity: .9; margin: 0; }
.promo-banner .btn {
    background: #fff;
    color: var(--accent-dark);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: all .2s;
}
.promo-banner .btn:hover { transform: scale(1.05); }

/* ─── Config Notice ─── */
.config-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.config-notice strong { font-weight: 700; }

/* ─── Footer ─── */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; font-size: 14px; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.footer-bottom .disclaimer {
    margin-top: 8px;
    font-size: 12px;
    color: #475569;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 13px;
    color: var(--text-lighter);
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 6px; }

/* ─── Guide ─── */
.guide-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.guide-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 15px;
    margin-right: 10px;
}

.guide-step h3 {
    display: inline;
    font-size: 18px;
    font-weight: 600;
}

.guide-step .vendor-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* ─── Config Field (通用代码块样式) ─── */
.config-field {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    margin: 12px 0;
    overflow-x: auto;
    line-height: 1.6;
}

.config-field .key { color: #93c5fd; }
.config-field .val { color: #fbbf24; }
.config-field .comment { color: #64748b; }

/* ─── Guide Step ─── */

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.open { display: flex; }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .article-body { padding: 20px; }
    .article-header h1 { font-size: 22px; }

    .promo-banner {
        flex-direction: column;
        text-align: center;
    }

    .vps-table { min-width: 700px; }

    .relay-grid { grid-template-columns: 1fr; }
    .relay-card { padding: 20px; }
    .relay-card-header { flex-direction: column; align-items: flex-start; }
}

/* ─── Utility ─── */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
