/* ============================================================
   源空间 zyphp.cn 全站统一样式 v2.0
   主色 #2478e8 浅蓝 | 强调 #ff6b00 橙 | 黑白灰
   圆角 8-10px | 柔和阴影 | hover 上浮 4px
   ============================================================ */

:root {
    --primary: #2478e8;
    --primary-dark: #1a5fc0;
    --primary-light: rgba(36, 120, 232, 0.08);
    --accent: #ff6b00;
    --accent-dark: #e55a00;
    --accent-light: rgba(255, 107, 0, 0.1);
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --border: #eef0f3;
    --text: #2b2f36;
    --text-sub: #8a919f;
    --text-light: #aab2bd;
    --radius: 8px;
    --radius-lg: 10px;
    --shadow: 0 2px 10px rgba(31, 45, 61, 0.06);
    --shadow-hover: 0 12px 26px rgba(36, 120, 232, 0.16);
    --shadow-lg: 0 6px 24px rgba(31, 45, 61, 0.1);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

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

img {
    border: 0;
    vertical-align: middle;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============ 顶部导航(纯白横向一行) ============ */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-menu > a,
.nav-item > a {
    display: block;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

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

.nav-menu > a.active,
.nav-item > a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.nav-item {
    position: relative;
}

.sub-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1001;
}

.nav-item:hover .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-nav a {
    display: block;
    padding: 9px 16px;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: normal;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
}

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

/* 导航右侧:搜索 + 按钮 */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 38px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.nav-search:focus-within {
    border-color: var(--primary);
    background: #fff;
}

.nav-search input {
    flex: 1;
    min-width: 0;
    width: 170px;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 14px;
    font-size: 13px;
    color: var(--text);
}

.nav-search button {
    border: none;
    background: var(--primary);
    color: #fff;
    height: 100%;
    padding: 0 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* 按钮规范 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    line-height: 1.4;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

/* 登录:白底蓝边蓝字 */
.btn-login {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-login:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* 注册:橙底白字 */
.btn-register {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

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

/* 会员中心:蓝底白字 */
.btn-vip {
    background: var(--primary);
    color: #fff;
}

.btn-vip:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* 加载更多:蓝色 */
.btn-loadmore {
    background: var(--primary);
    color: #fff;
    padding: 10px 42px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(36, 120, 232, 0.3);
}

.btn-loadmore:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

/* 移动端搜索行(默认隐藏,小屏显示) */
.nav-search-mobile {
    display: none;
}

/* 移动端导航抽屉 */
.mobile-nav {
    display: none;
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    border-bottom: 1px solid var(--border);
}

.mobile-nav.active {
    max-height: 640px;
}

.mobile-nav-item {
    border-bottom: 1px solid #f4f5f7;
}

.mobile-nav-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    font-weight: 500;
    color: var(--text);
}

.mobile-nav-item > a.active {
    color: var(--primary);
}

.mobile-sub-nav {
    background: #fafbfc;
    display: none;
}

.mobile-sub-nav.active {
    display: block;
}

.mobile-sub-nav a {
    display: block;
    padding: 11px 40px;
    font-size: 14px;
    color: var(--text-sub);
}

.mobile-sub-nav a:hover {
    color: var(--primary);
}

/* ============ 顶部轮播图 ============ */
.banner-wrap {
    margin: 20px 0 4px;
    position: relative;
}

.banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 340px;
    background: #dfe6f0;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
}

.banner-slide a {
    display: block;
    height: 100%;
}

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

.banner-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 64px 44px 36px;
    background: linear-gradient(180deg, rgba(10, 20, 35, 0) 0%, rgba(10, 20, 35, 0.74) 100%);
    color: #fff;
}

.banner-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.banner-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.banner-cta {
    display: inline-flex;
    margin-top: 14px;
    padding: 8px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.banner-dots {
    position: absolute;
    bottom: 18px;
    right: 28px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.banner-dots span {
    width: 26px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dots span.active {
    background: #fff;
    width: 34px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.banner-arrow:hover {
    background: rgba(255, 255, 255, 0.45);
}

.banner-arrow.prev {
    left: 16px;
}

.banner-arrow.next {
    right: 16px;
}

/* ============ 板块通用 ============ */
.section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 26px 30px;
    margin: 24px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* 胶囊筛选标签 */
.pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 22px;
    border-radius: 999px;
    background: #f0f2f5;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

.pill:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.pill.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(36, 120, 232, 0.3);
}

/* ============ 资源卡片 ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.card-link {
    display: block;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

/* 封面统一固定比例 */
.card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f2f5;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.card:hover .card-cover img {
    transform: scale(1.06);
}

.card-body {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

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

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-tag {
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-date {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 2px;
}

.price {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.free {
    color: #58b368;
    font-size: 12px;
    font-weight: 600;
}

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

/* 空状态 */
.empty-box {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-light);
}

.empty-box .empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

/* ============ 加载更多区 ============ */
.loadmore-wrap {
    text-align: center;
    margin-top: 26px;
}

.loadmore-wrap .btn-loadmore:disabled {
    background: #c3cad4;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ============ 分类 Tab 切换模块 ============ */
.tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 4px;
}

.tab-item {
    padding: 9px 30px;
    border-radius: 999px;
    background: #f0f2f5;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.tab-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.tab-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(36, 120, 232, 0.32);
}

.tab-content {
    min-height: 320px;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.tab-content.loading {
    opacity: 0.35;
}

/* ============ 登录提示栏 ============ */
.login-tip {
    background: linear-gradient(90deg, rgba(36, 120, 232, 0.06), rgba(255, 107, 0, 0.06));
    border: 1px solid rgba(36, 120, 232, 0.15);
    border-radius: var(--radius);
    padding: 18px 26px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.login-tip-text {
    font-size: 14px;
    color: var(--text);
}

.login-tip-text strong {
    color: var(--primary);
}

/* ============ 面包屑 ============ */
.breadcrumb {
    background: #fff;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
}

.breadcrumb a {
    color: var(--text-sub);
}

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

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

/* ============ 分类页 ============ */
.category-header {
    background: #fff;
    padding: 28px 30px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.category-stats {
    color: var(--text-sub);
    font-size: 13px;
}

.sub-category-bar {
    background: #fff;
    padding: 14px 30px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sub-category-bar .label {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
}

.sub-category-bar a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: #f0f2f5;
    color: var(--text-sub);
    font-size: 13px;
    transition: all 0.2s;
}

.sub-category-bar a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sub-category-bar a.active {
    background: var(--primary);
    color: #fff;
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-sub);
    font-size: 13px;
    transition: all 0.2s;
}

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

.pagination span.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* ============ 详情页 ============ */
.detail-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.detail-main {
    flex: 1;
    min-width: 0;
}

.detail-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}

.article-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.article-header .article-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-light);
    font-size: 13px;
}

.article-content {
    display: flex;
    gap: 24px;
}

.content-left {
    flex-shrink: 0;
    width: 320px;
}

.preview-box {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fafbfc;
}

.preview-image {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.content-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-header {
    background: linear-gradient(90deg, rgba(36, 120, 232, 0.08), rgba(36, 120, 232, 0.03));
    border: 1px solid rgba(36, 120, 232, 0.18);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.download-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.download-info {
    font-size: 13px;
    color: var(--text-sub);
}

.resource-info {
    background: #fafbfc;
    border-radius: var(--radius);
    padding: 14px 18px;
}

.info-row {
    display: flex;
    padding: 6px 0;
    font-size: 14px;
}

.info-label {
    color: var(--text-light);
    width: 88px;
    flex-shrink: 0;
}

.info-value {
    color: var(--text);
}

.warning-box {
    background: var(--accent-light);
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: #b3540a;
}

.download-buttons {
    margin-top: 4px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 5px 16px rgba(255, 107, 0, 0.3);
}

.download-btn:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
}

.article-section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.section-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.8;
    word-break: break-word;
}

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

/* 详情侧栏 */
.detail-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
    align-self: flex-start;
}

.sidebar-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.sidebar-card .card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid var(--primary);
    min-height: auto;
}

.sidebar-card .card-title .refresh-btn {
    font-size: 11px;
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: auto;
    cursor: pointer;
}

.rand-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rand-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

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

.rand-item .thumb {
    width: 64px;
    height: 46px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f2f5;
    flex-shrink: 0;
}

.rand-item .info {
    flex: 1;
    min-width: 0;
}

.rand-item .info .title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.rand-item .info .meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    color: var(--text-light);
}

.rand-item .info .meta .tag {
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tags a {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f0f2f5;
    color: var(--text-sub);
    transition: all 0.2s;
}

.sidebar-tags a:hover {
    background: var(--primary);
    color: #fff;
}

/* ============ 页脚 ============ */
.footer {
    background: #fff;
    border-top: 1px solid var(--border);
    color: var(--text-sub);
    padding: 36px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

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

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

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

/* ============ 登录弹窗 ============ */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 30, 45, 0.55);
}

.auth-modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 380px;
    padding: 30px 30px 25px;
    box-shadow: 0 14px 48px rgba(20, 30, 45, 0.25);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.auth-modal-close:hover {
    color: var(--text);
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-sub);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.auth-form-group {
    margin-bottom: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafbfc;
}

.auth-form-group input:focus {
    border-color: var(--primary);
    background: #fff;
}

.auth-error {
    color: #f56c6c;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 10px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.auth-btn:disabled {
    background: #c3cad4;
    cursor: not-allowed;
}

.auth-links {
    text-align: right;
    margin-top: 12px;
}

.auth-links a {
    color: var(--primary);
    font-size: 13px;
}

/* ============ 响应式 ============ */
/* 平板:3 列 */
@media (max-width: 1100px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .nav-search input {
        width: 120px;
    }
}

/* 手机:2 列,导航折叠 */
@media (max-width: 900px) {
    .header-inner {
        height: 56px;
        gap: 12px;
    }

    .nav-menu,
    .header-right .nav-search,
    .header-right .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav {
        display: block;
    }

    /* 搜索移到导航第二行 */
    .nav-search-mobile {
        display: block;
        padding: 10px 15px;
        background: #fff;
        border-bottom: 1px solid var(--border);
    }

    .nav-search-mobile .nav-search {
        width: 100%;
    }

    .nav-search-mobile .nav-search input {
        width: auto;
        flex: 1;
    }

    .section {
        padding: 20px 16px 24px;
        margin: 16px 0;
    }

    .detail-layout {
        flex-direction: column;
    }

    .detail-sidebar {
        width: 100%;
        position: static;
    }

    .article-content {
        flex-direction: column;
    }

    .content-left {
        width: 100%;
    }

    .detail-container {
        padding: 18px 16px;
    }
}

/* 手机:文章一行 2 个 */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .banner {
        height: 190px;
    }

    .banner-title {
        font-size: 17px;
    }

    .banner-overlay {
        padding: 32px 18px 16px;
    }

    .banner-sub {
        font-size: 12px;
    }

    .banner-cta {
        margin-top: 8px;
        padding: 5px 16px;
        font-size: 12px;
    }

    .banner-dots {
        right: 12px;
        bottom: 10px;
    }

    .banner-arrow {
        display: none;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .card-body {
        padding: 10px 10px 11px;
        gap: 6px;
    }

    .card-title {
        font-size: 12px;
        min-height: 34px;
    }

    .card-tag {
        font-size: 10px;
        padding: 1px 6px;
    }

    .card-date,
    .views {
        font-size: 11px;
    }

    .price {
        font-size: 13px;
    }

    .section-title {
        font-size: 17px;
    }

    .pill {
        padding: 6px 16px;
        font-size: 12px;
    }

    .tab-item {
        padding: 8px 20px;
        font-size: 13px;
    }

    .article-header .article-title {
        font-size: 19px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 12px;
        font-size: 12px;
    }

    .footer-links {
        gap: 14px;
    }
}
