/**
 * 鲸识 AI 2.0 设计 Token
 * 对照《鲸识AI网站2.0-页面设计方案》插图
 */
:root {
    --v2-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    --v2-bg: #f4f6fb;
    --v2-bg-soft: #eef2ff;
    --v2-surface: #ffffff;
    --v2-text: #1a1f36;
    --v2-text-muted: #6b7280;
    --v2-text-light: #9ca3af;
    --v2-border: rgba(15, 23, 42, 0.08);

    --v2-primary: #3b5bf9;
    --v2-primary-dark: #2f49c7;
    --v2-accent: #7c3aed;
    --v2-accent-teal: #14b8a6;
    --v2-accent-green: #10b981;
    --v2-hot: #ef4444;
    --v2-gold: #f59e0b;

    --v2-gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 45%, #3b5bf9 100%);
    --v2-gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #6366f1 100%);
    --v2-gradient-teal: linear-gradient(135deg, #0d9488 0%, #14b8a6 55%, #22d3ee 100%);
    --v2-gradient-hero: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.35) 0%, transparent 55%),
        linear-gradient(180deg, #0f172a 0%, #111827 100%);

    --v2-glass: rgba(255, 255, 255, 0.78);
    --v2-glass-border: rgba(255, 255, 255, 0.65);
    --v2-blur: blur(16px);

    --v2-radius-sm: 10px;
    --v2-radius-md: 16px;
    --v2-radius-lg: 22px;
    --v2-radius-xl: 28px;
    --v2-radius-pill: 999px;

    --v2-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --v2-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --v2-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

    --v2-header-h: 72px;
    --v2-container: 1280px;
    --v2-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.v2-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--v2-font);
    color: var(--v2-text);
    background: var(--v2-bg);
    -webkit-font-smoothing: antialiased;
}

.v2-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.v2-container {
    width: min(100% - 32px, var(--v2-container));
    margin: 0 auto;
}

.v2-main {
    flex: 1;
    padding-top: calc(var(--v2-header-h) + 8px);
}

/* Header */
.v2-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--v2-header-h);
    transition: background 0.3s var(--v2-ease), box-shadow 0.3s var(--v2-ease), backdrop-filter 0.3s var(--v2-ease);
}

.v2-header.is-scrolled {
    background: var(--v2-glass);
    backdrop-filter: var(--v2-blur);
    -webkit-backdrop-filter: var(--v2-blur);
    border-bottom: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
}

.v2-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.v2-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.v2-brand-slogan {
    font-size: 12px;
    color: var(--v2-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.v2-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
}

.v2-nav-link {
    padding: 8px 16px;
    border-radius: var(--v2-radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--v2-text-muted);
    text-decoration: none;
    transition: all 0.2s var(--v2-ease);
}

.v2-nav-link:hover {
    color: var(--v2-primary);
    background: rgba(59, 91, 249, 0.08);
}

.v2-nav-link.is-active {
    color: var(--v2-primary);
    background: rgba(59, 91, 249, 0.12);
}

.v2-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.v2-search {
    position: relative;
    width: 240px;
}

.v2-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-pill);
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.v2-search input:focus {
    border-color: rgba(59, 91, 249, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.12);
}

.v2-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--v2-text-light);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.v2-login-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #4F46E5 0%, #2563EB 50%, #0EA5E9 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    border-radius: 8px;
}

.v2-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(59, 91, 249, 0.15);
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    overflow: hidden;
}

.v2-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 页脚：信任条与页脚可同灰底一体（.has-trust） */
.v2-footer-wrap {
    margin-top: auto;
    flex-shrink: 0;
}
.v2-footer-wrap.has-trust {
    background: #f8f7fc;
    border-top: none;
}
.v2-footer-wrap.has-trust .v2-res-trust-wrap {
    /* 只改上下间距，保留 .v2-container 的左右 auto 居中 */
    margin-top: 0;
    margin-bottom: 0;
    padding: 16px 0 8px;
    width: min(100% - 32px, var(--v2-container));
    max-width: var(--v2-container);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.v2-footer-wrap.has-trust .v2-res-trust-panel {
    width: 100%;
    box-sizing: border-box;
}
.v2-footer-wrap.has-trust .v2-footer {
    margin-top: 0;
    background: transparent;
    border-top: none;
    padding-top: 8px;
    padding-bottom: 24px;
}
.v2-footer {
    margin-top: 0;
    flex-shrink: 0;
    padding: 22px 0 28px;
    background: #f7f7f8;
    border-top: 1px solid #ececef;
}
.v2-footer-wrap:not(.has-trust) .v2-footer {
    margin-top: 0;
}

.v2-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.v2-footer-copy {
    font-size: 14px;
    color: #6b7280;
}

.v2-footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.v2-footer-links > a:not(.v2-footer-qr-btn) {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.v2-footer-links > a:not(.v2-footer-qr-btn):hover {
    color: #111827;
}

.v2-footer-qr-btn,
.v2-footer-links a.v2-footer-qr-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 13px;
    color: #5b21b6 !important;
    text-decoration: none !important;
    background: #fff !important;
    border: 1px solid rgba(91, 33, 182, 0.35) !important;
    cursor: pointer;
    padding: 5px 14px !important;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.v2-footer-qr-btn:hover,
.v2-footer-links a.v2-footer-qr-btn:hover {
    color: #fff !important;
    border-color: #7c3aed !important;
    background: #7c3aed !important;
}

/* Modal */
.v2-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.v2-modal-overlay.is-open {
    display: flex;
}

.v2-modal {
    width: min(100%, 360px);
    background: var(--v2-surface);
    border-radius: var(--v2-radius-lg);
    padding: 28px 24px 24px;
    box-shadow: var(--v2-shadow-lg);
    text-align: center;
    position: relative;
}

.v2-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.v2-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.v2-modal-desc {
    font-size: 13px;
    color: var(--v2-text-muted);
    margin-bottom: 20px;
}

.v2-modal-qr {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: var(--v2-radius-md);
    background: #f9fafb;
    object-fit: contain;
    border: 1px solid var(--v2-border);
}

.v2-modal-qr-placeholder {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: var(--v2-radius-md);
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--v2-text-light);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    padding: 16px;
}
.v2-modal-qr-placeholder small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}

/* Buttons */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--v2-radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.v2-btn-primary {
    color: #fff;
    background: var(--v2-gradient-brand);
    box-shadow: 0 8px 20px rgba(59, 91, 249, 0.25);
}

.v2-btn-primary:hover {
    transform: translateY(-1px);
}

.v2-btn-ghost {
    color: var(--v2-primary);
    background: rgba(59, 91, 249, 0.08);
    border: 1px solid rgba(59, 91, 249, 0.15);
}

.v2-btn-ghost:hover {
    background: rgba(59, 91, 249, 0.12);
}

/* Home sections */
.v2-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px 0 8px;
}

.v2-stat-item {
    text-align: center;
    padding: 20px 12px;
    background: var(--v2-surface);
    border-radius: var(--v2-radius-md);
    box-shadow: var(--v2-shadow-sm);
}

.v2-stat-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--v2-primary);
    line-height: 1.2;
}

.v2-stat-label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--v2-text-muted);
}

.v2-section {
    padding: 32px 0;
}

.v2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.v2-section-title {
    font-size: 22px;
    font-weight: 800;
}

.v2-section-more {
    font-size: 14px;
    color: var(--v2-primary);
    text-decoration: none;
    font-weight: 600;
}

.v2-hero-video {
    position: relative;
    border-radius: var(--v2-radius-xl);
    overflow: hidden;
    background: var(--v2-gradient-hero);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--v2-shadow-lg);
}

.v2-hero-video-play {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.v2-hero-video-play::after {
    content: '';
    margin-left: 4px;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent var(--v2-primary);
}

.v2-hero-video-text {
    position: absolute;
    bottom: 24px;
    left: 24px;
    color: #fff;
}

.v2-hero-video-text h2 {
    font-size: 24px;
    margin: 0 0 6px;
}

.v2-hero-video-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
}

.v2-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.v2-promo-card {
    border-radius: var(--v2-radius-xl);
    padding: 28px;
    color: #fff;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--v2-shadow-md);
}

.v2-promo-card.purple {
    background: var(--v2-gradient-purple);
}

.v2-promo-card.teal {
    background: var(--v2-gradient-teal);
}

.v2-promo-card h3 {
    font-size: 22px;
    margin: 0 0 8px;
}

.v2-promo-card p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
}

.v2-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.v2-category-card {
    background: var(--v2-surface);
    border-radius: var(--v2-radius-lg);
    padding: 24px;
    box-shadow: var(--v2-shadow-sm);
    border: 1px solid var(--v2-border);
}

.v2-category-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.v2-category-card p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--v2-text-muted);
    line-height: 1.6;
}

.v2-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.v2-tag {
    padding: 4px 10px;
    border-radius: var(--v2-radius-pill);
    background: rgba(59, 91, 249, 0.08);
    color: var(--v2-primary);
    font-size: 12px;
    font-weight: 600;
}

.v2-course-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.v2-course-scroll::-webkit-scrollbar {
    height: 6px;
}

.v2-course-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.v2-course-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background: var(--v2-surface);
    border-radius: var(--v2-radius-md);
    overflow: hidden;
    box-shadow: var(--v2-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s var(--v2-ease);
}

.v2-course-card:hover {
    transform: translateY(-4px);
}

.v2-course-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    overflow: hidden;
}

.v2-course-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-course-cover .play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.2s;
}

.v2-course-card:hover .v2-course-cover .play {
    opacity: 1;
}

.v2-badge-hot {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--v2-hot);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.v2-course-body {
    padding: 14px;
}

.v2-course-body h4 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.4;
}

.v2-course-meta {
    font-size: 12px;
    color: var(--v2-text-muted);
}

