:root { 
    --sidebar-width: 240px; 
    --accent: #2c3e50; 
    --bg: #ffffff; 
    --banner-height: 800px;  /* 从 480px 改成 800px */
    /* Logo 配色：蓝 → 橙（ke） */
    --brand-blue: #2B5DF1;
    --brand-blue-deep: #1E4AD6;
    --brand-blue-bright: #4B78FF;
    --brand-orange: #FF7E15;
    --brand-orange-soft: #FF9A45;
    --brand-mid: #7F5AD5;
    --brand-gradient: linear-gradient(135deg, #2B5DF1 0%, #7F5AD5 45%, #FF7E15 100%);
    --brand-gradient-btn: linear-gradient(135deg, #2B5DF1 0%, #4B78FF 38%, #FF9A45 78%, #FF7E15 100%);
    --brand-gradient-hover: linear-gradient(135deg, #4B78FF 0%, #8B6AE0 42%, #FF9A45 100%);
    --brand-glow: 0 0 0 1px rgba(255, 126, 21, 0.35), 0 0 12px rgba(43, 93, 241, 0.35);
    --icon-muted: #94a3b8;
    /* 兼容旧变量名 */
    --tech-blue: var(--brand-blue);
    --tech-blue-deep: var(--brand-blue-deep);
    --tech-blue-bright: var(--brand-blue-bright);
    --tech-blue-glow: var(--brand-glow);
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); margin: 0; padding: 0; color: #333; }

.system-topbar { background: #1a252f; color: #fff; padding: 10px 5%; display: flex; justify-content: space-between; align-items: center; font-size: 14px; z-index: 4000; position: relative; }
.system-topbar button { background: #34495e; color: #fff; border: 1px solid #4e6d8c; padding: 5px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.system-topbar button.active { background: #e67e22; border-color: #e67e22; }

.view-section { display: none; }
.view-section.active { display: block; }

/* ================= 前台样式 ================= */
header { background: #fff; border-bottom: 1px solid #eaeaea; position: sticky; top: 0; z-index: 1000; }
.header-top { padding: 15px 8%; display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: bold; color: var(--accent); }
.logo-area img { height: 35px; object-fit: contain; }

.search-box { display: flex; align-items: center; background: #f1f3f5; border-radius: 20px; padding: 5px 15px; width: 350px; }
.search-box input { border: none; background: none; outline: none; width: 100%; padding: 5px; font-size: 14px; }
.search-box button { background: none; border: none; cursor: pointer; color: #666; font-weight: bold; }

.user-nav-actions { display: flex; align-items: center; gap: 20px; }
.points-badge { background: #fff5e6; color: #d35400; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer; border: none; box-shadow: none; transition: all 0.2s; }
.points-badge:hover { background: #fae199; transform: scale(1.05); box-shadow: none; }

/* 小信封消息提醒样式 */
.msg-bell-wrap { position: relative; display: inline-flex; align-items: center; cursor: pointer; font-size: 20px; padding: 5px; }
.msg-badge { position: absolute; top: 0; right: 0; background: #e74c3c; color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: none; justify-content: center; align-items: center; font-weight: bold; }
.msg-dropdown { display: none; position: absolute; right: 0; top: 100%; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-radius: 8px; width: 360px; max-height: 480px; padding: 0; z-index: 100; text-align: left; overflow: hidden; }
.msg-dropdown-header { font-weight: bold; font-size: 15px; border-bottom: 1px solid #eee; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; color: #1e293b; }
.msg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; background: #fafbfc; flex-wrap: wrap; }
.msg-filter-tabs { display: flex; gap: 6px; }
.msg-tab { border: 1px solid #e2e8f0; background: #fff; color: #64748b; font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer; line-height: 1.3; }
.msg-tab.active { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; font-weight: 600; }
.msg-category-select { font-size: 12px; color: #475569; border: 1px solid #e2e8f0; border-radius: 4px; padding: 4px 8px; background: #fff; max-width: 140px; cursor: pointer; }
#msgListContainer { max-height: 340px; overflow-y: auto; padding: 4px 0; }
.msg-item { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #f1f5f9; background: #fff; transition: background 0.2s; cursor: pointer; }
.msg-item:hover { background: #f8fafc; }
.msg-item.unread { background: #fffdf5; }
.msg-item.unread:hover { background: #fff8e7; }
.msg-item.read { background: #fff; color: #64748b; }
.msg-item-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.msg-item-cat { font-size: 11px; color: #64748b; background: #f1f5f9; padding: 1px 6px; border-radius: 3px; flex-shrink: 0; }
.msg-item-dot { width: 6px; height: 6px; border-radius: 50%; background: #e74c3c; flex-shrink: 0; }
.msg-item-title { line-height: 1.4; font-weight: 500; color: #1e293b; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item.read .msg-item-title { font-weight: 400; color: #64748b; }
.msg-item-body { margin-top: 2px; font-size: 12px; color: #94a3b8; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item-time { margin-top: 4px; font-size: 11px; color: #cbd5e1; }
.msg-detail-box { background: #fff; border-radius: 10px; padding: 28px 28px 22px; width: 92%; max-width: 480px; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.msg-detail-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.msg-detail-cat { font-size: 12px; color: #475569; background: #f1f5f9; padding: 3px 8px; border-radius: 4px; }
.msg-detail-time { font-size: 12px; color: #94a3b8; }
.msg-detail-title { margin: 0 0 14px; font-size: 18px; color: #0f172a; line-height: 1.4; padding-right: 24px; }
.msg-detail-body { font-size: 14px; color: #334155; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

.user-avatar-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 2px; }
.user-avatar-btn img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: none; }
.avatar-ring-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #2B5DF1 0deg,
        #4B78FF 70deg,
        #7F5AD5 140deg,
        #FF9A45 220deg,
        #FF7E15 290deg,
        #2B5DF1 360deg
    );
    z-index: 0;
    pointer-events: none;
}
.avatar-ring-wrap::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: #fff;
    z-index: 0;
    pointer-events: none;
}
.avatar-ring-wrap img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    display: block;
    background: #f1f5f9;
}
.avatar-ring-wrap.is-spinning .avatar-ring {
    animation: avatar-ring-spin 0.85s linear infinite;
}
@keyframes avatar-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.avatar-ring-wrap-sm {
    width: 34px;
    height: 34px;
}
.avatar-ring-wrap-sm .avatar-ring {
    inset: -2.5px;
}

.user-dropdown-wrap { position: relative; display: inline-block; }
.user-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 6px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-radius: 8px; width: 200px; padding: 8px 0; z-index: 100; text-align: left; }
.user-dropdown-wrap:hover .user-dropdown-menu { display: block; }
.user-menu-profile { display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; }
.user-menu-profile img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #eee; flex-shrink: 0; }
.user-menu-profile-meta { min-width: 0; flex: 1; }
.user-menu-profile-name { font-weight: 600; font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-profile-id { font-size: 12px; color: #888; margin-top: 3px; }
.user-menu-divider { height: 1px; background: #eee; margin: 4px 0 6px; }
.user-dropdown-wrap:not(.logged-in) .user-menu-profile,
.user-dropdown-wrap:not(.logged-in) .user-menu-divider { display: none; }
.user-dropdown-menu button {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-dropdown-menu button:hover { background: #f1f3f5; color: #e67e22; }
.user-dropdown-menu button.is-danger { color: #e74c3c; }
.user-dropdown-menu button.is-danger:hover { color: #c0392b; background: #fef2f2; }
.user-menu-ico,
.ui-ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.user-menu-ico svg,
.ui-ico svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ui-ico.ui-ico-sm { width: 16px; height: 16px; }
.ui-ico.ui-ico-sm svg { width: 16px; height: 16px; stroke-width: 1.8; }
.ui-ico.ui-ico-fill svg path,
.ui-ico.ui-ico-fill svg { fill: currentColor; stroke: none; }
.ui-ico-label { margin-left: 6px; vertical-align: middle; }
.points-badge .ui-ico { width: 16px; height: 16px; margin-right: 4px; }
.points-badge .ui-ico svg { width: 16px; height: 16px; }
.msg-bell-wrap .ui-ico { width: 22px; height: 22px; color: var(--icon-muted); transition: color 0.2s ease; }
.msg-bell-wrap:hover .ui-ico,
.msg-bell-wrap:focus-within .ui-ico { color: var(--brand-blue); }
.msg-bell-wrap .ui-ico svg { width: 22px; height: 22px; }
.search-box .ui-ico { width: 18px; height: 18px; color: var(--icon-muted); transition: color 0.2s ease; }
.search-box button:hover .ui-ico,
.search-box:focus-within .ui-ico { color: var(--brand-blue); }
.search-box .ui-ico svg { width: 18px; height: 18px; }
.preview-icon-btn .ui-ico { width: 16px; height: 16px; margin-right: 4px; }
.preview-icon-btn .ui-ico svg { width: 16px; height: 16px; }
.download-primary-btn .ui-ico { width: 16px; height: 16px; margin-right: 6px; }
.download-primary-btn .ui-ico svg { width: 16px; height: 16px; }
.preview-icon-btn.is-active .ui-ico svg {
    fill: currentColor;
    stroke: currentColor;
}
.preview-icon-btn.is-active .ui-ico svg path {
    fill: currentColor;
}
.user-dropdown-menu button .user-menu-ico,
.user-dropdown-menu button .ui-ico {
    color: var(--icon-muted);
    transition: color 0.2s ease;
}
.user-dropdown-menu button:hover .user-menu-ico,
.user-dropdown-menu button:hover .ui-ico {
    color: var(--brand-blue);
}
.user-dropdown-menu button.is-danger:hover .user-menu-ico,
.user-dropdown-menu button.is-danger:hover .ui-ico {
    color: #e74c3c;
}

.nav-menu { background: #fff; padding: 0 8%; display: flex; gap: 40px; border-top: 1px solid #f1f3f5; }
.menu-item { position: relative; padding: 12px 0; cursor: pointer; font-weight: 500; color: #444; }
.menu-item:hover { color: #e67e22; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-radius: 8px; width: 220px; padding: 10px 0; z-index: 10; }
.menu-item:hover .dropdown { display: block; }
.dropdown .dropdown-title { padding: 6px 20px; font-size: 12px; color: #999; font-weight: bold; background: #f8f9fa; }
.dropdown a { display: block; padding: 8px 20px; color: #333; text-decoration: none; font-size: 14px; }
.dropdown a:hover { background: #f1f3f5; color: #e67e22; }

/* 全屏二级页面样式 */
.fullscreen-subpage { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #f8f9fa; z-index: 3000; overflow-y: auto; box-sizing: border-box; }
.subpage-header { background: #1a252f; color: #fff; padding: 20px 8%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.subpage-header h1 { margin: 0; font-size: 24px; color: #e67e22; }
.subpage-close-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.subpage-content { padding: 30px 8%; max-width: 1400px; margin: 0 auto; }

.subpage-tabs { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 2px solid #ddd; padding-bottom: 10px; flex-wrap: wrap; }
.subpage-tabs button { background: #fff; border: 1px solid #ccc; padding: 10px 20px; border-radius: 20px; cursor: pointer; font-weight: bold; font-size: 15px; transition: all 0.3s; }
.subpage-tabs button.active, .subpage-tabs button:hover { background: #e67e22; color: #fff; border-color: #e67e22; }

/* 分类筛选面板 */
.filter-panel { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 25px; border: 1px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.filter-row { display: flex; align-items: center; margin-bottom: 12px; gap: 15px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-weight: bold; font-size: 14px; color: #555; width: 100px; flex-shrink: 0; }
.filter-options { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.filter-btn { background: #f8f9fa; border: 1px solid #ddd; padding: 6px 14px; border-radius: 15px; font-size: 13px; cursor: pointer; color: #444; transition: all 0.2s; }
.filter-btn.active, .filter-btn:hover { background: #e67e22; color: #fff; border-color: #e67e22; }

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

/* AI 论文与思维导图/图表生成专属工作台样式 */
.ai-workspace { background: #fff; padding: 30px; border-radius: 12px; border: 1px solid #e1e4e8; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.ai-workspace h3 { margin-top: 0; color: #2c3e50; }
.ai-output-box { margin-top: 20px; background: #fdfbf7; border: 1px dashed #fae199; padding: 20px; border-radius: 8px; min-height: 150px; position: relative; }

/* 进度条与积分生成专属样式 */
.ai-step-card { background: #fcfcfc; border: 1px solid #e1e4e8; border-radius: 8px; padding: 20px; margin-bottom: 20px; position: relative; }
.ai-step-card h4 { margin-top: 0; color: #2c3e50; display: flex; align-items: center; justify-content: space-between; }
.step-progress-container { width: 100%; background: #eee; height: 8px; border-radius: 4px; overflow: hidden; margin: 15px 0 10px 0; display: none; }
.step-progress-fill { background: linear-gradient(90deg, #3498db, #2ecc71); height: 100%; width: 0%; transition: width 0.3s ease; }
.step-action-row { display: flex; justify-content: flex-end; align-items: center; gap: 15px; margin-top: 15px; }
.step-points-hint { font-size: 13px; color: #d35400; font-weight: bold; }
.step-generate-btn { background: #e67e22; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 14px; transition: background 0.2s; }
.step-generate-btn:hover { background: #d35400; }
.step-generate-btn:disabled { background: #bdc3c7; cursor: not-allowed; }

.banner-stage {
    position: relative;
    width: 100%;
    background: #ffffff;
    padding: 28px 0 20px;
    overflow: hidden;
    box-sizing: border-box;
}
.banner-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.banner-stack-outer {
    position: relative;
    z-index: 1;
    /* 与下方 .main-container 左右留白一致，四张叠卡整体与产品列齐平 */
    width: 100%;
    max-width: 100%;
    padding: 0 8%;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
}
.banner-container {
    width: 100%;
    height: auto;
    /* 原 16:9 高度砍掉约 1/4 → 16:6.75 */
    aspect-ratio: 16 / 6.75;
    min-height: 120px;
    position: relative;
    overflow: visible;
    background: transparent;
}
/* 底部细阴影：贴边略深，向下渐淡融进白底 */
.banner-container::after {
    content: '';
    position: absolute;
    left: 0;
    width: 87%;
    bottom: -1px;
    height: 12px;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.28) 0%,
        rgba(15, 23, 42, 0.12) 30%,
        rgba(15, 23, 42, 0.04) 58%,
        rgba(255, 255, 255, 0.7) 85%,
        rgba(255, 255, 255, 0) 100%
    );
    filter: blur(2.5px);
    border-radius: 50%;
}
.banner-slide {
    width: 87%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    background-color: #0f172a;
    background-size: cover;
    background-position: center center !important;
    background-repeat: no-repeat;
    padding: 20px 40px;
    box-sizing: border-box;
    pointer-events: none;
    box-shadow: none;
    transition:
        transform 0.62s cubic-bezier(0.34, 1.35, 0.64, 1),
        opacity 0.42s ease,
        box-shadow 0.45s ease;
    will-change: transform, opacity;
}
.banner-hover-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.28s ease;
}
.banner-hover-video.is-playing {
    opacity: 1;
}
.banner-container.banner-no-anim .banner-slide {
    transition: none !important;
}
/* 叠层左缘阴影，区分前后卡片 */
.banner-slide::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.08) 55%, transparent);
    transition: opacity 0.4s ease;
}
.banner-slide.is-stack-1::before,
.banner-slide.is-stack-2::before,
.banner-slide.is-stack-3::before {
    opacity: 1;
}
.banner-slide.is-stack-2::before { width: 22px; opacity: 0.85; }
.banner-slide.is-stack-3::before { width: 18px; opacity: 0.7; }

/* 右侧固定露出 4 层 */
.banner-slide.is-stack-0,
.banner-slide.is-active,
.banner-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: none;
    box-shadow:
        6px 0 18px rgba(15, 23, 42, 0.14),
        0 4px 12px rgba(15, 23, 42, 0.06);
}
.banner-slide.is-stack-1 {
    opacity: 1;
    transform: translateX(4.5%) scale(0.985);
    box-shadow:
        -8px 0 16px rgba(15, 23, 42, 0.18),
        4px 0 12px rgba(15, 23, 42, 0.08);
}
.banner-slide.is-stack-2 {
    opacity: 1;
    transform: translateX(9%) scale(0.97);
    box-shadow:
        -6px 0 14px rgba(15, 23, 42, 0.14),
        3px 0 10px rgba(15, 23, 42, 0.06);
}
.banner-slide.is-stack-3 {
    opacity: 1;
    transform: translateX(13.5%) scale(0.955);
    box-shadow:
        -5px 0 12px rgba(15, 23, 42, 0.12),
        2px 0 8px rgba(15, 23, 42, 0.05);
}

/* 卡片统一从左侧弹性进入 */
.banner-slide.is-enter-from-left {
    opacity: 1 !important;
    transform: translateX(-108%) scale(1) !important;
    z-index: 28 !important;
}
.banner-slide.is-push-to-stack {
    opacity: 1 !important;
    transform: translateX(0) scale(1) !important;
    z-index: 18 !important;
}
.banner-hitarea {
    position: absolute;
    inset: 0;
    width: 87%;
    height: 100%;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px 40px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
}
a.banner-slide { color: inherit; }
.banner-slide-placeholder {
    align-items: center;
    justify-content: center;
    background: #e5e7eb !important;
    width: 87%;
}
.banner-placeholder-text {
    color: #9ca3af;
    font-size: 15px;
    letter-spacing: 0.02em;
    user-select: none;
}
.banner-content { background: rgba(0,0,0,0.5); color: #fff; padding: 30px 50px; border-radius: 12px; text-align: center; max-width: 600px; }
.banner-content h2 { margin: 0 0 10px 0; font-size: 32px; }
.banner-btn { background: #3498db; color: #fff; padding: 10px 24px; border-radius: 4px; text-decoration: none; font-weight: bold; display: inline-block; }

.banner-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    position: relative;
    z-index: 2;
}
.banner-dots {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
}
.dot.active {
    background: #3b82f6;
    transform: scale(1.25);
}

.banner-arrow {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s, transform 0.2s;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}
.banner-arrow-next {
    width: 30px;
    height: 30px;
    font-size: 28px;
    color: #64748b;
    margin-left: 2px;
}
.banner-arrow-next:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    transform: scale(1.06);
}
.banner-arrow:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}
.banner-arrow-prev {
    display: none !important;
}
@media (max-width: 800px) {
    .banner-stage { padding: 16px 0 16px; }
    .banner-stack-outer { padding: 0 4%; width: 100%; }
    .banner-container { aspect-ratio: 16 / 6.75; min-height: 90px; }
    .banner-slide,
    .banner-hitarea,
    .banner-slide-placeholder { width: 82%; border-radius: 14px; padding: 14px 18px; }
    .banner-slide.is-stack-1 { transform: translateX(5.5%) scale(0.985); }
    .banner-slide.is-stack-2 { transform: translateX(11%) scale(0.97); }
    .banner-slide.is-stack-3 { transform: translateX(16.5%) scale(0.955); }
    .banner-slide.is-enter-from-left { transform: translateX(-110%) scale(1) !important; }
    .banner-arrow-next { font-size: 26px; width: 28px; height: 28px; }
    .banner-container::after { width: 82%; height: 10px; }
    .banner-arrow { font-size: 18px; width: 20px; }
}

/* ===== 首页主导航 ===== */
.home-main-nav {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 0 8% !important;
    border-top: 1px solid #f1f3f5 !important;
    background: #fff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    flex-wrap: wrap;
    position: relative;
}
.home-main-nav .nav-item {
    background: none;
    border: none;
    padding: 14px 16px;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    border-radius: 0;
    z-index: 1;
}
.home-main-nav .nav-item:hover { color: #e67e22; }
.home-main-nav .nav-item.active {
    color: #e67e22;
    font-weight: 700;
}
.home-main-nav .nav-item.active::after { display: none; }
.home-main-nav .nav-item-right { margin-left: auto; }

/* 液体粘滞指示条 */
.home-nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    border-radius: 4px 4px 0 0;
    background: var(--brand-gradient, linear-gradient(135deg, #2B5DF1, #FF7E15));
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform-origin: center bottom;
    transition:
        left 0.34s cubic-bezier(0.22, 1.15, 0.36, 1),
        width 0.34s cubic-bezier(0.22, 1.15, 0.36, 1),
        height 0.28s ease,
        border-radius 0.28s ease,
        opacity 0.2s ease;
    box-shadow: 0 0 8px rgba(43, 93, 241, 0.4);
}
.home-nav-indicator.is-visible {
    opacity: 1;
}
.home-nav-indicator.is-stretching {
    height: 4px;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(43, 93, 241, 0.55);
}

/* 首页内容区：与顶栏同宽左右留白 */
.main-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 28px 8% 56px;
    margin: 0 auto;
}

.home-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px;
    padding: 8px 0 24px;
    width: 100%;
    box-sizing: border-box;
}
.home-product-grid .card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: none;
    margin: 0;
    cursor: pointer;
}
.vault-panel { width: 100%; box-sizing: border-box; }
.paper-assist-panel { width: 100%; box-sizing: border-box; }
.paper-assist-panel .ai-workspace { margin: 0; }
.vault-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.vault-tabs-primary {
    margin: 4px 0 22px;
    border-bottom: 1px solid #eef2f7;
    width: 100%;
    justify-content: flex-start;
}
.vault-tabs-secondary { display: none !important; }
.vault-tab {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 10px 2px 12px;
    margin: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    box-shadow: none;
    outline: none;
}
.vault-tab-sep {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 400;
    margin: 0 12px;
    line-height: 1;
    user-select: none;
}
.vault-tab-primary {
    padding: 10px 2px 12px;
    font-size: 15px;
}
.vault-tab:hover {
    color: #334155;
}
.vault-tab.active {
    background: transparent;
    border: none;
    color: #0f172a;
    font-weight: 700;
    box-shadow: none;
}
.vault-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--tech-blue, #3b82f6);
}
.vault-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 14px;
}
@media (max-width: 1100px) {
    .home-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
}
@media (max-width: 800px) {
    .main-container { padding: 20px 4% 40px; }
    .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
}
@media (max-width: 480px) {
    .home-product-grid { grid-template-columns: minmax(0, 1fr); }
}
.category-tabs { display: flex; gap: 20px; margin-bottom: 25px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.category-tabs button { background: none; border: none; font-size: 16px; font-weight: bold; color: #666; cursor: pointer; padding: 5px 10px; position: relative; transition: color 0.2s; }
.category-tabs button:hover, .category-tabs button.active { color: var(--accent); }
.category-tabs button.active::after { content: ''; position: absolute; bottom: -12px; left: 0; width: 100%; height: 3px; background: var(--accent); border-radius: 3px; }

.category-section { display: flex; gap: 24px; margin-bottom: 40px; align-items: stretch; }
.tech-block { flex: 0 0 220px; border-radius: 12px; padding: 25px 20px; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); position: relative; overflow: hidden; background-size: 200% 200%; animation: gradientAnim 5s ease infinite; }
@keyframes gradientAnim { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.tech-block::before { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px); pointer-events: none; }
.tech-block h3 { font-size: 22px; margin: 0 0 10px 0; font-weight: 900; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); z-index: 1; }
.tech-block p { font-size: 13px; opacity: 0.9; margin: 0; z-index: 1; background: rgba(0,0,0,0.2); padding: 4px 10px; border-radius: 20px; }

.cards-scroll { flex: 1; display: flex; gap: 24px; overflow-x: auto; padding-bottom: 10px; padding-top: 5px; scroll-behavior: smooth; }
.cards-scroll::-webkit-scrollbar { height: 8px; }
.cards-scroll::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.cards-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.card {
    min-width: 280px;
    flex: 0 0 280px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}
.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}
/* 封面：顶/左/右贴边无白边，仅底部圆角与文字区分隔 */
.card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #eee;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 0 0 12px 12px;
    margin: 0;
}
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 999px;
    pointer-events: none;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.card-badge-new {
    background: #eaf4ff;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.12);
}
.card-badge-new-text {
    font-family: "Segoe UI", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(105deg, #22d3ee 0%, #3b82f6 45%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #3b82f6;
}
.card-badge-hot {
    background: #fff;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.16);
}
.card-badge-flame {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: block;
}
.card-badge-flame path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.card-img, .card-hover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.45s ease, opacity 0.35s ease;
}
.card-hover-video {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}
.card:hover .card-img { transform: scale(1.06); }
.card.is-hover-playing .card-hover-video.has-src { opacity: 1; }
.card.is-hover-playing .card-img { opacity: 0; transform: scale(1.06); }

/* 无视频：封面缓慢「呼吸」微动效 */
.card.card-no-video:hover .card-img {
    animation: cardCoverKenBurns 5s ease-in-out infinite alternate;
    opacity: 1;
}
@keyframes cardCoverKenBurns {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}

/* 悬停「预览中」提示 */
.card-preview-chip {
    position: absolute;
    right: 10px;
    bottom: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.card-preview-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: cardPreviewPulse 1.2s ease-out infinite;
}
@keyframes cardPreviewPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.card.is-hover-playing .card-preview-chip,
.card.card-no-video:hover .card-preview-chip {
    opacity: 1;
    transform: translateY(0);
}
.card.card-no-video .card-preview-chip-dot { background: #94a3b8; animation: none; box-shadow: none; }

/* 5 秒预览进度条 */
.card-preview-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    overflow: hidden;
}
.card-preview-progress > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #3b82f6, #6366f1);
    transition: width 0.1s linear;
}
.card.is-hover-playing .card-preview-progress { opacity: 1; }

/* 视频加载扫光 */
.card-img-wrap.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: cardShimmer 1s linear infinite;
    pointer-events: none;
}
@keyframes cardShimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* 文字区紧凑：标题一行 + 标签/格式同一行 */
.card-body {
    padding: 8px 12px 8px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 0;
}
.card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 20px;
}
.card-tag {
    font-size: 10px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 0;
    line-height: 1.35;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
}
.card-format {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: none;
    margin-left: auto;
    flex-shrink: 0;
}

.home-product-grid .card-img-wrap { aspect-ratio: 16 / 9; }
.home-product-grid .card-body { flex: 0 0 auto; padding: 8px 12px 8px; }

/* 前台弹窗样式 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
/* 详情/预览必须高于全屏分类专区(3000)，否则返回后弹窗被挡住、点击无反应 */
#detailModal { z-index: 4100; }
#previewModal { z-index: 4200; }
/* 全屏预览：关闭 backdrop-filter，避免移动端 iframe 内 emoji 变黑影 */
#previewModal.modal-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #0f172a;
    padding: 0;
    align-items: stretch;
}
#previewModal .feixiang-preview-layout {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
}
.preview-stage-box {
    /* 避免圆角+overflow 与半透明遮罩叠加导致移动端合成异常 */
    isolation: isolate;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.preview-stage-box > iframe.dynamic-preview-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #111;
    /* 独立图层，减少被父级滤镜/水印污染 */
    isolation: isolate;
    z-index: 1;
}
.preview-watermark {
    z-index: 2;
    /* 禁止半透明层参与与 iframe 的混合（移动端 emoji 黑影常见原因） */
    mix-blend-mode: normal;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.detail-modal-box { background: #fff; width: 850px; max-height: 90vh; overflow-y: auto; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; }
.close-modal { position: absolute; top: 20px; right: 25px; font-size: 28px; cursor: pointer; color: #999; transition: color 0.3s; }
.close-modal:hover { color: #333; }
.media-container { width: 100%; background: #000; border-radius: 8px; overflow: hidden; margin: 20px 0; display: flex; justify-content: center; align-items: center; }
.media-container img, .media-container video { width: 100%; max-height: 450px; object-fit: contain; display: block; }

.profile-modal-box { background: #fff; width: 400px; padding: 40px; border-radius: 12px; position: relative; text-align: center; }
.profile-avatar-preview { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 2px solid #eee; margin: 10px auto 20px auto; display: block; }

.member-modal-box { background: #fff; width: 800px; max-height: 90vh; overflow-y: auto; padding: 40px; border-radius: 12px; position: relative; text-align: center; }
.progress-bar-bg { width: 100%; background: #eee; height: 12px; border-radius: 6px; overflow: hidden; margin: 10px 0 10px 0; }
.progress-bar-fill {
    background: var(--brand-gradient-btn, linear-gradient(135deg, #2B5DF1 0%, #4B78FF 38%, #FF9A45 78%, #FF7E15 100%));
    height: 100%;
    width: 35%;
    transition: width 0.5s;
    border-radius: 6px;
}

.vip-tiers { display: flex; gap: 15px; margin-top: 20px; align-items: stretch; }
.vip-card { flex: 1; border: 2px solid #eee; border-radius: 8px; padding: 20px; text-align: center; display: flex; flex-direction: column; background: #fff; transition: all 0.3s; }
.vip-card:hover { border-color: #e67e22; background: #fffdf5; transform: translateY(-3px); }
.vip-card h3 { margin: 0 0 5px 0; color: #333; }
.vip-card .price { font-size: 22px; color: #d35400; font-weight: bold; margin-bottom: 10px; }
.vip-card .desc { font-size: 12px; color: #666; line-height: 1.5; margin-bottom: 15px; text-align: left; background: #f9fafb; padding: 8px; border-radius: 4px; flex: 1; }
.vip-card button { background: #e67e22; color: #fff; border: none; padding: 8px 0; border-radius: 4px; cursor: pointer; font-weight: bold; width: 100%; }
.vip-card button:hover { background: #d35400; }

/* 扫码充值弹窗样式 */
.qr-pay-box { display: none; margin-top: 25px; padding: 20px; background: #f8f9fa; border-radius: 8px; border: 1px dashed #e67e22; text-align: center; }
.qr-code-group { display: flex; justify-content: center; gap: 30px; margin-top: 15px; }
.qr-item img { width: 130px; height: 130px; object-fit: contain; border: 1px solid #ddd; border-radius: 4px; padding: 5px; background: #fff; }
.qr-item p { margin: 5px 0 0 0; font-size: 13px; font-weight: bold; color: #333; }

.direct-recharge-section { margin-top: 25px; padding: 20px; background: #fdfbf7; border: 1px solid #fae199; border-radius: 8px; text-align: left; }
.direct-recharge-section h4 { margin: 0 0 10px 0; color: #d35400; font-size: 15px; }
.points-pack-options { display: flex; gap: 10px; margin-bottom: 15px; }
.points-pack-btn { flex: 1; background: #fff; border: 1px solid #ddd; padding: 10px; border-radius: 6px; cursor: pointer; text-align: center; font-weight: bold; transition: all 0.2s; }
.points-pack-btn.selected, .points-pack-btn:hover { border-color: #e67e22; background: #fff5e6; color: #d35400; }

.preview-modal-box { background: #fff; width: 90vw; height: 90vh; border-radius: 8px; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.preview-header { padding: 15px 20px; background: #f1f3f5; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.preview-content-area { flex: 1; position: relative; background: #fafafa; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.watermark-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='250' height='200'><text x='50%' y='50%' transform='rotate(-30 125 100)' fill='rgba(0,0,0,0.06)' font-size='22' font-weight='bold' text-anchor='middle'>课立互动·仅供预览</text></svg>"); background-repeat: repeat; z-index: 10; }

/* ================= 后台样式 ================= */
/* 顶部条固定；z-index 低于弹窗，避免挡住商品/Banner 等表单 */
#adminTopbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}
#adminView { padding-top: 45px; box-sizing: border-box; }
#productFormModal,
#bannerFormModal { z-index: 5000; }

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-topbar-user img,
#adminTopAvatar {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: #34495e;
    flex-shrink: 0;
}
.admin-topbar-user span {
    font-weight: 600;
    color: #fff;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-layout { display: flex; min-height: calc(100vh - 45px); background: #f4f6f9; }
aside { width: 240px; background: #2c3e50; color: #fff; display: flex; flex-direction: column; }
.aside-header { padding: 20px; font-size: 16px; font-weight: bold; background: #1a252f; border-bottom: 1px solid rgba(255,255,255,0.1); }
.aside-menu { list-style: none; padding: 0; margin: 0; flex: 1; }
.aside-menu li { padding: 15px 20px; cursor: pointer; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s; }
.aside-menu li:hover, .aside-menu li.active { background: #34495e; color: #3498db; font-weight: bold; border-left: 4px solid #3498db; padding-left: 16px; }

main { flex: 1; padding: 30px; box-sizing: border-box; }
.admin-panel { display: none; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.admin-panel.active { display: block; }
.panel-header-wrap { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f1f3f5; padding-bottom: 15px; margin-bottom: 20px; }
h2 { margin: 0; color: var(--accent); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 14px; color: #555; }
.form-group input[type="text"], .form-group input[type="number"], .form-group select, .form-group textarea, .form-group input[type="date"] { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; font-size: 14px; }
.form-group input[type="file"] { padding: 8px; background: #f9fafb; border: 1px dashed #ccc; width: 100%; box-sizing: border-box;}

.row-group { display: flex; gap: 20px; flex-wrap: wrap; }
.row-group .form-group { flex: 1; min-width: 200px; }
.btn-primary { background: #27ae60; color: #fff; border: none; padding: 12px 24px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-primary:hover { background: #219653; }

.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.data-card { background: #fdfbf7; border: 1px solid #fae199; padding: 20px; border-radius: 8px; text-align: center; }
.data-card h3 { margin: 0 0 10px 0; font-size: 14px; color: #666; }
.data-card .number { font-size: 24px; font-weight: bold; color: #d35400; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #fff; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
table th { background: #f8f9fa; color: #555; border-top: 1px solid #eee; }

.chart-box { width: 100%; height: 260px; background: #fcfcfc; border: 1px solid #eee; border-radius: 8px; position: relative; margin-top: 10px; padding: 20px; box-sizing: border-box; transition: all 0.5s; }
.chart-legend { display: flex; gap: 15px; justify-content: center; margin-bottom: 10px; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color { width: 12px; height: 12px; border-radius: 2px; }
.chart-time-filters { display: flex; gap: 10px; margin-top: 15px; justify-content: center; }
.chart-time-filters button { background: #fff; border: 1px solid #ddd; padding: 6px 15px; border-radius: 20px; cursor: pointer; font-size: 12px; color: #555; transition: all 0.3s; }
/* ==================== 飞象风格全屏预览与左右分栏样式 ==================== */
.feixiang-preview-layout { width: 100%; max-width: 100%; height: 100%; max-height: 100dvh; background: #f5f6f8; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.feixiang-topbar { height: 50px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; flex-shrink: 0; gap: 16px; }
.feixiang-topbar .brand-logo {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
}
.feixiang-topbar .brand-logo:hover { opacity: 0.85; }
.feixiang-topbar .brand-logo img {
    height: 22px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    display: block;
}
.feixiang-topbar .brand-logo span { font-size: 12px; color: #9ca3af; font-weight: normal; }
.preview-top-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.close-feixiang-btn { background: #f3f4f6; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #4b5563; font-weight: bold; transition: all 0.2s; flex-shrink: 0; }
.close-feixiang-btn:hover { background: #ef4444; color: #fff; }
.preview-topbar-user { flex-shrink: 0; z-index: 20; }
.preview-topbar-user:hover .user-dropdown-menu {
    /* 预览页仅点击展开，避免 hover 抢样式 */
    display: none;
}
.preview-topbar-user .user-dropdown-menu[style*="display: block"],
.preview-topbar-user .user-dropdown-menu[style*="display:block"] {
    display: block !important;
}
.preview-topbar-user:not(.logged-in) .user-menu-profile,
.preview-topbar-user:not(.logged-in) .user-menu-divider { display: none; }
.preview-topbar-avatar-btn {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}
.preview-topbar-avatar-btn #previewTopAvatarName {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-topbar-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
}

.feixiang-main-body { flex: 1; display: flex; padding: 16px 24px; gap: 16px; overflow: hidden; box-sizing: border-box; min-height: 0; min-width: 0; }
.preview-ppt-thumbs { width: 148px; background: #fff; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.03); overflow: hidden; }
.ppt-thumbs-title { font-size: 13px; font-weight: bold; color: #111827; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #f3f4f6; }
.ppt-thumbs-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ppt-thumb-item { border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #f8fafc; flex-shrink: 0; transition: border-color 0.15s; }
.ppt-thumb-item:hover { border-color: #cbd5e1; }
.ppt-thumb-item.active { border-color: #e67e22; }
.ppt-thumb-item img { width: 100%; height: 72px; object-fit: cover; display: block; background: #e2e8f0; }
.ppt-thumb-item .ppt-thumb-cap { font-size: 11px; color: #64748b; padding: 4px 6px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-left-container { flex: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden; min-width: 0; }
.preview-stage-box { flex: 1; background: #111827; border-radius: 12px; overflow: hidden; position: relative; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.preview-bottom-bar { height: 64px; background: #fff; border-radius: 12px; margin-top: 12px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.03); flex-shrink: 0; gap: 12px; }
.author-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.author-info img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.author-name { font-size: 14px; font-weight: bold; color: #111827; }
.author-id { font-size: 11px; color: #9ca3af; font-weight: normal; margin-left: 6px; }
.author-desc { font-size: 12px; color: #6b7280; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

.preview-stats-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.preview-icon-btn { background: #f8fafc; border: none; color: #334155; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; box-shadow: none; }
.preview-icon-btn:hover { background: #eef2ff; border: none; color: #2563eb; box-shadow: none; }
.preview-icon-btn.is-active { background: #eef2ff; border: none; color: #2563eb; box-shadow: none; }
.download-primary-btn { background: #e67e22; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: bold; transition: background 0.2s; box-shadow: none; }
.download-primary-btn:hover { background: #d35400; box-shadow: none; }

/* 后台上传进度条 */
.admin-upload-progress { margin: 8px 0 4px; }
.admin-upload-progress-track { width: 100%; height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.admin-upload-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #3498db, #2ecc71); transition: width 0.15s ease; border-radius: 999px; }
.admin-upload-progress-text { font-size: 12px; color: #475569; margin-top: 6px; }
.admin-upload-progress.is-done .admin-upload-progress-fill { background: #27ae60; }
.admin-upload-progress.is-error .admin-upload-progress-fill { background: #e74c3c; }

/* 右侧应用详情 */
.preview-right-sidebar {
    width: 300px;
    max-width: min(300px, 32vw);
    background: #fff;
    border-radius: 12px;
    padding: 16px 10px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}
.sidebar-title { font-size: 14px; font-weight: bold; color: #111827; margin-bottom: 12px; border-bottom: 1px solid #f3f4f6; padding-bottom: 8px; flex-shrink: 0; }
.preview-app-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}
.preview-app-head { display: flex; gap: 12px; align-items: flex-start; flex-shrink: 0; margin-bottom: 4px; padding-right: 6px; }
.preview-app-cover { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f1f5f9; flex-shrink: 0; }
.preview-app-name { font-size: 15px; font-weight: 700; color: #0f172a; line-height: 1.35; }
.preview-app-meta { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* 应用简介：外层裁切，内层滚动，右侧固定留出拉杆空间 */
.preview-app-intro-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    position: relative;
}
.preview-app-intro {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    overflow-y: scroll; /* 始终预留滚动条槽，避免被视频盖住 */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px 12px 0; /* 右侧空隙专给细拉杆 */
    box-sizing: border-box;
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    word-break: break-word;
    background: #fff;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #c5cdd8 transparent;
}
.preview-app-intro::-webkit-scrollbar {
    width: 4px;
}
.preview-app-intro::-webkit-scrollbar-track {
    background: transparent;
}
.preview-app-intro::-webkit-scrollbar-thumb {
    background: #c5cdd8;
    border-radius: 4px;
}
.preview-app-intro::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.preview-app-intro-inner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flow-root;
    box-sizing: border-box;
}
.preview-app-intro-inner *,
.preview-app-intro-inner *::before,
.preview-app-intro-inner *::after {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.preview-app-intro-inner img,
.preview-app-intro-inner video,
.preview-app-intro-inner iframe,
.preview-app-intro-inner embed,
.preview-app-intro-inner object {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0 !important;
    border-radius: 6px;
    position: static !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    float: none !important;
}
.preview-app-intro-inner iframe,
.preview-app-intro-inner video {
    aspect-ratio: 16 / 9;
    background: #0f172a;
    object-fit: contain;
}
.recommend-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.rec-item-card { display: flex; gap: 10px; cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; border: 1px solid transparent; }
.rec-item-card:hover { background: #fdfbf7; border-color: #fae199; }
.rec-thumb { width: 84px; height: 56px; border-radius: 6px; object-fit: cover; background: #eee; flex-shrink: 0; }

/* 移动端全屏预览优化：隐藏侧栏，预览区铺满 */
@media (max-width: 768px) {
    .feixiang-topbar { height: 44px; padding: 0 10px; gap: 8px; }
    .feixiang-topbar .brand-logo { font-size: 14px; }
    .feixiang-topbar .brand-logo img { height: 18px; max-width: 72px; }
    .feixiang-topbar .brand-logo span { display: none; }
    .preview-top-title { font-size: 13px; }
    .close-feixiang-btn { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
    .preview-topbar-avatar-btn .avatar-ring-wrap { width: 30px; height: 30px; }
    .preview-topbar-avatar-btn img { width: 100%; height: 100%; }
    .feixiang-main-body { padding: 8px; gap: 0; }
    .preview-ppt-thumbs { display: none !important; }
    .preview-right-sidebar { display: none !important; }
    .preview-stage-box {
        border-radius: 8px;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .preview-bottom-bar {
        height: auto;
        min-height: 52px;
        margin-top: 8px;
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
        border-radius: 8px;
    }
    .author-desc { display: none; }
    .preview-stats-actions { width: 100%; justify-content: space-between; }
    .preview-icon-btn { padding: 6px 10px; font-size: 12px; }
    .download-primary-btn { padding: 8px 12px; font-size: 13px; }
    .preview-watermark {
        bottom: 12px !important;
        right: 12px !important;
        font-size: 11px !important;
        opacity: 0.35 !important;
        background: transparent !important;
        text-shadow: none !important;
        padding: 4px 8px !important;
    }
}
.rec-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.rec-title { font-size: 12px; font-weight: bold; color: #1f2937; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 登录弹窗样式 */
.login-modal-box {
    background: #fff;
    width: 420px;
    padding: 40px;
    border-radius: 12px;
    position: relative;
    text-align: center;
}
.login-modal-box .form-group {
    text-align: left;
}
.login-modal-box .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}
.login-modal-box .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.login-modal-box .btn-primary {
    background: #e67e22;
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}
.login-modal-box .btn-primary:hover {
    background: #d35400;
}
.login-modal-box a {
    color: #3498db;
    cursor: pointer;
}
.login-modal-box a:hover {
    text-decoration: underline;
}
.login-modal-box .email-code-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.login-modal-box .email-code-row input {
    flex: 1;
    min-width: 0;
}
.login-modal-box .btn-send-code {
    flex-shrink: 0;
    border: 1px solid #e67e22;
    background: #fff;
    color: #e67e22;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.login-modal-box .btn-send-code:hover:not(:disabled) {
    background: #fdf6ec;
}
.login-modal-box .btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.rec-tag { font-size: 10px; color: #e67e22; background: #fdf6ec; padding: 1px 4px; border-radius: 2px; align-self: flex-start; }
.chart-time-filters button.active, .chart-time-filters button:hover { background: #3498db;
color: #fff; border-color: #3498db; }
/* 修复顶部用户区域右对齐 */




/* 确保登录弹窗居中 */
#loginModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
#loginModal.modal-visible {
    display: flex !important;
}
/* ===== 导航菜单：换行 + 竖杠（最终完整版） ===== */

/* 这一块负责让导航菜单“换行到第二行” */
.nav-menu {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    box-sizing: border-box !important;
    padding: 0 8% !important;
    border-top: 1px solid #f1f3f5 !important;
    background: #fff !important;
}

/* 这一块让菜单项“水平排列” */
.nav-menu .menu-item {
    display: inline-block !important;
    padding: 12px 0 !important;
    font-size: 15px !important;
    color: #333 !important;
    cursor: pointer !important;
}

/* 这一块在菜单项之间加“竖杠” */
.nav-menu .menu-item:not(:last-child)::after {
    content: "|";
    color: #d0d0d0;
    margin: 0 20px;
    font-weight: 300;
}

/* 第一个菜单项（AI赋能）保持橙色 */
.nav-menu .menu-item:first-child {
    color: #e67e22 !important;
    font-weight: bold !important;
}
/* 下拉菜单默认隐藏 */
.user-dropdown-wrap .user-dropdown-menu {
    display: none;
}
/* 底部页脚 - 强制生效 */
.site-footer {
    background: #f8f9fa !important;
    border-top: 2px solid #eaeaea !important;
    padding: 20px 0 !important;
    margin-top: 40px !important;
    text-align: center !important;
    font-size: 13px !important;
    color: #888 !important;
    width: 100% !important;
    clear: both !important;
}

.footer-content p {
    margin: 5px 0 !important;
}

.footer-content a {
    color: #666 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.footer-content a:hover {
    color: #e67e22 !important;
    text-decoration: underline !important;
}


.banner-btn-bottom {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: all 0.3s ease;
    z-index: 2;
    cursor: pointer;
}

.banner-btn-bottom:hover {
    background: rgba(15, 23, 42, 0.75);
    transform: scale(1.04);
    border-color: rgba(255, 255, 255, 0.4);
}
/* ===== 备案期间隐藏（公安备案通过后删除） ===== */

/* 隐藏发布资源入口 */
#teacherUploadModal { display: none !important; }
#teacherAuthModal { display: none !important; }

/* 隐藏全屏分类中心的筛选面板（包含“选择学科”、“检索方式”等所有标签） */
#subjectFilterPanel { display: none !important; }

/* ================= 前台：Logo 蓝橙配色（按钮 + 图标） ================= */
body.frontend-site .home-main-nav .nav-item:hover,
body.frontend-site .home-main-nav .nav-item.active {
    color: var(--brand-blue);
}
body.frontend-site .home-nav-indicator {
    background: var(--brand-gradient);
    box-shadow: 0 0 8px rgba(43, 93, 241, 0.4);
}
body.frontend-site .home-main-nav .nav-item.active::after {
    display: none;
}
body.frontend-site .menu-item:hover,
body.frontend-site .dropdown a:hover,
body.frontend-site .user-dropdown-menu button:hover {
    color: var(--brand-blue);
}
body.frontend-site .subpage-header h1 { color: var(--brand-blue); }
body.frontend-site .ppt-thumb-item.active { border-color: var(--brand-blue); }

body.frontend-site .vault-tab.active {
    background: transparent;
    border: none;
    color: var(--brand-blue-deep);
    box-shadow: none;
}
body.frontend-site .vault-tab.active::after {
    background: var(--brand-gradient);
}
body.frontend-site .vault-tab-secondary.active {
    box-shadow: none;
}

/* 主按钮：Logo 蓝→橙渐变 */
body.frontend-site .step-generate-btn,
body.frontend-site .login-modal-box .btn-primary,
body.frontend-site .btn-primary,
body.frontend-site .system-topbar button.active,
body.frontend-site .subpage-tabs button.active,
body.frontend-site .subpage-tabs button:hover,
body.frontend-site .filter-btn.active,
body.frontend-site .filter-btn:hover,
body.frontend-site .vip-card button,
body.frontend-site .banner-btn,
body.frontend-site .tech-blue-btn {
    background: var(--brand-gradient-btn) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: var(--brand-glow) !important;
}
body.frontend-site .step-generate-btn:hover,
body.frontend-site .login-modal-box .btn-primary:hover,
body.frontend-site .btn-primary:hover,
body.frontend-site .vip-card button:hover,
body.frontend-site .tech-blue-btn:hover {
    background: var(--brand-gradient-hover) !important;
    border: none !important;
    box-shadow: 0 0 0 1px rgba(255, 126, 21, 0.45), 0 0 16px rgba(43, 93, 241, 0.4) !important;
}

/* 下载按钮：同款渐变，不发光 */
body.frontend-site .download-primary-btn {
    background: var(--brand-gradient-btn) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}
body.frontend-site .download-primary-btn:hover {
    background: var(--brand-gradient-hover) !important;
    border: none !important;
    box-shadow: none !important;
}

body.frontend-site .points-badge {
    background: rgba(43, 93, 241, 0.08);
    color: var(--brand-blue-deep);
    border: none;
    box-shadow: none;
}
body.frontend-site .points-badge:hover {
    background: rgba(255, 126, 21, 0.12);
    color: var(--brand-orange);
    border: none;
    box-shadow: none;
}

body.frontend-site .preview-icon-btn {
    border: none !important;
    box-shadow: none !important;
    color: #64748b;
}
body.frontend-site .preview-icon-btn .ui-ico {
    color: var(--icon-muted);
    transition: color 0.2s ease;
}
body.frontend-site .preview-icon-btn:hover,
body.frontend-site .preview-icon-btn.is-active {
    background: rgba(43, 93, 241, 0.08);
    color: var(--brand-blue);
    border: none !important;
    box-shadow: none !important;
}
body.frontend-site .preview-icon-btn:hover .ui-ico,
body.frontend-site .preview-icon-btn.is-active .ui-ico {
    color: var(--brand-blue);
}
/* 收藏选中偏 Logo 橙 */
body.frontend-site #previewFavoriteBtn.is-active,
body.frontend-site #previewFavoriteBtn.is-active .ui-ico {
    color: var(--brand-orange);
}
body.frontend-site #previewFavoriteBtn.is-active {
    background: rgba(255, 126, 21, 0.1);
}

body.frontend-site .login-modal-box .btn-send-code {
    background: #fff !important;
    border: 1px solid var(--brand-blue) !important;
    color: var(--brand-blue) !important;
    box-shadow: none !important;
}
body.frontend-site .login-modal-box .btn-send-code:hover:not(:disabled) {
    background: rgba(43, 93, 241, 0.06) !important;
    color: var(--brand-blue-deep) !important;
    border-color: var(--brand-orange) !important;
}

body.frontend-site .login-code-btn,
body.frontend-site button[style*="#e67e22"],
body.frontend-site .btn-primary[style*="#e67e22"] {
    background: var(--brand-gradient-btn) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: var(--brand-glow) !important;
}

body.frontend-site .redeem-submit-btn {
    padding: 8px 22px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer;
}
body.frontend-site .progress-bar-fill {
    background: var(--brand-gradient-btn) !important;
}

/* 通用图标：灰 → Logo 蓝/橙 */
body.frontend-site .ui-ico,
body.frontend-site .user-menu-ico {
    transition: color 0.2s ease;
}
body.frontend-site .banner-arrow {
    color: var(--icon-muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s;
}
body.frontend-site .banner-arrow:hover {
    color: var(--brand-blue);
    background: rgba(43, 93, 241, 0.08);
}
body.frontend-site .dot.active {
    background: var(--brand-blue);
}
body.frontend-site .home-main-nav .nav-item {
    transition: color 0.2s ease;
}
