/* ===== 基础变量 ===== */
:root {
    --primary: #1890ff;
    --primary-hover: #40a9ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --bg-body: #f5f5f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-muted: #8c8c8c;
    --border-color: #f0f0f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

/* 浙行小游戏 LOGO 专用样式（仅作用于顶部导航栏） */
.header .game-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    position: relative;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    white-space: nowrap;
}

.header .logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
}

.header .logo-icon::before,
.header .logo-icon::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

.header .logo-icon::before {
    width: 5px;
    height: 5px;
    top: 6px;
    left: 6px;
}

.header .logo-icon::after {
    width: 7px;
    height: 7px;
    bottom: 5px;
    right: 5px;
    box-shadow: -12px 0 0 #fff;
}

.header .logo-text {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.header .logo-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 50%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: lightFlow 3s linear infinite;
    pointer-events: none;
}

@keyframes lightFlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 弹窗LOGO样式 */
.modal-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 20px;
}

.modal-brand-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
}

.modal-brand-logo .logo-icon::before,
.modal-brand-logo .logo-icon::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

.modal-brand-logo .logo-icon::before {
    width: 6px;
    height: 6px;
    top: 8px;
    left: 8px;
}

.modal-brand-logo .logo-icon::after {
    width: 9px;
    height: 9px;
    bottom: 6px;
    right: 6px;
    box-shadow: -15px 0 0 #fff;
}

.modal-brand-logo .logo-text {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.modal-brand-logo .logo-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 50%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: lightFlow 3s linear infinite;
    pointer-events: none;
}

/* 注册弹窗LOGO样式（与参考图一致） */
.modal-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.modal-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
}
.modal-brand .logo-icon::before,
.modal-brand .logo-icon::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 50%;
}
.modal-brand .logo-icon::before {
    width: 6px;
    height: 6px;
    top: 8px;
    left: 8px;
}
.modal-brand .logo-icon::after {
    width: 10px;
    height: 10px;
    bottom: 6px;
    right: 6px;
    box-shadow: -14px 0 0 #fff;
}
.modal-brand .logo-text {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 20px;
    font-weight: 900;
}

[data-theme="dark"] {
    --bg-body: #141414;
    --bg-card: #1f1f1f;
    --bg-sidebar: #1f1f1f;
    --text-primary: #e8e8e8;
    --text-secondary: #a6a6a6;
    --text-muted: #737373;
    --border-color: #303030;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

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

/* ===== 顶部导航 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1003;
    transition: background 0.3s, border-color 0.3s;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.menu-btn:hover {
    background: var(--bg-body);
}

.menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: background 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-center {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    white-space: nowrap;
}

.logo img {
    width: 32px;
    height: 32px;
}

/* 覆盖旧的 .logo 文字颜色，让渐变生效 */
.logo .logo-text {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #7b2cbf 70%, #c850c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.logo .logo-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 50%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: lightFlow 3s linear infinite;
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

/* ===== 新版搜索栏 ===== */

/* 收起状态 */
.header-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.header-collapsed.hidden {
    display: none;
}



/* 搜索栏主体 */
.header-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 4px 0 12px;
    max-width: 100%;
    margin: 0 0 16px 0;
    position: relative;
}

/* 分类选择 */
.header-search-category-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    flex-shrink: 0;
}

.header-search-category-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    user-select: none;
}

.header-search-category-arrow {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.header-search-category-wrap:hover .header-search-category-arrow {
    transform: rotate(180deg);
}

/* 分类下拉菜单 */
.header-category-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: none;
    z-index: 1001;
}

.header-category-dropdown.active {
    display: block;
    animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-category-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.header-category-item:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.header-category-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* 分隔线 */
.header-search-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

/* 搜索输入框 */
.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
    height: 100%;
    padding: 0;
}

.header-search-input::placeholder {
    color: var(--text-muted);
}

/* 搜索提交按钮 */
.header-search-submit {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    flex-shrink: 0;
    transition: all 0.2s;
}

.header-search-submit:hover {
    background: var(--bg-card);
    color: var(--primary);
}

.header-search-submit svg {
    width: 18px;
    height: 18px;
}

