/* 全局样式 */
:root {
    --primary-color: #0b5cff;
    --primary-hover: #0046d1;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-color: #f5f7fa;
    --bg-card: #ffffff;
    --border-color: #e4e7ed;
    --tag-bg: #e1ecff;
    --tag-text: #0b5cff;
}

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

body {
    font-family:
        "Microsoft YaHei",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s;
}

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

ul {
    list-style: none;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

img {
    max-width: 100%;
    display: block;
}

/* 顶部导航 */
.header {
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    background: #2c3e50;
    color: #fff;
    font-size: 12px;
    padding: 5px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
}
.top-bar a {
    color: #ecf0f1;
    margin-left: 15px;
}

.top-bar-links {
    display: flex;
    align-items: center;
}

.nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo span {
    color: #2c3e50;
    font-size: 14px;
    border-left: 1px solid #ccc;
    padding-left: 10px;
}

.logo-mark {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.logo-mark img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}
.nav-links a {
    font-size: 16px;
    font-weight: 500;
}
.nav-links a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.search-box {
    display: flex;
    align-items: center;
}
.search-box input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
}
.search-box button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 40px 0 20px;
    margin-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 15px;
}
.footer-col a {
    color: #bdc3c7;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}
.footer-col a:hover {
    color: #fff;
}

.footer-text {
    color: #bdc3c7;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 12px;
}

.footer-bottom a {
    color: #bdc3c7;
}

/* 按钮与通用标签 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff !important;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn:hover {
    background: var(--primary-hover);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color) !important;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: #fff !important;
}

.tag {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
    margin-right: 5px;
}
.tag.supply {
    background: #e8f5e9;
    color: #2e7d32;
}
.tag.demand {
    background: #fff3e0;
    color: #ef6c00;
}

/* 首页独有样式 */
.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 20px 0;
}
.hero-main {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    min-height: 350px;
}
.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-main h1 {
    font-size: 32px;
    margin-bottom: 15px;
}
.hero-main p {
    color: var(--text-muted);
    margin-bottom: 20px;
}
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hero-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    border-top: 3px solid var(--primary-color);
}
.hero-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
}
.hero-card ul li {
    margin-bottom: 8px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}
.section-title h2 {
    font-size: 20px;
}

.section-title-compact {
    margin-top: 0;
}

.section-more {
    font-size: 14px;
    color: #7f8c8d;
}

.content-section {
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.info-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.info-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.info-cover {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 14px;
    background: #eef2f7;
}

.info-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-item p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.info-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #95a5a6;
}

.showcase-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.showcase-feature {
    background: linear-gradient(135deg, #0b5cff 0%, #163b8f 100%);
    border-radius: 8px;
    padding: 32px;
    color: #fff;
    box-shadow: 0 14px 30px rgba(11, 92, 255, 0.18);
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    margin-bottom: 18px;
}

.showcase-feature h3 {
    font-size: 28px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.showcase-feature h3 a,
.showcase-feature h3 a:hover {
    color: #fff;
}

.showcase-feature p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.74);
    margin-bottom: 24px;
}

.showcase-feature .btn-outline {
    border-color: rgba(255, 255, 255, 0.48);
    color: #fff !important;
}

.showcase-feature .btn-outline:hover {
    background: #fff;
    color: var(--primary-color) !important;
}

.showcase-side {
    display: grid;
    gap: 14px;
}

.bulletin-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.bulletin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cddcff;
}

.bulletin-label {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: #edf3ff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
}

.bulletin-body {
    min-width: 0;
}

.bulletin-body h3 {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 6px;
}

.bulletin-body p {
    font-size: 13px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-list {
    position: relative;
    padding-left: 24px;
}

.stream-list::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dce7ff;
}

.stream-item {
    position: relative;
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.stream-item:last-child {
    margin-bottom: 0;
}

.stream-item::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 5px #edf3ff;
}

.stream-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 2px;
}

.stream-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px 20px;
}

.stream-content h3 {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.stream-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #95a5a6;
}

.matrix-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.matrix-row {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) 1fr 1.2fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.matrix-row:last-child {
    border-bottom: none;
}

.matrix-head {
    background: #f7faff;
    color: #6a7b92;
    font-size: 13px;
    font-weight: 600;
}

.matrix-table a.matrix-row:hover {
    background: #f9fbff;
    color: inherit;
}