/* Home · AI 工具入口 */
.v2-ai-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-radius: var(--v2-radius-xl);
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #faf5ff 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: var(--v2-shadow-sm);
}

.v2-ai-entry h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--v2-text);
}

.v2-ai-entry p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--v2-text-muted);
    line-height: 1.6;
}

.v2-ai-entry .v2-tags {
    margin-bottom: 0;
}

/* AI 工具页 */
.v2-ai-page {
    padding-bottom: 64px;
}

.v2-ai-hero {
    padding: 28px 0 8px;
}

.v2-ai-hero-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.v2-ai-eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--v2-primary);
    letter-spacing: 0.02em;
}

.v2-ai-hero-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.2;
}

.v2-ai-hero-desc {
    margin: 0;
    max-width: 640px;
    font-size: 15px;
    color: var(--v2-text-muted);
    line-height: 1.7;
}

.v2-ai-workbench {
    padding: 20px 0 56px;
}

.v2-ai-player-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16 / 6.6;
    background:
        radial-gradient(ellipse 70% 80% at 70% 20%, rgba(255,255,255,0.18) 0%, transparent 55%),
        linear-gradient(135deg, #4f7cff 0%, #6a8bff 42%, #7b6cff 100%);
    box-shadow: 0 22px 48px rgba(59, 91, 249, 0.18);
}

.v2-ai-player-card video,
.v2-ai-player-card .v2-ai-player-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v2-ai-player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.18) 100%);
    transition: opacity 0.25s var(--v2-ease);
    pointer-events: none;
}

.v2-ai-player-card.is-playing .v2-ai-player-overlay {
    opacity: 0;
}

.v2-ai-player-copy {
    pointer-events: none;
}

.v2-ai-player-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 8px 28px rgba(15, 23, 42, 0.28);
}

.v2-ai-player-sub {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.v2-ai-player-play {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    transition: transform 0.2s var(--v2-ease), background 0.2s;
}

.v2-ai-player-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    transform: translate(-50%, -50%);
}

.v2-ai-player-play:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.24);
}

.v2-ai-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.v2-ai-cta {
    min-width: 188px;
    padding: 13px 34px;
    font-size: 16px;
}

.v2-ai-cta-note {
    margin: 0;
    font-size: 13px;
    color: var(--v2-text-light);
}

@media (max-width: 768px) {
    .v2-ai-player-card {
        aspect-ratio: 16 / 9;
        border-radius: 18px;
    }

    .v2-ai-player-play {
        width: 56px;
        height: 56px;
    }
}

.v2-ai-hub {
    padding-top: 20px;
}

.v2-ai-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: var(--v2-surface);
    border-radius: var(--v2-radius-pill);
    box-shadow: var(--v2-shadow-sm);
    border: 1px solid var(--v2-border);
    margin-bottom: 24px;
}

.v2-ai-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--v2-radius-pill);
    background: transparent;
    color: var(--v2-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.v2-ai-tab.is-active {
    background: var(--v2-gradient-brand);
    color: #fff;
    box-shadow: 0 6px 16px rgba(59, 91, 249, 0.22);
}

.v2-ai-tab-icon {
    font-size: 16px;
}

.v2-ai-tab-panel {
    display: none;
}

.v2-ai-tab-panel.is-active {
    display: block;
}

.v2-ai-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.v2-ai-tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border-radius: var(--v2-radius-lg);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s var(--v2-ease), box-shadow 0.2s var(--v2-ease);
}

.v2-ai-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--v2-shadow-md);
    border-color: rgba(59, 91, 249, 0.2);
}

.v2-ai-tool-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff, #ede9fe);
    font-size: 24px;
}

.v2-ai-tool-card h3 {
    margin: 0;
    font-size: 20px;
}

.v2-ai-tool-card p {
    margin: 0;
    flex: 1;
    font-size: 14px;
    color: var(--v2-text-muted);
    line-height: 1.6;
}

.v2-ai-tool-card-cta {
    font-size: 14px;
    font-weight: 700;
    color: var(--v2-primary);
}

.v2-ai-workspace-wrap {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding-top: 24px;
    align-items: start;
}

.v2-ai-sidebar {
    position: sticky;
    top: calc(var(--v2-header-h) + 16px);
    padding: 18px;
    border-radius: var(--v2-radius-lg);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
}

.v2-ai-back {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-primary);
    text-decoration: none;
}

.v2-ai-sidebar-group + .v2-ai-sidebar-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--v2-border);
}

.v2-ai-sidebar-label {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--v2-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.v2-ai-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--v2-text);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.v2-ai-sidebar-link:hover {
    background: rgba(59, 91, 249, 0.06);
}

.v2-ai-sidebar-link.is-active {
    background: rgba(59, 91, 249, 0.1);
    color: var(--v2-primary);
}

.v2-ai-workspace-head h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.v2-ai-workspace-head p {
    margin: 0;
    color: var(--v2-text-muted);
    line-height: 1.6;
}

.v2-ai-panel,
.v2-ai-result {
    margin-top: 20px;
    padding: 24px;
    border-radius: var(--v2-radius-lg);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
}

.v2-ai-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--v2-text);
}

.v2-ai-textarea,
.v2-ai-select,
.v2-ai-file {
    width: 100%;
    font: inherit;
    color: var(--v2-text);
    background: #f9fafb;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-md);
}

.v2-ai-textarea {
    padding: 14px 16px;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.v2-ai-textarea:focus,
.v2-ai-select:focus,
.v2-ai-file:focus {
    outline: none;
    border-color: rgba(59, 91, 249, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.12);
}

.v2-ai-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.v2-ai-option label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-text-muted);
}

.v2-ai-option-wide {
    grid-column: 1 / -1;
}

.v2-ai-select,
.v2-ai-file {
    padding: 10px 12px;
    font-size: 14px;
}

/* 自定义下拉（替代原生 select，圆角与面板一体） */
.v2-custom-select {
    position: relative;
}

.v2-custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.v2-custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-md);
    background: #f9fafb;
    color: var(--v2-text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.2s;
}

.v2-custom-select-trigger:hover {
    border-color: rgba(59, 91, 249, 0.25);
}

.v2-custom-select.is-open .v2-custom-select-trigger,
.v2-custom-select-trigger:focus-visible {
    outline: none;
    border-color: rgba(59, 91, 249, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.12);
}

.v2-custom-select.is-open .v2-custom-select-trigger {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    box-shadow: none;
}

.v2-custom-select-caret {
    font-size: 10px;
    color: var(--v2-text-muted);
    transition: transform 0.2s;
}

.v2-custom-select.is-open .v2-custom-select-caret {
    transform: rotate(180deg);
}

.v2-custom-select-menu {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(59, 91, 249, 0.45);
    border-top: none;
    border-radius: 0 0 var(--v2-radius-md) var(--v2-radius-md);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.v2-custom-select-menu[hidden] {
    display: none !important;
}

.v2-custom-select-option {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--v2-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.v2-custom-select-option:hover,
.v2-custom-select-option.is-active {
    background: rgba(59, 91, 249, 0.08);
    color: var(--v2-primary);
}

.v2-custom-select-option.is-selected {
    background: var(--v2-gradient-brand);
    color: #fff;
    font-weight: 600;
}

.v2-custom-select-option.is-selected:hover {
    color: #fff;
    filter: brightness(1.03);
}

/* 拖拽上传（与后台 manuals 交互一致，样式贴合 2.0） */
.v2-drop-zone {
    border: 2px dashed rgba(59, 91, 249, 0.28);
    border-radius: var(--v2-radius-md);
    padding: 28px 20px;
    text-align: center;
    background: linear-gradient(180deg, #f8faff 0%, #f4f6fb 100%);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.v2-drop-zone:hover,
.v2-drop-zone.is-dragover {
    border-color: var(--v2-primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.1);
}

.v2-drop-zone-icon {
    font-size: 40px;
    margin-bottom: 10px;
    line-height: 1;
}

.v2-drop-zone-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--v2-text);
}

.v2-drop-zone-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-drop-zone-preview[hidden] {
    display: none !important;
}

.v2-drop-zone-preview:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.v2-drop-zone.has-file .v2-drop-zone-body {
    display: none;
}

.v2-drop-zone-preview img {
    display: block;
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: var(--v2-shadow-sm);
    background: #fff;
}

.v2-drop-zone-preview img:not([src]) {
    display: none;
}

.v2-drop-zone-preview-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--v2-text-muted);
}

.v2-drop-zone-clear {
    padding: 4px 12px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-pill);
    background: #fff;
    color: var(--v2-hot);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.v2-drop-zone.is-error {
    border-color: var(--v2-hot);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.v2-required {
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-hot);
}

.v2-ai-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.v2-ai-hints-label {
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-ai-hint {
    padding: 6px 12px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-pill);
    background: #fff;
    color: var(--v2-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.v2-ai-hint:hover {
    background: rgba(59, 91, 249, 0.06);
}

.v2-ai-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.v2-ai-generate {
    min-width: 160px;
}

.v2-ai-actions-note {
    font-size: 12px;
    color: var(--v2-text-light);
}

.v2-ai-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.v2-ai-result-head h2 {
    margin: 0;
    font-size: 18px;
}

.v2-ai-result-badge {
    padding: 4px 10px;
    border-radius: var(--v2-radius-pill);
    background: rgba(59, 91, 249, 0.08);
    color: var(--v2-primary);
    font-size: 12px;
    font-weight: 700;
}

.v2-ai-result-empty {
    text-align: center;
    padding: 20px 12px 8px;
}

.v2-ai-result-preview {
    width: min(100%, 420px);
    aspect-ratio: 16 / 10;
    margin: 0 auto 16px;
    border-radius: var(--v2-radius-md);
    background:
        linear-gradient(135deg, rgba(59, 91, 249, 0.08), rgba(124, 58, 237, 0.08)),
        repeating-linear-gradient(
            -45deg,
            rgba(148, 163, 184, 0.12),
            rgba(148, 163, 184, 0.12) 8px,
            transparent 8px,
            transparent 16px
        );
    border: 1px dashed rgba(59, 91, 249, 0.25);
}

.v2-ai-result.is-pending .v2-ai-result-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--v2-accent-green);
}