/* 关闭按钮 */
.header-search-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    flex-shrink: 0;
    transition: all 0.2s;
}

.header-search-close-btn:hover {
    background: var(--bg-body);
}

.header-search-close-btn svg {
    width: 20px;
    height: 20px;
}

/* 搜索按钮（收起状态） */
.search-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    background: none;
    border: none;
}

.search-btn:hover {
    background: var(--bg-body);
    color: var(--primary);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== 搜索展开面板（悬浮覆盖） ===== */
.header-search-panel {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 999;
    padding: 16px;
}

.header-search-panel.active {
    display: block;
    animation: panelFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-search-panel-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.header-search-section {
    margin-bottom: 16px;
}

.header-search-section:last-child {
    margin-bottom: 0;
}

.header-search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-search-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-search-clear {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    transition: all 0.2s;
}

.header-search-clear:hover {
    background: var(--bg-body);
    color: var(--text-secondary);
}

.header-search-clear svg {
    width: 16px;
    height: 16px;
}

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

.header-search-tag {
    padding: 6px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

.search-btn:hover, .theme-btn:hover {
    background: var(--bg-body);
    color: var(--primary);
}

/* ===== 侧边栏 ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 280px;
    height: calc(100vh - 56px);
    background: var(--bg-sidebar);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s, background 0.3s;
    overflow-y: auto;
    padding: 16px;
}

.sidebar.active {
    transform: translateX(0);
}



/* ===== 新版侧边栏样式（参考浙行小游戏） ===== */

/* 导航菜单 */
.sidebar-nav {
    margin-bottom: 16px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.sidebar-nav-red {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
}

.sidebar-nav-gray {
    background: linear-gradient(135deg, #595959, #8c8c8c);
}

.sidebar-nav-purple {
    background: linear-gradient(135deg, #722ed1, #b37feb);
}

.sidebar-nav-blue {
    background: linear-gradient(135deg, #1890ff, #69c0ff);
}

.sidebar-nav-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-nav-text {
    flex: 1;
}

.sidebar-nav-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
}

/* 用户卡片 */
.sidebar-user-card {
    background: var(--bg-body);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-user-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-user-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.sidebar-user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.sidebar-user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-top-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-user-nickname {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.sidebar-user-level-tag {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #faad14, #ff9c07);
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.4;
    flex-shrink: 0;
}

.sidebar-user-bio {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-user-notify {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
}

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

.sidebar-user-notify svg {
    width: 18px;
    height: 18px;
}

.notify-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #ff4d4f;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

/* VIP信息 */
.sidebar-vip-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sidebar-vip-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #722ed1;
}

.sidebar-vip-tag svg {
    width: 14px;
    height: 14px;
    fill: #722ed1;
}

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

/* 签到按钮 */
.sidebar-checkin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: linear-gradient(135deg, #faad14, #ff9c07);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-checkin-btn:hover {
    background: linear-gradient(135deg, #ffc53d, #ffa940);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 173, 20, 0.3);
}

.sidebar-checkin-btn:disabled {
    background: linear-gradient(135deg, #d9d9d9, #bfbfbf);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sidebar-checkin-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-checkin-text {
    font-size: 13px;
    font-weight: 500;
}

/* 侧边栏官方认证大V标识 */
.sidebar-verify-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #ff4d4f;
    border-radius: 50%;
    line-height: 1;
    z-index: 2;
    border: 1px solid #fff;
}

/* 新版统计栏 */
.sidebar-stats-new {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border-radius: 12px;
    padding: 12px 0;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-stat-box {
    flex: 1;
    text-align: center;
}

.sidebar-stat-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.sidebar-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.sidebar-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* 新版操作按钮 */
.sidebar-actions-new {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.sidebar-action-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.sidebar-action-new:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.sidebar-action-icon-new {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-action-icon-new svg {
    width: 20px;
    height: 20px;
}

.sidebar-action-new span {
    font-size: 12px;
    font-weight: 500;
}

/* 登录/注册/找回密码 */
.sidebar-auth {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
}

.sidebar-auth-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
    text-decoration: none;
}

.sidebar-auth-item:hover {
    color: var(--text-primary);
}

.sidebar-auth-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
}

.sidebar-auth-icon.icon-green {
    background: #f6ffed;
    color: #52c41a;
}

.sidebar-auth-icon.icon-purple {
    background: #f9f0ff;
    color: #722ed1;
}

.sidebar-auth-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 主内容区 ===== */
.main-content {
    margin-top: 56px;
    padding: 16px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 分类标题 & 公告栏 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ===== 公告轮播栏 ===== */
.announcement-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 24px;
    overflow: hidden;
}

.announcement-bar::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.announcement-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.announcement-wrap {
    flex: 1;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
}

.announcement-item {
    display: block;
    height: 24px;
    line-height: 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.2s;
}

.announcement-item:hover {
    color: var(--primary);
}

/* 排序标签 */
.sort-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sort-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.sort-tab:hover {
    background: var(--bg-card);
    color: var(--primary);
}

.sort-tab.active {
    background: var(--primary);
    color: #fff;
}

/* 资源卡片网格 */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .resource-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.resource-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

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

.resource-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.resource-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.pinned-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.access-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.access-badge.free { background: #52c41a; color: #fff; }
.access-badge.paid { background: #ff4d4f; color: #fff; }

.resource-info {
    padding: 12px;
}

.resource-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.resource-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.resource-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.resource-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 分类标签 */
.category-tag {
    display: inline;
    font-size: 10px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #1890ff;
    line-height: 1;
    vertical-align: baseline;
    box-sizing: content-box;
}

/* 资源卡片属性标签 */
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.resource-tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    line-height: 1.2;
    padding: 1px 4px;
    margin: 0;
    border: none;
    border-radius: 2px;
    background: #4facfe;
    color: #fff;
    white-space: nowrap;
    box-sizing: content-box;
}

/* ===== 详情页 ===== */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.1;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 4px;
    line-height: 1.0;
}

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

.detail-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 8px;
    margin-top: 8px;
}

.detail-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.detail-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.detail-author-name {
    font-weight: 500;
    font-size: 14px;
}

.detail-author-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.detail-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* 付费区域 */
.pay-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px dashed var(--border-color);
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff1f0;
    color: #ff4d4f;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.pay-price {
    font-size: 32px;
    font-weight: 700;
    color: #ff4d4f;
    margin-bottom: 8px;
}

.pay-price .currency {
    font-size: 18px;
}

.pay-original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 16px;
}

.pay-vip-prices {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pay-vip-price {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pay-vip-price .icon {
    color: #faad14;
}

.pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* 内容区域 */
.content-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.content-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.content-body {
    line-height: 1.8;
    color: var(--text-secondary);
}

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

.content-hidden {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.content-hidden-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ===== 详情页新样式（参考图1:1复刻） ===== */

/* 作者信息区域 */
.detail-author-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.detail-author-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-author-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-author-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
}

.detail-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.detail-author-verify {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    z-index: 2;
    line-height: 1;
}

.detail-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-author-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-author-lv {
    background: #ff9500;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1;
}

.detail-author-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.detail-author-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-views-inline {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-views-inline .icon-view {
    font-style: normal;
}

.detail-follow-btn {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.detail-follow-btn:hover {
    opacity: 0.9;
}

/* 数据统计 */
.detail-stats-new {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.detail-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-stat-item i {
    font-style: normal;
}

/* 卡密展示区域 */
.card-key-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card-key-header {
    margin-bottom: 12px;
}

.card-key-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.card-key-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.card-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.card-key-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.card-key-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 1px;
}

.card-key-copy {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.card-key-copy:hover {
    opacity: 0.9;
}

.card-key-download {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.card-key-download:hover {
    opacity: 0.9;
}

.card-key-tip {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* 付费区域新样式 */
.pay-section-new {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px 16px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.pay-header {
    margin-bottom: 10px;
}

.pay-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ff9500, #ff6b35);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.pay-tag::before {
    content: "🔒";
    font-size: 10px;
}

.pay-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.pay-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.pay-price-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.pay-currency {
    font-size: 14px;
    color: #ff4d6d;
    font-weight: 600;
}

.pay-price-num {
    font-size: 32px;
    font-weight: 700;
    color: #ff4d6d;
    line-height: 1;
}

.pay-original-new {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.pay-promo-tag {
    background: linear-gradient(135deg, #ff4d6d, #ff6b9d);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.pay-vip-bar {
    display: flex;
    background: var(--bg-body);
    border-radius: 6px;
    padding: 8px 0;
    margin-bottom: 12px;
}

.pay-vip-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pay-vip-item:first-child {
    border-right: 1px solid var(--border-color);
}

.vip-icon {
    font-size: 12px;
}

.pay-btn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.pay-btn-download {
    flex: 1;
    height: 36px;
    line-height: 36px;
    padding: 0;
    background: #4facfe;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.pay-btn-download:hover {
    opacity: 0.9;
}

.pay-btn-new {
    flex: 1;
    height: 36px;
    line-height: 36px;
    padding: 0;
    background: #ff4757;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
}

.pay-btn-new:hover {
    opacity: 0.9;
}

.pay-btn-login {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pay-btn-login:hover {
    opacity: 0.9;
}

/* 版本介绍 */
.version-section {
    margin-bottom: 10px;
}

.version-title {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.0;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.version-item {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.0;
}

/* 游戏图片 */
.game-images-section {
    margin-bottom: 10px;
}

.game-images-title {
    font-size: 17px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 4px;
    padding-left: 10px;
    border-left: 3px solid #1890ff;
    line-height: 1.0;
}

.game-images-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-image-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.game-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 版权免责声明 */
.disclaimer-section {
    background: #fff8f0;
    border: 1px dashed #ff6b35;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.disclaimer-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffd8b8, #ffc4a3);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.disclaimer-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #ff6b35;
    line-height: 1.6;
}

.disclaimer-num {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #1890ff;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* THE END */
.the-end-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 0;
}

.the-end-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
    max-width: 100px;
}

.the-end-text {
    font-size: 14px;
    color: #ccc;
}

/* 安装脚本 */
.install-section {
    margin-bottom: 20px;
}

.install-title {
    font-size: 17px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid #1890ff;
}

.install-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.install-content p {
    margin-bottom: 10px;
}

/* 隐藏内容新样式 */
.content-hidden-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 1px dashed #1890ff;
    border-radius: 8px;
    background: #f0f9ff;
    color: #1890ff;
    font-size: 14px;
}

.hidden-icon {
    font-size: 16px;
}

.hidden-text {
    color: #1890ff;
}

/* 注意提示 */
.notice-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.notice-icon {
    font-size: 14px;
}

.notice-text {
    color: #ff6b35;
}

/* ===== 游戏图片 ===== */
.game-images-section {
    margin-bottom: 20px;
}

.game-images-title {
    font-size: 17px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid #1890ff;
}

.game-images-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-image-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.game-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 版权免责声明 ===== */
.disclaimer-section {
    background: #fff8f0;
    border: 1px dashed #ff6b35;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.disclaimer-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffd8b8, #ffc4a3);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.disclaimer-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #ff6b35;
    line-height: 1.6;
}

.disclaimer-num {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #1890ff;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* ===== 文章底部 ===== */
.article-footer {
    text-align: center;
    padding: 24px 0;
    margin-bottom: 24px;
}

.the-end {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 16px;
    position: relative;
}

.the-end::before,
.the-end::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 1px;
    background: #e0e0e0;
}

.the-end::before {
    left: 20%;
}

.the-end::after {
    right: 20%;
}

.article-category {
    margin-bottom: 16px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f7ff;
    color: #1890ff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
}

.article-share {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}

.article-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-secondary);
}

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

.action-text {
    font-size: 12px;
}

/* ===== 相关推荐 ===== */
.related-section {
    margin-bottom: 24px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.related-thumb-placeholder {
    font-size: 32px;
}

.related-info {
    padding: 10px;
}

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

.related-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.related-price {
    color: #ff4d6d;
    font-weight: 600;
}

.related-views {
    color: var(--text-muted);
}

.related-empty {
    grid-column: span 2;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 20px;
    color: var(--text-muted);
    background: none;
    border: none;
}

.modal-close:hover {
    background: var(--bg-body);
}

.modal-body {
    padding: 20px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.form-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-links {
    display: flex;
    gap: 8px;
    color: var(--primary);
}

.form-links a:hover {
    text-decoration: underline;
}

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

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

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

.form-footer a:hover {
    text-decoration: underline;
}

/* ===== 注册弹窗专用样式（对齐图一登录弹窗） ===== */
.modal-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.modal-brand svg {
    width: 48px;
    height: 48px;
}

.modal-brand-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-title-line {
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-subtitle a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.form-group-password {
    position: relative;
}

.form-group-password .form-input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.form-btn-gradient {
    background: linear-gradient(135deg, #40a9ff, #1890ff);
    border-radius: 24px;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
}

.form-btn-gradient:hover {
    background: linear-gradient(135deg, #69c0ff, #40a9ff);
}

.form-btn-green {
    background: linear-gradient(135deg, #73d13d, #52c41a);
    border-radius: 24px;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.form-btn-green:hover {
    background: linear-gradient(135deg, #95de64, #73d13d);
}

.form-btn-green::before {
    content: "👤";
    font-size: 14px;
}

/* 注册弹窗专用样式 */
.register-modal {
    max-width: 340px !important;
}

.register-modal .modal-brand {
    margin-bottom: 12px;
}

.register-modal .modal-brand .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.register-modal .modal-brand .logo-icon::before {
    width: 8px;
    height: 8px;
    top: 10px;
    left: 10px;
}

.register-modal .modal-brand .logo-icon::after {
    width: 12px;
    height: 12px;
    bottom: 8px;
    right: 8px;
    box-shadow: -18px 0 0 #fff;
}

.register-modal .modal-brand .logo-text {
    font-size: 22px;
    font-weight: 900;
}

.register-input {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 8px;
}

/* 登录/注册弹窗共用样式 */
.auth-modal {
    max-width: 340px !important;
}

.auth-modal .modal-brand {
    margin-bottom: 12px;
}

.auth-modal .modal-brand .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.auth-modal .modal-brand .logo-icon::before {
    width: 8px;
    height: 8px;
    top: 10px;
    left: 10px;
}

.auth-modal .modal-brand .logo-icon::after {
    width: 12px;
    height: 12px;
    bottom: 8px;
    right: 8px;
    box-shadow: -18px 0 0 #fff;
}

.auth-modal .modal-brand .logo-text {
    font-size: 22px;
    font-weight: 900;
}

.auth-input {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 8px;
}

.form-btn-login {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 24px;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.form-btn-login:hover {
    background: linear-gradient(135deg, #69c0ff, #40a9ff);
}

.form-btn-login::before {
    content: "👤";
    font-size: 14px;
}

/* ===== 搜索弹窗（顶部固定） ===== */
.search-modal {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    background: rgba(0,0,0,0.3);
    padding-top: 62px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal .modal {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 35vh;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 0;
    overflow: hidden;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

.search-modal.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.search-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.search-top-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-body);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.search-top-category {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-top-divider {
    color: var(--border-color);
    font-size: 14px;
}

.search-top-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-top-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-top-icon {
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.search-top-icon:hover {
    color: var(--primary);
}

.search-body {
    padding: 20px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.search-section {
    margin-bottom: 20px;
}

.search-section:last-child {
    margin-bottom: 0;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px;
}

.search-clear-btn:hover {
    color: var(--text-secondary);
}

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

.search-tag {
    padding: 6px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

/* ===== 浮动按钮 ===== */
.float-btns {
    position: fixed;
    right: 16px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.float-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    border: none;
    transition: all 0.2s;
}

.float-btn:hover {
    box-shadow: var(--shadow-hover);
    color: var(--primary);
    transform: scale(1.05);
}

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
    .main-content {
        padding: 24px;
    }
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.resource-card {
    animation: fadeIn 0.3s ease;
}

/* ===== 提示消息 ===== */
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--bg-card);
    box-shadow: var(--shadow-hover);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--success);
}

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

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.2s;
}

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

.pagination .current {
    background: var(--primary);
    color: #fff;
}
