/* ==========================================================================
   23Business Hub - Main Stylesheet
   Modern, Clean, Responsive Resource Portal Design
   ========================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-card: #151c2c;
    --bg-card-hover: #1e293b;
    --border-color: #243046;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --badge-bg: #1e293b;
    --badge-cat: #0284c7;
    --badge-version: #10b981;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

/* 布局容器 */
.header-container,
.content-container,
.footer-container,
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= 头部导航 ================= */
.site-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.site-branding {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.logo-accent {
    color: var(--accent);
}

.site-tagline {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-menu li a:hover {
    color: #ffffff;
}

.header-search .search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 36px 8px 16px;
    color: #fff;
    font-size: 14px;
    width: 220px;
    transition: all 0.3s ease;
}

.search-field:focus {
    width: 280px;
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-submit {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-submit:hover {
    color: var(--accent);
}

/* ================= 首页 Hero Banner ================= */
.hero-banner {
    text-align: center;
    padding: 60px 0 40px;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
}

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

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 25px;
}

.quick-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-label {
    color: var(--text-muted);
    font-size: 13px;
}

.tag-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

/* ================= 资源网格与卡片 ================= */
.section-header {
    margin: 40px 0 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

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

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #3b82f666;
}

.card-thumb-wrap {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: #0f172a;
}

.card-thumb-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-card:hover .card-thumb-img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    z-index: 2;
}

.cat-badge {
    top: 10px;
    left: 10px;
    background: var(--badge-cat);
}

.version-badge {
    top: 10px;
    right: 10px;
    background: var(--badge-version);
}

.card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    flex: 1;
}

.card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--accent);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.meta-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.btn-card-action {
    font-size: 12px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.btn-card-action:hover {
    background: var(--accent);
    color: #fff;
}

/* ================= 详情页 (Single Page) ================= */
.breadcrumbs {
    padding: 20px 0 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs span {
    color: var(--text-primary);
}

.resource-detail-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 35px;
    margin-bottom: 30px;
}

.detail-preview-box {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--border-color);
}

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

.detail-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.meta-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #0f172a;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

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

.spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight-badge {
    color: var(--badge-version);
}

.detail-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: #fff;
}

.btn-lg {
    padding: 15px 35px;
    font-size: 16px;
}

/* 详情页正文布局 */
.resource-body-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-bottom: 50px;
}

.resource-article-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
}

.content-heading {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.entry-content {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content h2, .entry-content h3 {
    color: #ffffff;
    margin: 25px 0 12px;
}

.entry-content ul, .entry-content ol {
    margin-left: 20px;
    margin-bottom: 18px;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

/* Embedded Download Mirrors Styling */
.embedded-download-box {
    margin: 30px 0;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.embedded-download-box h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-mirror-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.download-mirror-grid li {
    margin-bottom: 0 !important;
}

.download-mirror-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.download-mirror-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.download-mirror-btn .host-name {
    font-weight: 600;
}

.download-mirror-btn .icon-arrow {
    opacity: 0.6;
}

.gpl-disclaimer-box {
    background: rgba(234, 179, 8, 0.08);
    border-left: 4px solid #eab308;
    padding: 18px;
    border-radius: 4px;
    font-size: 13px;
    color: #fef08a;
    line-height: 1.6;
}

.gpl-disclaimer-box h4 {
    color: #fef08a;
    margin-bottom: 6px;
    font-size: 14px;
}

/* 侧边栏 */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.related-thumb {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #0f172a;
}

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

.related-meta h4 {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

.related-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* ================= 分页 ================= */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .page-numbers {
    display: flex;
    gap: 6px;
    list-style: none;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-wrapper .current,
.pagination-wrapper a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ================= 页脚 ================= */
.site-footer {
    background: #080c14;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-links h4,
.footer-disclaimer h4 {
    font-size: 15px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-disclaimer p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #151d2d;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ================= 移动端适配 ================= */
@media (max-width: 900px) {
    .resource-detail-header {
        grid-template-columns: 1fr;
    }
    .resource-body-layout {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}