.matrix-cell {
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.matrix-cell-title {
    font-weight: 600;
}

/* 列表页独有样式 */
.page-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    margin: 20px 0;
}
.sidebar {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    align-self: start;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group h4 {
    margin-bottom: 10px;
    font-size: 15px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}
.filter-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
}
.filter-group label input {
    margin-right: 8px;
}

.side-link,
.mini-link {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8fafc;
}

.side-link.active,
.side-link:hover,
.mini-link:hover {
    background: #eaf1ff;
    color: var(--primary-color);
}

.side-link-accent {
    background: var(--primary-color);
    color: #fff;
}

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

.list-content {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
}
.list-item {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    gap: 20px;
}
.list-item:last-child {
    border-bottom: none;
}
.list-item-img {
    width: 160px;
    height: 120px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.list-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.list-item-info h2 {
    font-size: 18px;
    margin-bottom: 8px;
}
.list-item-desc {
    font-size: 14px;
    color: var(--text-muted);
    flex: 1;
}
.list-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}
.price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination span,
.pagination a {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
}
.pagination span.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination-wrap {
    margin-top: 30px;
}

.pagination-wrap .pagination,
.pagination-wrap ul.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
}

.pagination-wrap .pagination li,
.pagination-wrap ul.pagination li {
    list-style: none;
}

.pagination-wrap .pagination a,
.pagination-wrap .pagination span,
.pagination-wrap ul.pagination a,
.pagination-wrap ul.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.pagination-wrap .pagination .active span,
.pagination-wrap ul.pagination .active span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 详情页样式 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-muted);
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary-color);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}
.detail-main {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
}
.detail-header {
    margin-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 20px;
}
.detail-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
}
.detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 20px;
}
.detail-content {
    font-size: 16px;
    line-height: 1.8;
}
.detail-content h3 {
    margin: 25px 0 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}
.detail-content p {
    margin-bottom: 15px;
}

.detail-banner {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #f5f7fa;
}

.detail-summary {
    background: #f8fbff;
    border-left: 4px solid var(--primary-color);
    padding: 16px 18px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.spec-table th,
.spec-table td {
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    text-align: left;
    font-size: 14px;
}
.spec-table th {
    background: #f8f9fa;
    width: 150px;
}

.detail-sidebar .contact-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    border-top: 4px solid #e74c3c;
}
.contact-card h3 {
    margin-bottom: 15px;
    font-size: 18px;
}
.contact-info p {
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}
.contact-info strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.contact-info span {
    display: block;
    color: var(--text-main);
    word-break: break-all;
}

.contact-qrcode img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}

.btn-large {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 20px;
}

/* 登录/注册页样式 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.auth-shell {
    padding: 40px 0 60px;
}

.auth-card {
    background: var(--bg-card);
    width: 450px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.auth-card-wide {
    width: 620px;
}

.auth-intro {
    text-align: center;
    color: var(--text-muted);
    margin: -10px 0 24px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-main);
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}
.form-group input:focus {
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.captcha-group {
    margin-bottom: 24px;
}

.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-row img {
    width: 126px;
    height: 46px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}

.agreement {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 1240px) {
    .container {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .nav-main {
        flex-wrap: wrap;
        height: auto;
        padding: 18px 0;
        gap: 16px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        gap: 18px;
    }

    .hero,
    .page-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .showcase-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .top-bar .container,
    .info-meta,
    .list-item-footer,
    .footer-bottom,
    .showcase-meta,
    .stream-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box,
    .search-box input,
    .search-box button {
        width: 100%;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input,
    .search-box button {
        border-radius: 4px;
    }

    .info-grid,
    .footer-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .showcase-feature {
        padding: 24px 22px;
    }

    .showcase-feature h3 {
        font-size: 22px;
    }

    .bulletin-item {
        flex-direction: column;
    }

    .stream-list {
        padding-left: 18px;
    }

    .stream-list::before {
        left: 8px;
    }

    .stream-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stream-item::before {
        left: -14px;
        top: 42px;
    }

    .matrix-head {
        display: none;
    }

    .matrix-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px 16px;
    }

    .matrix-cell {
        white-space: normal;
    }

    .list-item {
        flex-direction: column;
    }

    .list-item-img {
        width: 100%;
        height: 220px;
    }

    .auth-card,
    .auth-card-wide {
        width: 100%;
        padding: 28px 22px;
    }

    .captcha-row {
        flex-direction: column;
    }

    .captcha-row img {
        width: 100%;
        height: 52px;
    }
}
