/* ============================================================
   SSL证书检测网站 - 样式表
   配色：绿色主调，浅色背景，卡片式布局
   ============================================================ */

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

:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #d1fae5;
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --header-gradient: linear-gradient(135deg, #064e3b 0%, #059669 50%, #10b981 100%);
    --hero-gradient: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
    background: var(--header-gradient);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.logo:hover {
    color: #fff;
    opacity: 0.9;
}

.logo-icon {
    font-size: 24px;
}

.top-nav {
    display: flex;
    gap: 24px;
}

.top-nav a {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.top-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

/* ============================================================
   搜索区域 (Hero)
   ============================================================ */
.hero {
    background: var(--hero-gradient);
    padding: 48px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.search-form {
    max-width: 760px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-icon {
    padding: 0 16px;
    font-size: 20px;
    color: var(--text-light);
}

.search-box input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 15px;
    color: var(--text);
    background: transparent;
    min-width: 120px;
}

.search-box input::placeholder {
    color: #9ca3af;
}

/* 端口选择 */
.port-select {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 10px;
    border-left: 1px solid var(--border);
    white-space: nowrap;
}

.port-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.port-input {
    width: 62px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    outline: none;
    color: var(--text);
}

.port-input:focus {
    border-color: var(--primary);
}

.btn-search {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: var(--primary-dark);
}

.my-ip {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.my-ip .ip-link {
    font-weight: 600;
    font-size: 15px;
}

/* ============================================================
   主内容区
   ============================================================ */
.main-content {
    padding: 32px 20px;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-title {
    background: #f8fafc;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-icon {
    font-size: 20px;
}

.more-link {
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   剩余天数 颜色等级
   ============================================================ */
.day-good {
    color: #059669;
}

.day-ok {
    color: #2563eb;
}

.day-warn {
    color: #d97706;
}

.day-bad {
    color: #dc2626;
}

.latency-result {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-weight: 700;
    font-size: 18px;
}

.latency-text {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-weight: 600;
}

/* ============================================================
   详情页
   ============================================================ */
.detail-section {
    margin-bottom: 24px;
}

.result-summary {
    background: #fff;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 2;
}

.result-label {
    color: var(--text-light);
}

.result-ip {
    font-weight: 700;
    font-size: 16px;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.result-sep {
    color: var(--border);
    margin: 0 8px;
}

.result-location {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 16px;
}

.detail-card {
    margin-bottom: 16px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 12px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.detail-table th {
    width: 140px;
    background: #f9fafb;
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}

.san-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-copy {
    padding: 16px 24px;
    background: #f8fafc;
}

.btn-copy {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--primary-dark);
}

.location-desc-card {
    padding-bottom: 20px;
}

.location-desc-card h3 {
    padding: 16px 24px 8px;
    font-size: 16px;
    color: var(--text);
}

.location-line {
    padding: 0 24px 12px;
    line-height: 2;
    font-size: 15px;
}

.seo-text {
    padding: 0 24px;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.8;
}

/* ============================================================
   记录表格
   ============================================================ */
.records-table {
    width: 100%;
    border-collapse: collapse;
}

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

.records-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.records-table tr:last-child td {
    border-bottom: none;
}

.records-table tr:hover td {
    background: #f9fafb;
}

.records-table .empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.ip-link {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-weight: 600;
}

.table-pair {
    padding: 16px 24px;
    overflow-x: auto;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

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

.badge-green {
    background: #dbeafe;
    color: #1d4ed8;
}

/* ============================================================
   最热门记录 - 网格布局
   ============================================================ */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 20px;
}

.popular-item {
    display: block;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: all 0.2s;
}

.popular-item:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.popular-ip {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary-dark);
    margin-bottom: 6px;
    word-break: break-all;
}

.popular-location {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.4;
}

.popular-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.popular-stats .stat {
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* ============================================================
   最近查询域名列表
   ============================================================ */
.ip-list {
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ip-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 13px;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    color: var(--text);
    transition: all 0.2s;
}

.ip-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============================================================
   友情链接
   ============================================================ */
.links-list {
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-tag {
    display: inline-block;
    padding: 6px 16px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.link-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============================================================
   文章模块
   ============================================================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 20px 24px;
}

.article-item {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}

.article-item:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.article-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #e5e7eb;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.article-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 12px;
    color: var(--text-light);
}

/* 文章详情页 */
.article-detail {
    padding: 0 0 28px;
}

.article-detail-title {
    font-size: 24px;
    font-weight: 700;
    padding: 24px 24px 8px;
    line-height: 1.4;
}

.article-detail-meta {
    padding: 0 24px 16px;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.article-detail-img {
    padding: 20px 24px 0;
}

.article-detail-img img {
    max-width: 100%;
    max-height: 420px;
    border-radius: var(--radius);
    display: block;
}

.article-detail-content {
    padding: 20px 24px;
    font-size: 15px;
    line-height: 2;
    color: #374151;
    word-break: break-word;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
}

.article-detail-content table {
    border-collapse: collapse;
    max-width: 100%;
}

.article-detail-content td,
.article-detail-content th {
    border: 1px solid var(--border);
    padding: 6px 12px;
}

.article-detail-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding: 4px 12px;
    margin: 12px 0;
    color: var(--text-light);
    background: #f9fafb;
}

.article-prevnext {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px 20px;
}

.pn-item {
    flex: 1;
    max-width: 46%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f9fafb;
    text-decoration: none;
    overflow: hidden;
}

.pn-item.pn-next {
    text-align: right;
    align-items: flex-end;
}

.pn-label {
    font-size: 12px;
    color: var(--text-light);
}

.pn-title {
    font-style: normal;
    font-size: 14px;
    color: var(--primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

.pn-item.pn-disabled {
    opacity: 0.55;
    cursor: default;
}

.pn-item.pn-disabled .pn-title {
    color: var(--text-light);
}

.article-detail-back {
    padding: 0 24px;
}

.top-nav a.active-nav {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

/* ============================================================
   SSL证书服务商模块
   ============================================================ */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    padding: 20px 24px;
}

.provider-grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.provider-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s;
}

.provider-item:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.provider-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px;
    flex-shrink: 0;
}

.provider-logo-lg {
    width: 64px;
    height: 64px;
}

.provider-logo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.provider-name-box {
    min-width: 0;
}

.provider-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.provider-name-lg {
    font-size: 26px;
}

.provider-alias {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

.provider-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.type-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.provider-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.provider-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
}

.provider-meta span {
    background: #fff;
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 10px;
}

/* SSL证书服务商模块 - 首页LOGO一排四个 */
.provider-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 20px 24px;
}

.provider-logo-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: all 0.2s;
}

.provider-logo-cell:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.provider-logo-cell-img {
    width: auto;
    max-width: 100%;
    height: 48px;
}

.provider-logo-cell-text {
    width: 48px;
    height: 48px;
    font-size: 22px;
}

/* 签名算法模块 - 首页 */
.algo-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 20px 24px;
}

.algo-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: all 0.2s;
    min-width: 0;
}

.algo-chip:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.algo-chip-cat {
    flex-shrink: 0;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.algo-chip-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.algo-chip-hash {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-light);
    background: #fff;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .algo-chips {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px 16px;
    }
}

/* 首页签发机构模块 */
.issuer-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 20px 24px;
}

.issuer-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: all 0.2s;
    min-width: 0;
}