.v2-ai-result.is-pending .v2-ai-result-preview {
    animation: v2-ai-pulse 1.4s ease-in-out infinite;
}

@keyframes v2-ai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.v2-ai-result-empty p {
    margin: 0;
    color: var(--v2-text-muted);
    font-size: 14px;
}

.v2-ai-result-tip {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: var(--v2-text-light) !important;
}

.v2-ai-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    padding: 12px 18px;
    border-radius: var(--v2-radius-pill);
    background: rgba(26, 31, 54, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--v2-shadow-lg);
    transition: opacity 0.25s, transform 0.25s;
    z-index: 1200;
}

.v2-ai-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1024px) {
    .v2-brand-slogan {
        display: none;
    }

    .v2-nav {
        display: none;
    }

    .v2-search {
        width: 180px;
    }

    .v2-category-grid,
    .v2-promo-grid {
        grid-template-columns: 1fr;
    }

    .v2-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .v2-ai-tool-grid {
        grid-template-columns: 1fr;
    }

    .v2-ai-workspace-wrap {
        grid-template-columns: 1fr;
    }

    .v2-ai-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .v2-search {
        display: none;
    }

    .v2-stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .v2-course-card {
        flex-basis: 200px;
    }
}

/* ===== 课程详情 / 播放页 (lesson.php) ===== */
.v2-lesson-page {
    padding-bottom: 32px;
}

.v2-lesson-mobile-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 0 14px;
}

.v2-lesson-mobile-bar .back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v2-radius-sm);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    color: var(--v2-primary);
    text-decoration: none;
}

.v2-lesson-mobile-bar .nav-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--v2-text);
}

.v2-lesson-page .course-banner {
    border-radius: var(--v2-radius-lg);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--v2-shadow-sm);
}

.v2-lesson-page .banner-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--v2-text-muted);
    flex-wrap: wrap;
}

.v2-lesson-page .banner-breadcrumb a {
    color: var(--v2-text-muted);
    text-decoration: none;
}

.v2-lesson-page .banner-breadcrumb a:hover {
    color: var(--v2-primary);
}

.v2-lesson-page .banner-breadcrumb .sep {
    color: var(--v2-text-light);
}

.v2-lesson-page .banner-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--v2-text);
    margin-bottom: 12px;
    line-height: 1.35;
}

.v2-lesson-page .banner-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.v2-lesson-page .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--v2-text-muted);
    background: rgba(255, 255, 255, 0.72);
    padding: 6px 14px;
    border-radius: var(--v2-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.v2-lesson-page .course-body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.v2-lesson-page .video-section {
    flex: 1;
    min-width: 0;
}

.v2-lesson-page .video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
    border-radius: var(--v2-radius-lg);
    overflow: hidden;
    box-shadow: var(--v2-shadow-md);
}

.v2-lesson-page .video-player video {
    width: 100%;
    height: 100%;
}

.v2-lesson-page .video-info {
    margin-top: 16px;
    padding: 18px 20px;
    background: var(--v2-surface);
    border-radius: var(--v2-radius-md);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
}

.v2-lesson-page .video-info-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--v2-text);
    margin-bottom: 8px;
}

.v2-lesson-page .video-info-desc {
    font-size: 14px;
    color: var(--v2-text-muted);
    line-height: 1.7;
}

.v2-lesson-page .pdf-open-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: var(--v2-radius-md);
    border: 1px solid #bfdbfe;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.v2-lesson-page .pdf-open-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 91, 249, 0.12);
}

.v2-lesson-page .pdf-open-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-lesson-page .pdf-open-bar-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
}

.v2-lesson-page .pdf-open-bar-hint {
    font-size: 12px;
    color: #60a5fa;
    margin-top: 2px;
}

.v2-lesson-page .pdf-open-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.v2-lesson-page .pdf-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #3b5bf9;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}

.v2-lesson-page .pdf-dl-btn:hover {
    background: #2f4de0;
    color: #fff;
}

.v2-lesson-page .pdf-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(191, 219, 254, 0.5);
}

.v2-lesson-page .pdf-list-item:hover {
    background: rgba(219, 234, 254, 0.5) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 91, 249, 0.1);
}

.v2-lesson-page .pdf-viewer-container {
    width: 100%;
    min-height: 500px;
    background: #fff;
    border-radius: var(--v2-radius-lg);
    overflow: hidden;
    border: 1px solid var(--v2-border);
    display: none;
    margin-top: 12px;
}

.v2-lesson-page .chapter-section {
    width: 320px;
    flex-shrink: 0;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-lg);
    padding: 18px;
    box-shadow: var(--v2-shadow-sm);
}

.v2-lesson-page .chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.v2-lesson-page .chapter-header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--v2-text);
}

.v2-lesson-page .chapter-count {
    font-size: 12px;
    color: var(--v2-text-muted);
    background: var(--v2-bg);
    padding: 4px 12px;
    border-radius: var(--v2-radius-pill);
}

.v2-lesson-page .chapter-list {
    max-height: 520px;
    overflow-y: auto;
}

.v2-lesson-page .chapter-group {
    margin-bottom: 16px;
}

.v2-lesson-page .chapter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--v2-text);
    padding: 12px 14px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-lesson-page .chapter-title-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-lesson-page .chapter-title-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
}

.v2-lesson-page .chapter-title.chapter-clickable {
    cursor: pointer;
    transition: background 0.2s;
}

.v2-lesson-page .chapter-title.chapter-clickable:hover {
    background: #e8eeff;
}

.v2-lesson-page .chapter-title-icon {
    width: 28px;
    height: 28px;
    background: var(--v2-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.v2-lesson-page .lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-lesson-page .lesson-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--v2-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    gap: 10px;
}

.v2-lesson-page .lesson-item:hover {
    background: var(--v2-bg);
}

.v2-lesson-page .lesson-num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--v2-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-text-muted);
    flex-shrink: 0;
}

/* 小节数字图标保持浅色，不随点击状态变化 */
/* .v2-lesson-page .lesson-item.active .lesson-num {
    background: var(--v2-text);
    color: #fff;
} */

.v2-lesson-page .lesson-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-lesson-page .lesson-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-lesson-page .lesson-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.v2-lesson-page .lesson-duration {
    font-size: 12px;
    color: var(--v2-text-light);
}

.v2-lesson-page .lesson-free {
    font-size: 11px;
    padding: 2px 8px;
    background: #d1fae5;
    color: #047857;
    border-radius: var(--v2-radius-pill);
}

.v2-lesson-page .lesson-preview-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: #fef3c7;
    color: #b45309;
    border-radius: var(--v2-radius-pill);
}

.v2-lesson-page .lesson-locked {
    opacity: 0.55;
    cursor: not-allowed !important;
}

.v2-lesson-page .empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--v2-text-muted);
}

.v2-lesson-page .empty-state .icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.v2-lesson-page .video-locked {
    position: relative;
}

.v2-lesson-page .lock-overlay,
.v2-lesson-page .preview-expire-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--v2-radius-lg);
    z-index: 10;
}

.v2-lesson-page .lock-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.v2-lesson-page .lock-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.v2-lesson-page .lock-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}

.v2-lesson-page .lock-btn {
    padding: 12px 28px;
    background: var(--v2-gradient-brand);
    color: #fff;
    border: none;
    border-radius: var(--v2-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}

.v2-lesson-page .lock-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.v2-lesson-page .preview-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    max-width: calc(100% - 24px);
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--v2-radius-pill);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
}

.v2-lesson-page .preview-expire-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--v2-gold);
    margin-bottom: 8px;
}

.v2-lesson-page .fav-btn {
    display: inline-block;
    font-size: 22px;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
    transition: transform 0.2s;
}

.v2-lesson-page .fav-btn:hover {
    transform: scale(1.15);
}

.v2-lesson-page .review-section {
    margin-top: 16px;
    padding: 20px;
    background: var(--v2-surface);
    border-radius: var(--v2-radius-md);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
}

.v2-lesson-page .review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.v2-lesson-page .review-title {
    font-size: 16px;
    font-weight: 700;
}

.v2-lesson-page .review-avg {
    color: var(--v2-gold);
    font-weight: 600;
    font-size: 14px;
}

.v2-lesson-page .review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.v2-lesson-page .review-item {
    padding: 12px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-sm);
}

.v2-lesson-page .review-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.v2-lesson-page .review-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text-muted);
}

.v2-lesson-page .review-stars {
    color: var(--v2-gold);
    font-size: 13px;
}

.v2-lesson-page .review-content {
    font-size: 13px;
    color: var(--v2-text-muted);
    line-height: 1.6;
}

.v2-lesson-page .review-time {
    font-size: 11px;
    color: var(--v2-text-light);
    margin-top: 4px;
}

.v2-lesson-page .review-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--v2-border);
}

.v2-lesson-page .star-select {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.v2-lesson-page .star-select span {
    font-size: 24px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s;
}

.v2-lesson-page .star-select span.active {
    color: var(--v2-gold);
}

.v2-lesson-page .review-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    outline: none;
    font-family: inherit;
}

.v2-lesson-page .review-textarea:focus {
    border-color: rgba(59, 91, 249, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.1);
}

