:root {
    --primary:       #2b7de9;
    --primary-dark:  #1e5fc2;
    --primary-light: #e8f0fe;
    --accent:        #10b981;
    --warn:          #f59e0b;
    --bg:            #f7f9fc;
    --bg-card:       #ffffff;
    --text:          #1e293b;
    --text-2:        #64748b;
    --text-3:        #94a3b8;
    --border:        #e2e8f0;
    --border-light:  #f1f5f9;
    --radius:        10px;
    --radius-sm:     6px;
    --shadow-sm:     0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
    --shadow-md:     0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ============ 顶部 Header ============ */
.web3-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.web3-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}
.web3-header-logo img {
    height: 36px;
    width: auto;
    display: block;
}
.web3-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}
.web3-nav-link {
    font-size: 13px;
    color: var(--text-2);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}
.web3-nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.web3-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.web3-header-welcome {
    font-size: 13px;
    color: var(--text-2);
}
.web3-header-welcome a {
    font-weight: 600;
    color: var(--primary);
}
.web3-header-btn {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.web3-header-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.web3-header-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.web3-header-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

/* ============ 容器 ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============ 卡片 ============ */
.web3-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s, border-color .25s, transform .25s;
}
.web3-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

/* 区块标题 */
.web3-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.web3-section-title h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.web3-section-title h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}
.web3-more {
    color: var(--text-3);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.web3-more:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ============ 双栏 Grid ============ */
.web3-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

/* ============ 栏目两列 ============ */
.web3-grid-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

/* ============ 列表项 ============ */
.web3-list-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    gap: 10px;
    transition: background .2s;
}
.web3-list-item + .web3-list-item {
    border-top: 1px solid var(--border-light);
}
.web3-list-item:hover {
    background: var(--primary-light);
}
.web3-list-item .icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.web3-list-item a {
    flex: 1;
    color: var(--text);
    font-size: 13px;
}
.web3-list-item a:hover { color: var(--primary); }
.web3-list-item .date {
    color: var(--text-3);
    font-size: 12px;
    flex-shrink: 0;
}
.web3-new-tag {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ============ 登录框 ============ */
.web3-login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.web3-login-box h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.web3-login-box h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
}
.web3-login-form { padding-top: 2px; }
.web3-login-info { padding: 2px 0; }
.web3-login-val {
    flex: 1;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.web3-login-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ============ 表单 ============ */
.web3-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.web3-form-row:last-child { margin-bottom: 0; }
.web3-form-row label {
    min-width: 56px;
    font-size: 13px;
    color: var(--text-2);
    flex-shrink: 0;
    text-align: right;
}
.web3-input {
    flex: 1;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: all .2s;
}
.web3-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43,125,233,0.12);
}
.web3-input::placeholder { color: var(--text-3); }

/* ============ 按钮 ============ */
.web3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: var(--primary);
    color: #fff;
}
.web3-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(43,125,233,0.3);
}
.web3-btn-full {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 9px 0;
}
.web3-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}
.web3-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============ 详情页 ============ */
.web3-detail { max-width: 800px; margin: 0 auto; }
.web3-detail h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
}
.web3-detail-meta {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 18px;
    padding: 10px 0;
}
.web3-detail-meta dt {
    color: var(--text-3);
    font-size: 13px;
    text-align: right;
}
.web3-detail-meta dd {
    color: var(--text);
    font-size: 13px;
    word-break: break-all;
}

/* ============ 面包屑 ============ */
.web3-breadcrumb {
    padding: 10px 16px;
    font-size: 13px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    color: var(--text-2);
}
.web3-breadcrumb a { color: var(--text-2); }
.web3-breadcrumb a:hover { color: var(--primary); }
.web3-breadcrumb .sep { margin: 0 8px; color: var(--text-3); }

/* ============ 侧边栏 ============ */
.web3-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}
.web3-sidebar h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 16px 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
.web3-sidebar a {
    display: block;
    padding: 8px 16px;
    color: var(--text-2);
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all .2s;
}
.web3-sidebar a:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
}

/* ============ 两栏布局 ============ */
.web3-layout-2col {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

/* ============ 分页 ============ */
.web3-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.web3-pagination a,
.web3-pagination span {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.web3-pagination a {
    color: var(--text-2);
    border: 1px solid var(--border);
    background: #fff;
    transition: all .2s;
}
.web3-pagination a:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.web3-pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.web3-pagination .info {
    color: var(--text-3);
    font-size: 12px;
    border: none;
}

/* ============ 登录/注册大页 ============ */
.web3-auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.web3-auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: 0 8px 30px rgba(15,23,42,0.08);
}
.web3-auth-box h1 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 28px;
}

/* ============ 状态 ============ */
.web3-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.web3-tag-success {
    background: rgba(16,185,129,0.1);
    color: var(--accent);
}
.web3-tag-warn {
    background: rgba(245,158,11,0.1);
    color: var(--warn);
}

/* ============ 页脚 ============ */
.web3-footer {
    margin-top: 40px;
    padding: 24px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    border-top: 1px solid var(--border);
    background: #fff;
}
.web3-footer a { color: var(--text-2); }
.web3-footer a:hover { color: var(--primary); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .web3-grid { grid-template-columns: 1fr; }
    .web3-grid-cats { grid-template-columns: 1fr; }
    .web3-layout-2col { grid-template-columns: 1fr; }
    .web3-form-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .web3-form-row label { text-align: left; width: auto; }
    .web3-header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
    .web3-nav-links { order: 3; width: 100%; flex-wrap: wrap; }
    .web3-header-logo img { height: 30px; }
}