.issuer-chip:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.issuer-chip-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 800;
}

.issuer-chip-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.issuer-chip-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issuer-chip-alias {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issuer-chip-count {
    align-self: flex-start;
    margin-top: 2px;
    font-size: 11px;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 1px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .issuer-chips {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px 16px;
    }
}

/* 服务商列表页头部 */
.providers-page-head {
    padding: 28px 24px;
    text-align: center;
}

.providers-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.providers-page-sub {
    font-size: 14px;
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 服务商详情页 */
.provider-detail-head {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.provider-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-back-ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-back-ghost:hover {
    background: var(--primary-light);
}

.provider-text {
    padding: 16px 24px 20px;
    font-size: 15px;
    line-height: 2;
    color: #374151;
    word-break: break-word;
}

.provider-text ul,
.provider-text ol {
    padding-left: 24px;
}

.provider-text p {
    margin-bottom: 10px;
}

.provider-detail-back {
    padding: 16px 24px;
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 12px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    min-width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.page-info {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ============================================================
   关于区域
   ============================================================ */
.about-section {
    margin-top: 0;
}

.about-content {
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
}

.about-content p {
    margin-bottom: 12px;
}

.about-content ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.about-content ol li {
    margin-bottom: 6px;
}

/* ============================================================
   错误卡片
   ============================================================ */
.error-card {
    padding: 32px;
    text-align: center;
}

.error-card h3 {
    font-size: 20px;
    color: #dc2626;
    margin-bottom: 12px;
}

.error-card p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.btn-back {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--primary-dark);
}

/* ============================================================
   最近查询卡片
   ============================================================ */
.recent-queries-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.recent-queries-card .section-title {
    background: #f8fafc;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 20px;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    margin-top: 40px;
}

.site-footer a {
    color: #d1d5db;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer p {
    margin-bottom: 6px;
}

.site-footer .copyright {
    font-size: 13px;
    color: #6b7280;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .site-header .container {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 8px;
    }

    .top-nav {
        gap: 12px;
    }

    .hero {
        padding: 32px 0 28px;
    }

    .hero-title {
        font-size: 22px;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius);
    }

    .search-box input[type="text"] {
        width: 100%;
        padding: 12px 16px;
    }

    .search-icon {
        display: none;
    }

    .port-select {
        border-left: none;
        padding: 8px 12px;
        width: 100%;
        justify-content: center;
    }

    .btn-search {
        width: 100%;
        padding: 12px;
    }

    .my-ip {
        flex-direction: column;
        gap: 8px;
    }

    .detail-table th {
        width: 100px;
    }

    .detail-table th,
    .detail-table td {
        padding: 10px 12px;
        font-size: 14px;
    }

    .records-table {
        display: block;
        overflow-x: auto;
    }

    .records-table th,
    .records-table td {
        font-size: 13px;
        padding: 8px 10px;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    .provider-logos {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-title {
        font-size: 15px;
        padding: 12px 16px;
    }

    .about-content,
    .ip-list,
    .popular-grid,
    .table-pair,
    .article-grid {
        padding: 16px;
    }
}

/* ============================================================
   问答 (Ask) 模块
   ============================================================ */
.ask-post-btn {
    display: inline-block;
    margin-top: 12px;
}

.ask-list {
    display: flex;
    flex-direction: column;
}

.ask-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f3;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.ask-item:hover {
    background: #f7f9fc;
}

.ask-item:last-child {
    border-bottom: none;
}

.ask-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ask-item-title:hover {
    color: #2f6fed;
}

.ask-item-content {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ask-item-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ask-form-tip {
    font-size: 13px;
    color: #888;
    padding: 0 18px 6px;
    line-height: 1.6;
}

.ask-tip {
    margin: 12px 18px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.7;
}

.ask-tip a {
    color: #2f6fed;
    font-weight: 600;
}

.alert-success {
    background: #e8f7ef;
    border: 1px solid #b8e6cd;
    color: #1c7a43;
}

.alert-error {
    background: #fdeeee;
    border: 1px solid #f3c2c2;
    color: #c0392b;
}

.ask-form {
    padding: 0 18px 20px;
}

.ask-form-row {
    margin-bottom: 16px;
}

.ask-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ask-form-row input[type="text"],
.ask-form-row input[type="number"],
.ask-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4d8e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.ask-form-row input[type="text"]:focus,
.ask-form-row input[type="number"]:focus,
.ask-form-row textarea:focus {
    border-color: #2f6fed;
}

.ask-form-row textarea {
    resize: vertical;
    line-height: 1.6;
}

.ask-form-row .btn-search {
    margin-right: 12px;
}

.ask-question-title {
    font-size: 20px;
    color: #1a1a2e;
    padding: 18px 18px 6px;
}

.ask-question-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #999;
    padding: 0 18px 10px;
    border-bottom: 1px solid #eef0f3;
}

.ask-question-content {
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.answer-item {
    padding: 16px 18px;
    border-bottom: 1px solid #eef0f3;
}

.answer-item:last-child {
    border-bottom: none;
}

.answer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.answer-author {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.answer-date {
    font-size: 12px;
    color: #999;
}

.answer-best {
    font-size: 12px;
    color: #c07b00;
    background: #fff7e0;
    border: 1px solid #f0d28a;
    padding: 2px 8px;
    border-radius: 10px;
}

.answer-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

/* 后台问答状态徽标 (admin.css 未覆盖, 在此补充) */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.status-0 {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #f0d28a;
}

.status-1 {
    background: #d4edda;
    color: #155724;
    border: 1px solid #b8e6cd;
}

.status-2 {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f3c2c2;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 18px 12px;
}

.filter-tab {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    color: #666;
    background: #f0f2f5;
    border: 1px solid #e2e6ec;
    transition: background 0.2s, color 0.2s;
}

.filter-tab:hover {
    background: #e2e8f5;
    color: #2f6fed;
}

.filter-tab.active {
    background: #2f6fed;
    color: #fff;
    border-color: #2f6fed;
}

.form-tip {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.text-muted {
    color: #999;
}