.v2-lesson-page .review-submit {
    margin-top: 8px;
    padding: 8px 18px;
    background: var(--v2-primary);
    color: #fff;
    border: none;
    border-radius: var(--v2-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.v2-lesson-page .review-submit:hover {
    background: var(--v2-primary-dark);
}

.v2-lesson-page .mobile-course-info {
    display: none;
}

@media (max-width: 1000px) {
    .v2-lesson-page .course-body {
        flex-direction: column;
    }

    .v2-lesson-page .chapter-section {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .v2-lesson-mobile-bar {
        display: flex;
    }

    .v2-lesson-page .course-banner {
        display: none;
    }

    .v2-lesson-page .course-body {
        gap: 0;
    }

    .v2-lesson-page .video-player {
        border-radius: 0;
        box-shadow: none;
    }

    .v2-lesson-page .video-section {
        margin: 0 calc(50% - 50vw);
        width: 100vw;
        max-width: 100vw;
    }

    .v2-lesson-page .video-info {
        display: none;
    }

    .v2-lesson-page .mobile-course-info {
        display: block;
        padding: 16px;
        background: var(--v2-surface);
        border-bottom: 1px solid var(--v2-border);
        margin: 0 calc(50% - 50vw) 12px;
        width: 100vw;
        max-width: 100vw;
    }

    .v2-lesson-page .mobile-course-info .m-title {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .v2-lesson-page .mobile-course-info .m-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .v2-lesson-page .mobile-course-info .m-meta-item {
        font-size: 12px;
        color: var(--v2-text-muted);
        background: var(--v2-bg);
        padding: 4px 12px;
        border-radius: var(--v2-radius-pill);
    }

    .v2-lesson-page .chapter-section {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 24px;
    }

    .v2-lesson-page .review-section {
        border-radius: 0;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
        max-width: 100vw;
    }
}

/* ===== 子模块课程列表 (course.php) ===== */
.v2-course-page {
    padding-bottom: 40px;
}

.v2-course-page .course-banner {
    border-radius: var(--v2-radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--v2-shadow-sm);
}

.v2-course-page .banner-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--v2-text-muted);
    flex-wrap: wrap;
}

.v2-course-page .banner-breadcrumb a {
    color: var(--v2-text-muted);
    text-decoration: none;
}

.v2-course-page .banner-breadcrumb a:hover {
    color: var(--v2-primary);
}

.v2-course-page .banner-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--v2-text);
    margin-bottom: 12px;
}

.v2-course-page .banner-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.v2-course-page .meta-item {
    font-size: 13px;
    color: var(--v2-text-muted);
    background: rgba(255, 255, 255, 0.72);
    padding: 6px 14px;
    border-radius: var(--v2-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.v2-course-page .courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.v2-course-page .course-item {
    border-radius: var(--v2-radius-lg);
    padding: 20px;
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.v2-course-page .course-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--v2-shadow-md);
}

.v2-course-page .course-item-locked {
    opacity: 0.85;
}

.v2-course-page .course-lock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border-radius: var(--v2-radius-pill);
}

.v2-course-page .course-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.v2-course-page .course-item-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.v2-course-page .course-item-rating {
    font-size: 13px;
    font-weight: 600;
}

.v2-course-page .course-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--v2-text);
    margin-bottom: 16px;
    line-height: 1.45;
    min-height: 46px;
}

.v2-course-page .course-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.v2-course-page .course-item-students {
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-course-page .course-item-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    background: var(--v2-primary);
    color: #fff;
    border-radius: var(--v2-radius-pill);
    text-decoration: none;
    transition: background 0.2s;
}

.v2-course-page .course-item-btn:hover {
    background: var(--v2-primary-dark);
}

.v2-course-page .course-upgrade-hint {
    font-size: 12px;
    color: var(--v2-hot);
    font-weight: 600;
}

@media (max-width: 1000px) {
    .v2-course-page .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .v2-course-page .courses-grid {
        grid-template-columns: 1fr;
    }

    .v2-course-page .course-banner {
        padding: 20px;
    }

    .v2-course-page .banner-title {
        font-size: 22px;
    }
}

/* ===== 全部课程列表 (index.php) ===== */
.v2-courses-page {
    padding: 24px 0 48px;
}

.v2-courses-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.v2-courses-nav {
    position: sticky;
    top: calc(var(--v2-header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-sm);
}

.v2-courses-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--v2-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--v2-text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.v2-courses-nav-item:hover {
    background: var(--v2-bg);
    color: var(--v2-text);
}

.v2-courses-nav-item.is-active {
    background: rgba(59, 91, 249, 0.1);
    color: var(--v2-primary);
    font-weight: 600;
}

.v2-courses-nav-icon {
    display: flex;
    flex-shrink: 0;
}

.v2-courses-main {
    min-width: 0;
}

.v2-courses-page .main-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.v2-courses-page .main-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--v2-text);
    margin: 0 0 6px;
}

.v2-courses-page .main-subtitle {
    font-size: 14px;
    color: var(--v2-text-muted);
    margin: 0;
}

.v2-courses-page .desktop-search-box {
    position: relative;
    flex-shrink: 0;
    width: min(100%, 280px);
}

.v2-courses-page .desktop-search-box input {
    width: 100%;
    padding: 10px 36px 10px 38px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-pill);
    background: var(--v2-surface);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.v2-courses-page .desktop-search-box input:focus {
    border-color: rgba(59, 91, 249, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.1);
}

.v2-courses-page .desktop-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.v2-courses-page .desktop-search-box .search-icon svg {
    width: 16px;
    height: 16px;
}

.v2-courses-page .search-shortcut {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--v2-text-light);
    background: var(--v2-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.v2-courses-page .search-clear {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--v2-text-light);
    cursor: pointer;
    font-size: 12px;
}

.v2-courses-page .search-result-count {
    display: none;
    font-size: 12px;
    color: var(--v2-primary);
    margin-top: 6px;
}

.v2-courses-page .category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.v2-courses-page .category-tab {
    padding: 8px 16px;
    border-radius: var(--v2-radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--v2-text-muted);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    text-decoration: none;
    transition: all 0.15s;
}

.v2-courses-page .category-tab:hover {
    border-color: rgba(59, 91, 249, 0.25);
    color: var(--v2-primary);
}

.v2-courses-page .category-tab.active {
    background: var(--v2-gradient-brand);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.v2-courses-page .section-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--v2-text);
    margin: 24px 0 14px;
}

.v2-courses-page .section-label:first-child {
    margin-top: 0;
}

.v2-courses-page .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.v2-courses-page .course-card {
    display: block;
    padding: 18px;
    border-radius: var(--v2-radius-lg);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.v2-courses-page .course-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--v2-shadow-md);
}

.v2-courses-page .course-card-locked {
    opacity: 0.88;
}

.v2-courses-page .card-lock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border-radius: var(--v2-radius-pill);
}

.v2-courses-page .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.v2-courses-page .card-category {
    font-size: 12px;
    color: var(--v2-text-muted);
    font-weight: 500;
}

.v2-courses-page .card-rating {
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-gold);
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 8px;
    border-radius: var(--v2-radius-pill);
}

.v2-courses-page .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--v2-text);
    line-height: 1.45;
    margin-bottom: 12px;
    min-height: 44px;
}

.v2-courses-page .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.v2-courses-page .card-students {
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-courses-page .card-upgrade-hint {
    font-size: 12px;
    color: var(--v2-hot);
    font-weight: 600;
}

.v2-courses-aside {
    position: sticky;
    top: calc(var(--v2-header-h) + 16px);
    padding: 18px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-sm);
}

.v2-courses-aside .panel-header {
    display: none;
}

.v2-courses-aside .panel-redeem-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    margin-bottom: 18px;
    border-radius: var(--v2-radius-md);
    background: var(--v2-gradient-purple);
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s;
}

.v2-courses-aside .panel-redeem-card:hover {
    transform: translateY(-2px);
}

.v2-courses-aside .redeem-title {
    font-size: 14px;
    font-weight: 700;
}

.v2-courses-aside .redeem-desc {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.v2-courses-aside .redeem-btn {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: var(--v2-radius-pill);
}

.v2-courses-aside .module-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-pill);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.v2-courses-aside .module-intro-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.v2-courses-aside .module-intro-desc {
    font-size: 13px;
    color: var(--v2-text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.v2-courses-aside .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.v2-courses-aside .stat-item {
    text-align: center;
    padding: 12px 6px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
}

.v2-courses-aside .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--v2-text);
}

.v2-courses-aside .stat-label {
    font-size: 11px;
    color: var(--v2-text-muted);
    margin-top: 2px;
}

.v2-courses-aside .tags-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.v2-courses-aside .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.v2-courses-aside .tag {
    font-size: 12px;
    padding: 5px 12px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-pill);
    color: var(--v2-text-muted);
}

.v2-courses-aside .panel-courses-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.v2-courses-aside .panel-course-item {
    padding: 12px 14px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
    margin-bottom: 8px;
    transition: background 0.15s;
}

.v2-courses-aside .panel-course-item:hover {
    background: #e8eeff;
}

.v2-courses-aside .panel-course-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.v2-courses-aside .panel-course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-courses-page #lockedModal > div {
    border-radius: var(--v2-radius-lg);
}

@media (max-width: 1100px) {
    .v2-courses-layout {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .v2-courses-aside {
        display: none;
    }
}

@media (max-width: 900px) {
    .v2-courses-layout {
        grid-template-columns: 1fr;
    }

    .v2-courses-nav {
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .v2-courses-nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .v2-courses-page .main-header {
        flex-direction: column;
    }

    .v2-courses-page .desktop-search-box {
        width: 100%;
    }

    .v2-courses-page .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 个人中心 (profile.php · 2.0 设计稿) ===== */
.v2-profile-page {
    padding: 20px 0 48px;
    max-width: 960px;
}
.pf-head {
    margin-bottom: 18px;
}
.pf-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.2px;
}
.pf-welcome {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.pf-card {
    position: relative;
    margin-bottom: 16px;
    padding: 22px 24px 18px;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 55% 80% at 8% 20%, rgba(196, 181, 253, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 92% 18%, rgba(253, 186, 116, 0.28) 0%, transparent 50%),
        linear-gradient(135deg, #f3f0ff 0%, #faf5ff 40%, #fff7ed 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(221, 214, 254, 0.55);
}
.pf-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}
.pf-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #5b21b6;
    background: linear-gradient(145deg, #ede9fe, #c4b5fd);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
    overflow: hidden;
}
.pf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pf-card-main {
    flex: 1;
    min-width: 0;
    padding-right: 110px;
}
.pf-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.pf-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}
.pf-level {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.pf-bio {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}
.pf-expire {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8b5cf6;
    font-weight: 600;
}
.pf-edit {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, box-shadow .15s;
}
.pf-edit svg {
    display: block;
}
.pf-edit:hover {
    border-color: #c4b5fd;
    color: #6d28d9;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.1);
}

.pf-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(196, 181, 253, 0.35);
}
.pf-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pf-meta-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fff;
    color: #7c3aed;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}
.pf-meta-ico svg {
    display: block;
    margin: auto;
}
.pf-meta-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 2px;
}
.pf-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pf-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f0f0f3;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.pf-menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}
.pf-menu-ico {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}
.pf-menu-ico svg {
    display: block;
    margin: auto;
}
.pf-menu-copy {
    flex: 1;
    min-width: 0;
}
.pf-menu-copy strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
}
.pf-menu-copy small {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.45;
}
.pf-menu-points {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 800;
    color: #7c3aed;
    margin-right: 4px;
}
.pf-menu-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.pf-menu-arrow {
    flex-shrink: 0;
    color: #d1d5db;
    font-size: 22px;
    line-height: 1;
    font-weight: 300;
}

.pf-menu-item.is-gold .pf-menu-ico { background: #fff1e0; color: #f59e0b; }
.pf-menu-item.is-gold .pf-menu-btn { background: #f59e0b; color: #fff; }
.pf-menu-item.is-purple .pf-menu-ico { background: #efeaff; color: #7c3aed; }
.pf-menu-item.is-purple .pf-menu-btn { background: #7c3aed; color: #fff; }
.pf-menu-item.is-blue .pf-menu-ico { background: #e8f1ff; color: #3b82f6; }
.pf-menu-item.is-blue .pf-menu-btn { background: #3b82f6; color: #fff; }
.pf-menu-item.is-yellow .pf-menu-ico { background: #fff6db; color: #eab308; }
.pf-menu-item.is-yellow .pf-menu-btn { background: #fff6db; color: #ca8a04; }
.pf-menu-item.is-green .pf-menu-ico { background: #e8faf0; color: #16a34a; }
.pf-menu-item.is-green .pf-menu-btn { background: #dcfce7; color: #15803d; }
.pf-menu-item.is-red .pf-menu-ico { background: #ffe8e8; color: #ef4444; }
.pf-menu-item.is-red .pf-menu-btn { background: #ef4444; color: #fff; }

.pf-panels {
    margin-top: 24px;
}
.pf-panel-sub {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 12px;
}
.pf-list-go {
    font-size: 12px;
    color: #6366f1;
    font-weight: 600;
    flex-shrink: 0;
}
.pf-order-no,
.pf-order-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}
.pf-order-plan {
    font-size: 15px;
    font-weight: 600;
    margin-right: 8px;
}
.pf-order-line {
    font-size: 13px;
    padding: 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.v2-profile-section {
    display: none;
    background: #fff;
    border: 1px solid #f0f0f3;
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.v2-profile-section.is-active {
    display: block;
}
.v2-profile-section-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
}

@media (max-width: 800px) {
    .pf-card-main {
        padding-right: 0;
    }
    .pf-edit {
        position: static;
        margin-left: auto;
    }
    .pf-card-top {
        flex-wrap: wrap;
    }
    .pf-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .pf-title {
        font-size: 24px;
    }
    .pf-menu-item {
        flex-wrap: wrap;
    }
    .pf-menu-points {
        width: 100%;
        margin: 0 0 0 62px;
    }
    .pf-menu-btn {
        margin-left: auto;
    }
    .pf-meta {
        grid-template-columns: 1fr;
    }
}

.v2-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.v2-profile-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
}

.v2-profile-stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--v2-primary);
    line-height: 1.2;
}

.v2-profile-stat-label {
    font-size: 12px;
    color: var(--v2-text-muted);
    margin-top: 4px;
}

.v2-profile-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
    transition: background 0.15s;
}

.v2-profile-list-item:hover {
    background: #e8eeff;
}

.v2-profile-list-item:last-child {
    margin-bottom: 0;
}

.v2-profile-list-thumb {
    width: 52px;
    height: 36px;
    border-radius: var(--v2-radius-sm);
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.v2-profile-list-body {
    flex: 1;
    min-width: 0;
}

.v2-profile-list-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-profile-list-meta {
    font-size: 12px;
    color: var(--v2-text-muted);
    margin-top: 2px;
}

.v2-profile-progress {
    width: 56px;
    flex-shrink: 0;
}

.v2-profile-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.v2-profile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--v2-primary), #818cf8);
    border-radius: 3px;
}

.v2-profile-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--v2-text-muted);
}

.v2-profile-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.v2-profile-empty a {
    color: var(--v2-primary);
    font-weight: 600;
    text-decoration: none;
}

.v2-profile-order {
    padding: 14px 16px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
    margin-bottom: 10px;
}

.v2-profile-order:last-child {
    margin-bottom: 0;
}

.v2-profile-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.v2-profile-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--v2-radius-pill);
    font-size: 11px;
    font-weight: 600;
}

.v2-profile-order-amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--v2-gold);
}

.v2-profile-alert {
    padding: 12px 14px;
    border-radius: var(--v2-radius-md);
    font-size: 14px;
    margin-bottom: 16px;
}

.v2-profile-alert.success {
    background: #d1fae5;
    color: #065f46;
}

.v2-profile-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.v2-profile-link-chip {
    padding: 8px 14px;
    border-radius: var(--v2-radius-pill);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text-muted);
    text-decoration: none;
    transition: all 0.15s;
}

.v2-profile-link-chip:hover {
    color: var(--v2-primary);
    border-color: rgba(59, 91, 249, 0.3);
    background: #eef2ff;
}

/* 表单页（编辑资料 / 修改密码 / 找回密码） */
.v2-form-page {
    padding: 8px 0 56px;
    max-width: 480px;
    margin: 0 auto;
}

.v2-form-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-xl);
    padding: 32px 28px;
    box-shadow: var(--v2-shadow-md);
}

.v2-form-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.v2-form-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: var(--v2-radius-md);
    background: var(--v2-gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.v2-form-avatar-wrap {
    text-align: center;
    margin-bottom: 24px;
}
.v2-form-avatar {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.v2-form-avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ede9fe, #c4b5fd);
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}
.v2-form-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.v2-form-avatar-fallback {
    font-size: 32px;
    font-weight: 700;
    color: #5b21b6;
    line-height: 1;
}
.v2-form-avatar-badge {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.v2-form-avatar-badge svg {
    display: block;
}
.v2-form-avatar-hint {
    margin-top: 10px;
}
.v2-form-required {
    color: #ef4444;
    font-weight: 700;
}
.v2-form-submit {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 55%, #0ea5e9 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.v2-form-cancel {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--v2-border);
    color: var(--v2-text-muted);
    background: #fff;
}
.v2-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.v2-form-card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
}

.v2-form-card-desc {
    font-size: 14px;
    color: var(--v2-text-muted);
    margin: 0;
}

.v2-form-group {
    margin-bottom: 18px;
}

.v2-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text);
    margin-bottom: 8px;
}

.v2-form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--v2-text);
    background: var(--v2-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.v2-form-input:focus {
    outline: none;
    border-color: var(--v2-primary);
    box-shadow: 0 0 0 3px rgba(59, 91, 249, 0.12);
    background: #fff;
}

.v2-form-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.v2-form-hint {
    font-size: 12px;
    color: var(--v2-text-light);
    margin-top: 6px;
}

.v2-form-back {
    text-align: center;
    margin-top: 20px;
}

.v2-form-back a {
    font-size: 14px;
    color: var(--v2-text-muted);
    text-decoration: none;
}

.v2-form-back a:hover {
    color: var(--v2-primary);
}

.v2-form-alert {
    padding: 12px 14px;
    border-radius: var(--v2-radius-md);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.v2-form-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.v2-form-alert.success {
    background: #d1fae5;
    color: #065f46;
}

.v2-form-user-chip {
    text-align: center;
    padding: 12px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
    margin-bottom: 18px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .v2-profile-menu {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .v2-profile-menu-item {
        padding: 14px 6px;
        font-size: 12px;
    }

    .v2-profile-meta {
        grid-template-columns: 1fr;
    }

    .v2-profile-stats {
        gap: 8px;
    }

    .v2-form-card {
        padding: 24px 18px;
        border-radius: var(--v2-radius-lg);
    }
}

/* ===== 登录注册 (login.php) ===== */
.v2-auth-page {
    padding: 16px 0 56px;
}

.v2-auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    max-width: 960px;
    margin: 0 auto;
}

.v2-auth-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-xl);
    padding: 36px 32px;
    box-shadow: var(--v2-shadow-md);
}

.v2-auth-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.v2-auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 24px;
    background: var(--v2-bg);
    border-radius: var(--v2-radius-md);
}

.v2-auth-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: var(--v2-radius-sm);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--v2-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.v2-auth-tab.is-active {
    background: var(--v2-surface);
    color: var(--v2-primary);
    box-shadow: var(--v2-shadow-sm);
}

.v2-auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.v2-auth-forgot {
    text-align: right;
    margin-top: 10px;
}

.v2-auth-forgot a {
    font-size: 13px;
    color: var(--v2-text-muted);
    text-decoration: none;
}

.v2-auth-forgot a:hover {
    color: var(--v2-primary);
}

.v2-auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--v2-text-muted);
}

.v2-auth-switch a {
    color: var(--v2-primary);
    font-weight: 600;
    text-decoration: none;
}

.v2-auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 10px;
    font-size: 13px;
    color: var(--v2-text-muted);
    line-height: 1.55;
    cursor: pointer;
}

.v2-auth-terms input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: var(--v2-primary);
}

.v2-auth-terms a {
    color: var(--v2-primary);
    text-decoration: none;
}

.v2-auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
    border-radius: var(--v2-radius-xl);
    background: var(--v2-gradient-purple);
    color: #fff;
    box-shadow: var(--v2-shadow-md);
    position: relative;
    overflow: hidden;
}

.v2-auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.v2-auth-aside-inner {
    position: relative;
}

.v2-auth-aside-emoji {
    font-size: 56px;
    margin-bottom: 20px;
}

.v2-auth-aside-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.v2-auth-aside-desc {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.92;
    margin: 0;
}

.v2-auth-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 28px;
}

.v2-auth-stat {
    text-align: center;
    padding: 12px 6px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: var(--v2-radius-md);
    backdrop-filter: blur(4px);
}

.v2-auth-stat-num {
    font-size: 18px;
    font-weight: 700;
}

.v2-auth-stat-label {
    font-size: 10px;
    opacity: 0.88;
    margin-top: 4px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .v2-auth-page {
        padding: 8px 0 24px;
    }

    .v2-auth-layout {
        grid-template-columns: 1fr;
        max-width: 480px;
        gap: 12px;
    }

    /* 手机端：登录表单置顶，首屏即可输入；宣传区压缩并放到下方 */
    .v2-auth-card {
        order: 0;
        padding: 22px 18px;
    }

    .v2-auth-aside {
        order: 1;
        padding: 16px 18px;
    }

    .v2-auth-aside-emoji {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .v2-auth-aside-title {
        font-size: 18px;
        line-height: 1.35;
        margin: 0 0 6px;
    }

    .v2-auth-aside-title br {
        display: none;
    }

    .v2-auth-aside-desc {
        font-size: 12px;
        line-height: 1.5;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .v2-auth-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-top: 12px;
    }

    .v2-auth-stat {
        padding: 8px 2px;
    }

    .v2-auth-stat-num {
        font-size: 14px;
    }

    .v2-auth-stat-label {
        font-size: 9px;
        margin-top: 2px;
    }

    .v2-auth-form-row {
        grid-template-columns: 1fr;
    }

    .v2-auth-card-header {
        margin-bottom: 16px;
    }

    .v2-auth-tabs {
        margin-bottom: 16px;
    }
}

@media (max-width: 640px) {
    .v2-auth-page {
        padding: 4px 0 16px;
    }

    .v2-auth-aside-emoji {
        display: none;
    }

    .v2-auth-aside {
        padding: 12px 14px;
    }

    .v2-auth-aside-title {
        font-size: 16px;
    }

    .v2-auth-aside-desc {
        display: none;
    }

    .v2-auth-stats {
        margin-top: 10px;
    }
}

/* ===== 精选资料库 ===== */
.v2-res-page {
    padding-bottom: 0;
    background: #f8f7fc;
    min-height: 60vh;
}
.v2-res-hero {
    padding: 28px 0 10px;
}
.v2-res-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 28px 28px;
    background:
        radial-gradient(ellipse 70% 80% at 8% 20%, rgba(167, 139, 250, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 55% 70% at 92% 15%, rgba(196, 181, 253, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 70% 90%, rgba(221, 214, 254, 0.45) 0%, transparent 55%),
        linear-gradient(135deg, #f3f0ff 0%, #ebe6ff 45%, #f5f3ff 100%);
    border: 1px solid rgba(196, 181, 253, 0.35);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.08);
}
.v2-res-hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 70%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 40%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px);
    background-size: 28px 28px, 36px 36px;
    opacity: 0.45;
    pointer-events: none;
}
.v2-res-hero-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}
.v2-res-hero-copy {
    text-align: left;
    flex: 0 1 220px;
    min-width: 180px;
}
.v2-res-hero-copy h1 {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.2px;
    margin: 0 0 8px;
    line-height: 1.2;
}
.v2-res-hero-copy p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
}
.v2-res-mine {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.12);
    text-decoration: none;
    color: #374151;
    min-width: 180px;
    flex-shrink: 0;
    transition: .2s;
    border: 1px solid rgba(255, 255, 255, 0.9);
}
.v2-res-mine:hover,
.v2-res-mine.is-active {
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}
.v2-res-mine-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    box-sizing: border-box;
}
.v2-res-mine-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    margin: auto;
    flex: none;
}
.v2-res-mine-text {
    flex: 1;
    min-width: 0;
}
.v2-res-mine strong {
    display: block;
    font-size: 14px;
}
.v2-res-mine small {
    color: #9ca3af;
    font-size: 12px;
}
.v2-res-mine-arrow {
    color: #c4b5fd;
    font-size: 22px;
    line-height: 1;
    font-weight: 300;
}
.v2-res-mine-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.v2-res-mine-banner a {
    color: #6d28d9;
    font-weight: 600;
    text-decoration: none;
}
.v2-res-search {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 999px;
    padding: 8px 8px 8px 18px;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.95);
    flex: 1 1 auto;
    min-width: 0;
    max-width: 560px;
    margin: 0 auto;
    height: 52px;
}
.v2-res-search-icon {
    color: #9ca3af;
    display: flex;
    flex-shrink: 0;
}
.v2-res-search input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 14px;
    background: transparent;
    min-width: 0;
}
.v2-res-search-btn {
    border: 0;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
}
.v2-res-body {
    padding-top: 22px;
}
.v2-res-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}
.v2-res-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #ebe7f5;
    transition: .2s;
    cursor: pointer;
}
.v2-res-cat-ico {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: color-mix(in srgb, var(--cat-color, #6366f1) 18%, #fff);
}
.v2-res-cat.is-active,
.v2-res-cat:hover {
    background: var(--cat-color, #6366f1);
    border-color: transparent;
    color: #fff;
}
.v2-res-cat.is-active .v2-res-cat-ico,
.v2-res-cat:hover .v2-res-cat-ico {
    background: rgba(255,255,255,0.22);
}
.v2-res-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.v2-res-sorts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.v2-res-sort {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}
.v2-res-sort.is-active {
    background: #ede9fe;
    color: #5b21b6;
    font-weight: 600;
}
.v2-res-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 13px;
    color: #9ca3af;
    text-align: right;
}
.v2-res-preview-tip {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}
.v2-res-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}
.v2-res-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.v2-res-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}
.v2-res-card-cover {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    flex: 0 0 auto;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.v2-res-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.v2-res-card-cover-deco {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.38) 0 20%, transparent 21%),
        radial-gradient(circle at 62% 68%, rgba(255, 255, 255, 0.2) 0 12%, transparent 13%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.22), transparent 42%);
    pointer-events: none;
}
.v2-res-card-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, transparent 38%, rgba(15, 23, 42, 0.12) 100%);
    pointer-events: none;
}
/* 仅无封面时显示书名，并在默认封面上居中 */
.v2-res-card-cover-title {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}
.v2-res-card-cover.is-placeholder .v2-res-card-cover-shade {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16) 0%, rgba(15, 23, 42, 0.28) 100%);
}
.v2-res-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    z-index: 2;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
}
.v2-res-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-height: 0;
}
.v2-res-card-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.v2-res-card-title a,
.v2-res-card-title button {
    color: #111827;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    width: 100%;
}
/* 资料卡片：分类与标签分离 */
.v2-res-card-catrow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.v2-res-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cat-color, #6366f1);
    line-height: 1.3;
    min-width: 0;
}
.v2-res-card-cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cat-color, #6366f1);
    flex-shrink: 0;
}
.v2-res-card-author,
.v2-res-card-desc {
    margin: 0;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.v2-res-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    max-height: 42px;
    overflow: hidden;
}
.v2-res-card-tags span {
    font-size: 10px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-res-access {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.v2-res-access-free { background: #ecfdf5; color: #047857; }
.v2-res-access-basic { background: #eef2ff; color: #4338ca; }
.v2-res-access-advanced { background: #f3e8ff; color: #7c3aed; }
.v2-res-access-vip { background: #fff7ed; color: #c2410c; }
.v2-res-access.is-locked { background: #f3f4f6; color: #6b7280; }
.v2-res-card-tags span:empty {
    display: none !important;
}
.v2-res-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 11px;
    padding-top: 8px;
}
.v2-res-card-meta span,
.v2-res-meta-dl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.v2-res-card-meta svg,
.v2-res-meta-dl svg {
    display: block;
    width: 14px;
    height: 14px;
    flex: none;
}
.v2-res-meta-dl {
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.v2-res-meta-dl:hover {
    color: #6d28d9;
}
.v2-res-fav {
    margin-left: auto;
    border: 0;
    background: #f5f3ff;
    color: #a78bfa;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: color .2s, background .2s, transform .2s, box-shadow .2s;
}
.v2-res-fav svg {
    display: block;
    width: 16px;
    height: 16px;
    transition: transform .2s;
}
.v2-res-fav:hover {
    color: #7c3aed;
    background: #ede9fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.18);
}
.v2-res-fav:hover svg {
    transform: scale(1.08);
}
.v2-res-fav.is-on {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.28);
}
.v2-res-fav.is-on svg path {
    fill: currentColor;
    stroke: currentColor;
}
.v2-res-fav.is-on:hover {
    color: #fff;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
}
.v2-res-dl-btn {
    display: none;
}
.v2-res-empty {
    text-align: center;
    padding: 64px 20px;
    color: #9ca3af;
}
.v2-res-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.v2-res-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 28px 0 12px;
}
.v2-res-page-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}
.v2-res-page-btn.is-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.v2-res-page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.v2-res-ellipsis {
    color: #9ca3af;
}
.v2-res-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-sizing: border-box;
}
.v2-res-trust-wrap {
    padding: 8px 0 28px;
}
.v2-res-trust-panel {
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    border-radius: 24px;
    padding: 22px 24px;
    background:
        radial-gradient(ellipse 70% 80% at 8% 20%, rgba(167, 139, 250, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 55% 70% at 92% 15%, rgba(196, 181, 253, 0.28) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 70% 90%, rgba(221, 214, 254, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, #f3f0ff 0%, #ebe6ff 45%, #f5f3ff 100%);
    border: 1px solid rgba(196, 181, 253, 0.35);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.08);
}
.v2-res-trust-panel .v2-res-trust {
    position: relative;
    z-index: 1;
}
.v2-res-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
    padding: 6px 10px;
}
.v2-res-trust-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ede9fe;
    color: #7c3aed;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    box-sizing: border-box;
}
.v2-res-trust-ico svg {
    display: block;
    width: 22px;
    height: 22px;
    margin: auto;
    flex: none;
}
.v2-res-trust-copy {
    min-width: 0;
}
.v2-res-trust-copy strong {
    display: block;
    color: #5b21b6;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.v2-res-trust-copy span {
    display: block;
    color: #8b7bb8;
    font-size: 12px;
    line-height: 1.5;
}
.v2-res-legacy-link {
    display: none;
}
.v2-res-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 1000;
}
.v2-res-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.v2-res-learn-modal {
    width: min(100%, 420px);
}
.v2-res-learn-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.v2-res-learn-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

.v2-res-learn-shell {
    max-width: 560px;
    margin: 48px auto;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    padding: 40px 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.v2-res-learn-shell-icon {
    font-size: 42px;
    margin-bottom: 12px;
}
.v2-res-learn-shell h1 {
    margin: 0 0 12px;
    font-size: 22px;
    color: #111827;
}
.v2-res-learn-shell-desc {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}
.v2-res-learn-shell-desc small {
    display: inline-block;
    margin-top: 8px;
    color: #9ca3af;
    font-size: 12px;
}
.v2-res-learn-shell-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* 详情 */
.v2-res-detail-page {
    padding-top: 24px;
}
.v2-res-back {
    display: inline-block;
    margin-bottom: 16px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}
.v2-res-detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.v2-res-detail-cover {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e5e7eb;
}
.v2-res-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.v2-res-detail-cat {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: var(--cat-color, #6366f1);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.v2-res-detail-main h1 {
    margin: 0 0 10px;
    font-size: 26px;
    color: #111827;
}
.v2-res-detail-summary {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 12px;
}
.v2-res-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #9ca3af;
    font-size: 13px;
    margin: 14px 0 18px;
}
.v2-res-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.v2-res-fav-btn.is-on {
    color: #7c3aed;
    border-color: #c4b5fd;
}
.v2-res-detail-tip {
    color: #9ca3af;
    font-size: 13px;
}
.v2-res-locked-box {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    padding: 20px;
    margin: 8px 0 16px;
}
.v2-res-locked-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: #5b21b6;
}
.v2-res-locked-box p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 14px;
}
.v2-res-detail-content {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.v2-res-detail-content h2 {
    font-size: 16px;
    margin: 0 0 10px;
}
.v2-res-detail-html {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}
.v2-res-detail-content.is-blurred {
    filter: blur(2px);
    opacity: 0.55;
    user-select: none;
}

@media (max-width: 1400px) {
    .v2-res-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
@media (max-width: 1100px) {
    .v2-res-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 1100px) {
    .v2-res-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .v2-res-trust-item {
        justify-content: flex-start;
    }
    .v2-res-trust-panel {
        padding: 18px 16px;
    }
}
@media (max-width: 900px) {
    .v2-res-hero-row {
        flex-wrap: wrap;
    }
    .v2-res-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        margin: 0;
    }
}
@media (max-width: 800px) {
    .v2-res-hero-panel {
        padding: 16px;
        border-radius: 16px;
    }
    .v2-res-hero-row {
        flex-direction: column;
        align-items: stretch;
    }
    .v2-res-hero-copy {
        min-width: 0;
    }
    .v2-res-hero-copy p {
        white-space: normal;
    }
    .v2-res-mine {
        width: 100%;
    }
    .v2-res-search {
        max-width: none;
        height: auto;
        padding: 8px 8px 8px 14px;
    }
    .v2-res-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .v2-res-detail-layout {
        grid-template-columns: 1fr;
    }
    .v2-res-detail-cover {
        max-width: 220px;
    }
}
@media (max-width: 520px) {
    .v2-res-grid {
        grid-template-columns: 1fr;
    }
    .v2-res-search {
        border-radius: 14px;
        flex-wrap: wrap;
        padding: 10px;
    }
    .v2-res-search-btn {
        width: 100%;
    }
    .v2-res-trust {
        grid-template-columns: 1fr;
        padding: 18px 14px;
    }
    .v2-res-trust-item {
        justify-content: flex-start;
    }
}

/* ===== 我的学习（独立页） ===== */
.ml-page {
    padding-top: 28px;
    padding-bottom: 48px;
}
.ml-back {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}
.ml-back:hover {
    color: var(--v2-primary, #4f46e5);
}
.ml-card {
    background: #fff;
    border: 1px solid #f0f0f3;
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.ml-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}
.ml-title-ico {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ml-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}
.ml-stat {
    text-align: center;
    padding: 16px 8px;
    background: #f7f4ef;
    border-radius: 12px;
}
.ml-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #f97316;
    line-height: 1.15;
}
.ml-stat-num.is-done {
    color: #22c55e;
}
.ml-stat-label {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}
.ml-sub {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
}
.ml-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ml-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f6f7f9;
    border-radius: 12px;
}
.ml-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.ml-item-body {
    flex: 1;
    min-width: 0;
}
.ml-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ml-item-meta {
    margin-top: 3px;
    font-size: 12px;
    color: #9ca3af;
}
.ml-item-progress {
    width: 72px;
    flex-shrink: 0;
}
.ml-progress-bar {
    height: 6px;
    background: #e8e4dc;
    border-radius: 3px;
    overflow: hidden;
}
.ml-progress-fill {
    height: 100%;
    background: #c4b5a0;
    border-radius: 3px;
}
.ml-start-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.ml-start-btn:hover {
    background: #2563eb;
}
.ml-empty {
    text-align: center;
    padding: 36px 16px 28px;
    color: #9ca3af;
}
.ml-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.ml-empty a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 640px) {
    .ml-card {
        padding: 18px 14px 16px;
    }
    .ml-item {
        flex-wrap: wrap;
    }
    .ml-item-progress {
        width: 100%;
        order: 3;
    }
    .ml-start-btn {
        margin-left: auto;
        order: 4;
    }
}

/* ===== 修改密码 ===== */
.cp-page {
    padding: 28px 0 48px;
    max-width: 560px;
    margin: 0 auto;
}
.cp-back {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}
.cp-back:hover {
    color: #111827;
}
.cp-card {
    background: #fff;
    border: 1px solid #f0f0f3;
    border-radius: 18px;
    padding: 28px 28px 24px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.cp-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}
.cp-title-ico {
    font-size: 22px;
    line-height: 1;
}
.cp-field {
    margin-bottom: 16px;
}
.cp-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.cp-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cp-input::placeholder {
    color: #9ca3af;
}
.cp-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.cp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.cp-hint {
    margin: -4px 0 18px;
    font-size: 12px;
    color: #9ca3af;
}
.cp-actions {
    margin-top: 4px;
}
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.cp-btn:hover {
    background: #000;
}

@media (max-width: 560px) {
    .cp-card {
        padding: 22px 16px 18px;
    }
    .cp-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===== 我的收藏 ===== */
.mf-page {
    padding: 28px 0 56px;
}
.mf-back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}
.mf-back:hover {
    color: #111827;
}
.mf-head {
    margin-bottom: 18px;
}
.mf-title {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}
.mf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.mf-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
}
.mf-tab.is-active {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}
.mf-tab-ico {
    font-size: 14px;
    line-height: 1;
}
.mf-meta-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.mf-total {
    font-size: 13px;
    color: #9ca3af;
}
.mf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.mf-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: opacity 0.18s, transform 0.18s, box-shadow 0.15s;
}
.mf-card:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.mf-card.is-removing {
    opacity: 0;
    transform: scale(0.98);
}
.mf-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 48px 16px 16px;
    text-decoration: none;
    color: inherit;
}
.mf-type-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.mf-type-ico.is-course {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 22px;
    font-weight: 400;
}
.mf-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mf-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mf-card-sub {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mf-heart:hover {
    background: #fef2f2;
}
.mf-heart:disabled {
    opacity: 0.5;
    cursor: wait;
}
.mf-empty {
    text-align: center;
    padding: 64px 20px;
    color: #9ca3af;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 16px;
}
.mf-empty-ico {
    font-size: 40px;
    margin-bottom: 10px;
}
.mf-empty a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}
.mf-pagination {
    margin-top: 28px;
}

@media (max-width: 800px) {
    .mf-title {
        font-size: 24px;
    }
    .mf-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== 精选资料：格式角标 + 学习预览页 ===== */
.v2-res-fmt {
    position: absolute;
    right: 10px;
    left: auto;
    top: 10px;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(17, 24, 39, 0.78);
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1.2;
}
.v2-res-fmt-pdf { background: #dc2626; }
.v2-res-fmt-doc { background: #2563eb; }
.v2-res-fmt-ppt { background: #ea580c; }
.v2-res-fmt-xls { background: #16a34a; }

.v2-res-learn-page {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    background: #1f2937;
}
.v2-res-learn-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #111827;
    color: #f9fafb;
    flex-shrink: 0;
}
.v2-res-learn-back {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.v2-res-learn-back:hover { color: #fff; }
.v2-res-learn-top-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.v2-res-learn-top-main h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-res-learn-top-main .v2-res-fmt {
    position: static;
}
.v2-res-learn-top-actions { flex-shrink: 0; }
.v2-res-learn-stage {
    flex: 1;
    min-height: 0;
    position: relative;
}
.v2-res-learn-frame {
    width: 100%;
    height: calc(100vh - 120px);
    min-height: 480px;
    border: 0;
    display: block;
    background: #2a2a2a;
}
.v2-res-learn-empty {
    max-width: 480px;
    margin: 10vh auto;
    text-align: center;
    color: #e5e7eb;
    padding: 24px;
}
.v2-res-learn-empty h2 {
    margin: 12px 0 8px;
    font-size: 20px;
    color: #fff;
}
.v2-res-learn-empty p { color: #9ca3af; margin: 0 0 10px; }
.v2-res-learn-empty-icon { font-size: 40px; }
.v2-res-learn-hint { font-size: 13px; color: #fbbf24; }
.v2-res-learn-empty-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}
.v2-res-learn-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: v2ResSpin 0.8s linear infinite;
}
@keyframes v2ResSpin {
    to { transform: rotate(360deg); }
}
@media (max-width: 720px) {
    .v2-res-learn-top { flex-wrap: wrap; }
    .v2-res-learn-frame { height: calc(100vh - 160px); min-height: 360px; }
}


/* ===== 学员端手机适配：底栏 + 列表触控 ===== */
.v2-m-tabbar {
    display: none;
}

@media (max-width: 768px) {
    :root {
        --v2-header-h: 56px;
        --v2-m-tabbar-h: 56px;
    }

    body.v2-body {
        padding-bottom: calc(var(--v2-m-tabbar-h) + env(safe-area-inset-bottom, 0px));
    }

    .v2-header {
        height: var(--v2-header-h);
    }

    .v2-header-inner {
        gap: 10px;
        justify-content: space-between;
    }

    .v2-nav,
    .v2-search {
        display: none;
    }

    .v2-header-actions {
        margin-left: auto;
    }

    .v2-brand-slogan {
        display: block;
        max-width: 46vw;
        font-size: 10px;
        line-height: 1.25;
    }

    .v2-login-btn {
        padding: 6px 16px;
        font-size: 13px;
        color: #2563eb;
        background: #fff;
        box-shadow: none;
        border: 1px solid #d7def0;
        border-radius: 10px;
    }

    .v2-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .v2-brand span:not(.v2-brand-slogan),
    .v2-brand {
        font-size: 15px;
    }

    .v2-m-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        height: calc(var(--v2-m-tabbar-h) + env(safe-area-inset-bottom, 0px));
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .v2-m-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-width: 0;
        min-height: 48px;
        text-decoration: none;
        color: #9ca3af;
        font-size: 11px;
        font-weight: 500;
        -webkit-tap-highlight-color: transparent;
    }

    .v2-m-tab-ico {
        display: flex;
        line-height: 0;
        flex-shrink: 0;
    }

    .v2-m-tab-ico svg {
        width: 22px;
        height: 22px;
        display: block;
        flex-shrink: 0;
    }

    .v2-m-tab-label {
        line-height: 1.1;
        white-space: nowrap;
    }

    .v2-m-tab.is-active {
        color: #3b5bf9;
        font-weight: 700;
    }

    .v2-footer-wrap {
        margin-bottom: 8px;
    }

    .v2-footer {
        padding: 16px 0 20px;
    }

    .v2-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .v2-footer-links {
        width: 100%;
        gap: 10px 14px;
    }

    .v2-footer-links > a:not(.v2-footer-qr-btn) {
        font-size: 13px;
    }

    .v2-footer-qr-btn,
    .v2-footer-links a.v2-footer-qr-btn {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* 资料英雄区压缩 */
    .v2-res-hero {
        padding: 12px 0 6px;
    }
    .v2-res-hero-panel {
        padding: 14px 14px 12px;
        border-radius: 14px;
    }
    .v2-res-hero-row {
        gap: 10px;
    }
    .v2-res-hero-copy {
        flex: 1 1 auto;
        min-width: 0;
    }
    .v2-res-hero-copy h1 {
        font-size: 20px;
        margin: 0 0 4px;
    }
    .v2-res-hero-copy p {
        font-size: 12px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .v2-res-mine {
        padding: 8px 10px;
        min-width: 0;
        border-radius: 12px;
        gap: 8px;
    }
    .v2-res-mine-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }
    .v2-res-mine-text strong {
        font-size: 13px;
    }
    .v2-res-mine-text span {
        font-size: 11px;
    }
    .v2-res-search {
        margin-top: 2px;
    }

    /* 资料分类：手机端由 .v2-m-cat-filter 接管，不再横滑 */
    .v2-res-page .v2-m-cat-filter .v2-res-cats {
        flex-wrap: wrap;
        overflow: visible;
        -webkit-overflow-scrolling: auto;
        padding-bottom: 0;
        scrollbar-width: auto;
        margin-bottom: 0;
    }

    .v2-res-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .v2-res-card {
        display: grid !important;
        grid-template-columns: 88px minmax(0, 1fr);
        align-items: stretch;
        overflow: hidden;
        transform: none !important;
    }

    .v2-res-card:hover {
        transform: none !important;
    }

    .v2-res-card-cover {
        min-height: 76px;
        height: 100%;
        border-radius: 0;
        aspect-ratio: auto;
        width: 88px;
    }

    .v2-res-card-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .v2-res-card-body {
        padding: 10px 12px;
    }

    .v2-res-card-title {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }

    .v2-res-card-desc {
        display: none;
    }

    .v2-res-card-tags {
        display: none;
    }

    /* 资料分类：取消横滑，改用下拉展开网格 */
    .v2-res-cats.v2-m-cat-list {
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 0;
    }
}

/* ===== 手机端分类下拉展开（课程 / 资料共用） ===== */
.v2-m-cat-bar,
.v2-m-cat-collapse {
    display: none;
}

@media (max-width: 768px) {
    .v2-m-cat-filter {
        margin-bottom: 14px;
    }

    .v2-m-cat-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        border: 1px solid #ebe7f5;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
        cursor: pointer;
        font: inherit;
        color: inherit;
        text-align: left;
    }

    .v2-m-cat-bar-left {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .v2-m-cat-bar-ico {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        background: #eef2ff;
        flex-shrink: 0;
    }

    .v2-m-cat-bar-left strong {
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .v2-m-cat-bar-right {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
        font-size: 13px;
        color: #6b7280;
    }

    .v2-m-cat-bar-right .chevron {
        width: 16px;
        height: 16px;
        transition: transform 0.2s ease;
    }

    .v2-m-cat-filter.is-open .v2-m-cat-bar-right .chevron {
        transform: rotate(180deg);
    }

    .v2-m-cat-filter .v2-m-cat-list {
        display: none !important;
        margin: 10px 0 0;
        padding: 12px;
        border: 1px solid #ebe7f5;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
        gap: 8px;
    }

    .v2-m-cat-filter.is-open .v2-m-cat-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .v2-m-cat-filter.is-open .v2-m-cat-collapse {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
        margin-top: 10px;
        padding: 10px 12px;
        border: 0;
        background: transparent;
        color: #6b7280;
        font-size: 13px;
        cursor: pointer;
        font-family: inherit;
    }

    .v2-m-cat-collapse .chevron {
        width: 14px;
        height: 14px;
    }

    /* 资料分类在展开网格中的样式 */
    .v2-m-cat-filter .v2-res-cat {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 6px;
        border-radius: 12px;
        text-align: center;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        min-height: 72px;
        background: #f8fafc;
        border-color: transparent;
        color: #374151;
    }

    .v2-m-cat-filter .v2-res-cat-ico {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 14px;
    }

    .v2-m-cat-filter .v2-res-cat.is-active,
    .v2-m-cat-filter .v2-res-cat:hover {
        background: color-mix(in srgb, var(--cat-color, #6366f1) 14%, #fff);
        color: #4338ca;
        border-color: transparent;
    }

    .v2-m-cat-filter .v2-res-cat.is-active .v2-res-cat-ico,
    .v2-m-cat-filter .v2-res-cat:hover .v2-res-cat-ico {
        background: color-mix(in srgb, var(--cat-color, #6366f1) 22%, #fff);
    }

    /* 课程一级分类在展开网格中的样式 */
    .v2-m-cat-filter .v2-courses-nav-item {
        flex: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 6px;
        border-radius: 12px;
        border-left: none;
        text-align: center;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        min-height: 72px;
        background: #f8fafc;
        color: #374151;
    }

    .v2-m-cat-filter .v2-courses-nav-item.is-active,
    .v2-m-cat-filter .v2-courses-nav-item:hover {
        background: #eef2ff;
        color: #4338ca;
        border-left: none;
    }

    .v2-m-cat-filter .v2-courses-nav-icon {
        margin: 0;
    }

    /* 课程二级 tabs */
    .v2-m-cat-filter .category-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px 6px;
        border-radius: 12px;
        text-align: center;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        min-height: 56px;
        background: #f8fafc;
        color: #374151;
    }

    .v2-m-cat-filter .category-tab.active {
        background: #eef2ff;
        color: #4338ca;
        border-color: transparent;
    }
}
