:root {
    --primary-color: #4facfe;
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --secondary-color: #6c757d;
    --background-color: #f0f2f5;
    --sidebar-width: 260px;
    --header-height: 60px;
    --text-color: #2c3e50;
    --border-color: #e9ecef;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    /* iOS Safari viewport height fix */
    --vh: 1vh;

    /* Editor Variables */
    --editor-accent: #0ea5e9;
    --editor-accent-light: rgba(14, 165, 233, 0.1);
    --editor-border: rgba(226, 232, 240, 0.8);
    --editor-bg: #fff;
    --editor-text: #1e293b;
    --editor-text-muted: #94a3b8;
    --editor-text-secondary: #64748b;
    --editor-heading-dark: #0f172a;
    --editor-heading-medium: #334155;
    --editor-code-bg: #f1f5f9;
    --editor-pre-bg: #1e293b;
    --editor-pre-text: #e2e8f0;
    --editor-min-height: 500px;
    --editor-max-height: 800px;
    --editor-padding: 20px;
    --editor-font-size: 16px;
    --editor-line-height: 1.8;
    --editor-radius: 12px;
    --editor-radius-sm: 8px;
    --editor-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --editor-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ===== Performance Optimizations ===== */
/* Smooth scrolling for all scrollable containers */
* {
    -webkit-overflow-scrolling: touch;
}

/* GPU acceleration for animated elements */
.nav-item,
.btn-primary,
.btn-secondary,
.resource-item,
.stat-card,
.admin-card,
.pdf-page-canvas,
.modal-overlay,
.floating-comment-btn,
.floating-hide-comments-btn {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Reduce paint areas for scrollable containers */
.sidebar,
.sidebar-resource-list,
#pdf-canvas-wrapper,
.content-body,
.admin-table-wrapper {
    will-change: scroll-position;
    contain: layout style;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    height: 100dvh; /* Dynamic viewport height for iOS Safari */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Login Styles */
.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    min-height: 100dvh; /* Dynamic viewport height for iOS Safari */
    background: #0f172a;
    position: relative;
    overflow: auto;
    padding: 20px 20px 80px 20px;
    box-sizing: border-box;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.login-container {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: white;
}

/* Safari fallback for backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
    .login-container {
        background: rgba(30, 41, 59, 0.95);
    }
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #4facfe;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== CLASSIC ATOM LOGO ===== */
.atom-container {
    position: relative;
    width: 120px;
    height: 120px;
    animation: atomRotate 12s linear infinite reverse;
}

.atom-container.atom-small {
    width: 48px;
    height: 48px;
}

@keyframes atomRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Nucleus - solid core with gradient */
.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 35% 35%,
            #ffffff 0%,
            #67e8f9 15%,
            #22d3ee 35%,
            #0ea5e9 60%,
            #0284c7 100%);
    border-radius: 50%;
    z-index: 10;
    box-shadow:
        0 0 8px rgba(14, 165, 233, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    /* 抵消父元素旋转，保持核心位置固定 */
    animation: nucleusStay 12s linear infinite;
}

@keyframes nucleusStay {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.atom-small .nucleus {
    width: 12px;
    height: 12px;
    box-shadow:
        0 0 6px rgba(14, 165, 233, 0.5),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

/* Orbits - thick elliptical rings */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 40%;
    border: 4px solid #4facfe;
    border-radius: 50%;
    margin-top: -20%;
    margin-left: -50%;
}

.orbit-1 {
    transform: rotate(0deg);
}

.orbit-2 {
    transform: rotate(60deg);
}

.orbit-3 {
    transform: rotate(-60deg);
}

.atom-small .orbit {
    border-width: 2.5px;
}

/* Electrons - hidden for clean look */
.electron {
    display: none;
}

.trail {
    display: none;
}

.login-container h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    color: white;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4facfe;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    color: #4facfe;
    border: 2px solid #4facfe;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f0f9ff;
}

.btn-cancel {
    width: 32px;
    min-width: 32px;
    height: 32px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.toggle-link {
    margin-top: 1.5rem;
    font-size: 14px;
    color: #4facfe;
    cursor: pointer;
    font-weight: 500;
}

.toggle-link:hover {
    text-decoration: underline;
}

/* Terms Checkbox Styles */
.terms-group {
    margin-top: 0.5rem;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #94a3b8;
    user-select: none;
}

.terms-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4facfe;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-checkbox .terms-text {
    line-height: 1.4;
}

.terms-checkbox .terms-text a {
    color: #4facfe;
    text-decoration: none;
}

.terms-checkbox .terms-text a:hover {
    text-decoration: underline;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    height: 100dvh; /* Dynamic viewport height for iOS Safari */
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 0 1rem;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* 默认隐藏侧边栏，通过点击菜单按钮显示 */
    position: fixed;
    top: 0;
    left: -100%;
    transition: left 0.3s ease;
}

/* 隐藏侧边栏滚动条 - WebKit浏览器 */
.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
}

/* 侧边栏激活状态 - 电脑端和移动端通用 */
.sidebar.active {
    left: 0;
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.logo .atom-container {
    flex-shrink: 0;
}

.logo i {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Scrollable Navigation Menu */
.nav-menu-container {
    flex-shrink: 0;
    overflow-y: visible;
    overflow-x: hidden;
    margin-bottom: 0.75rem;
    padding-right: 0;
}

.nav-menu-container::-webkit-scrollbar {
    width: 5px;
}

.nav-menu-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.nav-menu-container::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

.nav-menu-container::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 导航分区标签 */
.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 14px 4px 14px;
    margin-top: 2px;
}

.nav-section-label:first-child {
    padding-top: 0;
    margin-top: 0;
}

.nav-item {
    padding: 11px 14px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 13px;
    position: relative;
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    transform: translateX(3px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    border: 1px solid #bae6fd;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
    transform: translateX(0);
}

.nav-item.active:hover {
    transform: translateX(0);
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.nav-item.active i {
    transform: scale(1);
    color: #0284c7;
}

/* 主页按钮样式 - 未选中时和其他导航项一样 */
.nav-home-btn {
    margin-bottom: 12px;
}

.nav-home-btn i {
    color: #64748b;
}

.nav-home-btn.active i {
    color: #0284c7;
}

/* Sidebar Resource List */
.sidebar-resource-list {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0;
    min-height: 60px;
    border: 1px solid #f1f5f9;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 已选择模式 - 表示已选择某个导航 */
.sidebar-resource-list.selected-mode {
    background-color: #dfe4ea;
    border: none;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-resource-list.selected-mode .resource-item {
    background: #f1f5f9;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-resource-list.selected-mode .resource-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.sidebar-resource-list.selected-mode .resource-item.active {
    background: #f0f9ff;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.25),
        0 2px 4px rgba(79, 172, 254, 0.1);
}

.sidebar-resource-list.selected-mode .resource-title {
    color: #334155;
}

.sidebar-resource-list.selected-mode .empty-resource-hint {
    color: #475569;
    padding: 20px 12px;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* 当资源列表为空时显示更小 */
.sidebar-resource-list .empty-resource-hint {
    padding: 10px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.sidebar-resource-list::-webkit-scrollbar {
    display: none;
    width: 0;
}

.sidebar-resource-list {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.sidebar-resource-list .resource-item {
    padding: 0.7rem;
    background: white;
    border: 1px solid transparent;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-resource-list .resource-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.sidebar-resource-list .resource-item.active {
    border-color: #4facfe;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.15);
}

.sidebar-resource-list .resource-title {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.user-profile {
    flex-shrink: 0;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    margin: 0.75rem -1rem 0 -1rem;
    padding: 0.85rem 1rem;
}

/* 未登录状态的用户区域样式 */
.user-profile-guest {
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-guest:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.guest-avatar {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    color: #94a3b8 !important;
    opacity: 0.8;
}

.guest-name {
    color: #64748b !important;
    font-weight: 500 !important;
}

.guest-hint {
    color: #3b82f6 !important;
    font-size: 11px;
}

.login-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
}

.logout-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: #fef2f2;
    transform: scale(1.05);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    min-height: 0;
    min-width: 0;
}

.content-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}

/* Override for consent pages */
#consent-container.content-body,
#consent-history-container.content-body {
    display: block;
    overflow-y: auto;
}

.preview-pane {
    flex: 1;
    width: 100%;
    background: #0a1628;
    display: flex;
    flex-direction: column;
}

.preview-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #94a3b8;
    position: relative;
    overflow: hidden;
    background: #fff;
    background: #0a1628;
}

/* Welcome Animation Canvas */
#welcome-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.6), 0 0 40px rgba(0, 242, 254, 0.3);
    margin: 0;
    opacity: 0;
    animation: fadeInText 2s ease-out forwards 0.5s;
}

.mobile-hint {
    display: none;
    font-size: 0.9rem;
    color: rgba(200, 220, 255, 0.6);
    margin-top: 0.8rem;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInText 2s ease-out forwards 1s, pulseText 3s infinite;
    background: transparent;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    /* 恢复点击功能 */
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    }
}

/* Empty Content Page */
.empty-content-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0;
    margin: 0;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.empty-content-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.15);
}

.empty-content-icon i {
    font-size: 2.5rem;
    color: #0ea5e9;
}

.empty-content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.empty-content-desc {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.empty-content-hint {
    font-size: 0.95rem;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.08);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

@keyframes fadeInText {
    to {
        opacity: 1;
    }
}

.welcome-logo {
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 30px rgba(79, 172, 254, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00f2fe, #4facfe, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(79, 172, 254, 0.3);
}

.welcome-subtitle {
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 2rem;
}

.welcome-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 20px;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(79, 172, 254, 0.2);
    }
}

.hint-icon {
    font-size: 1.2rem;
    animation: point 1.5s ease-in-out infinite;
}

@keyframes point {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-5px);
    }
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

/* ===== PDF Viewer - Modern Apple Style ===== */
#pdf-viewer-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f5f7;
    border-radius: 12px;
    overflow: hidden;
    /* 为顶部导航栏预留空间 */
    padding-top: 70px;
    box-sizing: border-box;
}

/* PDF Toolbar - Glassmorphism */
#pdf-toolbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 16px;
    display: flex;
    gap: 6px;
    align-items: center;
    color: #1d1d1f;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    justify-content: center;
}

#pdf-toolbar button {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: #1d1d1f;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

#pdf-toolbar button:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

#pdf-toolbar button:active {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.12);
}

#pdf-toolbar button.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

#pdf-toolbar button#pdf-close {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

#pdf-toolbar button#pdf-close:hover {
    background: rgba(239, 68, 68, 0.2);
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 6px;
}

#pdf-page-info {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    padding: 0 8px;
    min-width: 60px;
    text-align: center;
}

#pdf-zoom-level {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    padding: 0 6px;
    min-width: 50px;
    text-align: center;
}

/* PDF Canvas Wrapper */
#pdf-canvas-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 16px;
    transition: background 0.3s ease, filter 0.3s ease;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 移动端触摸优化 - 允许双指缩放和滚动 */
    overscroll-behavior: contain;
    touch-action: pinch-zoom pan-x pan-y;
}

/* Eye Protection Mode - Warm/Sepia */
#pdf-canvas-wrapper.eye-protection {
    background: #f8f4e8;
    filter: sepia(15%) saturate(90%);
}

/* Dark Mode for PDF */
#pdf-canvas-wrapper.dark-mode {
    background: #1a1a1a;
}

#pdf-canvas-wrapper.dark-mode .pdf-page-canvas {
    filter: invert(0.88) hue-rotate(180deg);
}

/* Dual Column Mode */
#pdf-canvas-wrapper.dual-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

#pdf-canvas-wrapper.dual-column .pdf-page-wrapper {
    max-width: 48%;
}

#pdf-canvas-wrapper.dual-column .pdf-page-canvas {
    height: auto;
}

.pdf-page-canvas {
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdf-page-canvas:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.smiley-download {
    font-size: 16px;
    padding: 6px 10px !important;
}

/* Toolbar Mode Buttons */
.pdf-mode-btn {
    position: relative;
}

.pdf-mode-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #0ea5e9;
    border-radius: 50%;
}

/* Toolbar Group */
.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 10px;
}

.toolbar-group button {
    background: transparent !important;
}

.toolbar-group button:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

.toolbar-group button.active {
    background: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #0ea5e9 !important;
}

/* 评论按钮样式 */
#pdf-comment-btn {
    color: #4facfe !important;
}

#pdf-comment-btn:hover {
    background: rgba(79, 172, 254, 0.1) !important;
}

#pdf-toggle-comments.active {
    color: #94a3b8 !important;
}

/* Annotation Toolbar */
.annotation-toolbar {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.annotation-toolbar.active {
    display: flex;
}

.annotation-toolbar button {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.annotation-toolbar button:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
}

.annotation-toolbar button.active {
    background: #0ea5e9;
    color: white;
}

.annotation-color-picker {
    display: flex;
    gap: 4px;
}

.annotation-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.annotation-color:hover {
    transform: scale(1.1);
}

.annotation-color.active {
    border-color: #1d1d1f;
}

.annotation-color.yellow {
    background: #fef08a;
}

.annotation-color.green {
    background: #86efac;
}

.annotation-color.blue {
    background: #93c5fd;
}

.annotation-color.pink {
    background: #f9a8d4;
}

.annotation-color.orange {
    background: #fdba74;
}

.annotation-color.teal {
    background: #2dd4bf;
}

.annotation-color.purple {
    background: #c4b5fd;
}

.annotation-color.red {
    background: #fca5a5;
}

.annotation-color.black {
    background: #111827;
}

/* --- PDF Comment Sidebar & Pins --- */
.pdf-comment-sidebar {
    position: fixed;
    left: 50% !important;
    bottom: 160px !important;
    top: auto !important;
    right: auto !important;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 300px;
    max-width: 400px;
    z-index: 998;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.2);
    transition: all 0.2s ease;
}

.pdf-comment-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
}

.comment-action-btn {
    padding: 6px 8px;
    border: 1px solid #dbe2ea;
    background: #f8fafc;
    color: #475569;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.comment-action-btn:hover {
    border-color: #4facfe;
    color: #0ea5e9;
    background: #f0f9ff;
}

.pdf-page-comments {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.pdf-page-comment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
}

.comment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 12px;
    color: #334155;
    max-width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.comment-chip.mine {
    border-color: #4facfe;
    background: #f0f9ff;
}

.comment-chip.public {
    border-color: #22c55e;
}

.comment-chip.public.mine {
    background: #f0fdf4;
    border-color: #22c55e;
}

.comment-chip.private {
    border-color: #94a3b8;
}

.comment-chip.private.mine {
    background: #f8fafc;
    border-color: #4facfe;
}

.comment-chip .comment-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4facfe;
    flex-shrink: 0;
}

.comment-chip.public .comment-dot {
    background: #22c55e;
}

.comment-chip .comment-meta {
    color: #94a3b8;
    font-size: 11px;
}

.comment-chip .comment-visibility-icon {
    font-size: 10px;
    flex-shrink: 0;
}

.comment-chip .comment-text {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.comment-composer {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-top: 2px;
    position: relative;
    flex-wrap: nowrap;
}

.comment-visibility-select {
    flex-shrink: 0;
    padding: 8px 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    outline: none;
    width: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.comment-visibility-select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.15);
}

.comment-visibility-select option {
    background: #fff;
    color: #475569;
    padding: 8px;
}

.comment-composer input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    font-size: 12px;
    color: #1f2937;
    outline: none;
    background: #f8fafc;
}

.comment-composer input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.15);
}

.comment-delete-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
}

.comment-delete-btn:hover {
    color: #ef4444;
}

.comment-add-btn {
    padding: 6px 9px;
    border: 1px dashed #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.comment-add-btn:hover {
    border-color: #4facfe;
    color: #0ea5e9;
    background: #f0f9ff;
}

.comment-cancel-btn {
    display: none;
}

.comment-send-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #dbe2ea;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
}

.comment-send-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
}

.pin-comment-float {
    position: absolute;
    z-index: 996;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 260px;
    transform: translate(10px, -110%);
    pointer-events: auto;
}

.pin-comment-float .pin-comment-title {
    margin-bottom: 10px;
}

.pin-comment-float .comment-composer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.pin-comment-float .comment-composer .comment-visibility-select {
    flex-shrink: 0;
    width: auto;
    min-width: auto;
    background: rgba(248, 250, 252, 0.9);
    font-size: 12px;
    padding: 8px 10px;
}

.pin-comment-float .comment-composer input {
    flex: 1;
    min-width: 0;
    background: rgba(248, 250, 252, 0.9);
}

.pin-comment-float .comment-composer .comment-send-btn {
    flex-shrink: 0;
}

.pin-comment-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 500;
}

.pin-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4facfe;
    border: 1px solid #0ea5e9;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
    flex-shrink: 0;
}

.pin-comment-note {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 6px;
    display: none;
}

.comment-toggle-btn {
    display: none;
}

.pdf-comment-sidebar.collapsed {
    width: auto;
    max-width: none;
    padding: 0;
    gap: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border: none;
}

.pdf-comment-sidebar.collapsed .pdf-comment-actions,
.pdf-comment-sidebar.collapsed .pdf-page-comments {
    display: none;
}

.comment-composer-slot {
    margin-top: 2px;
}

.pdf-comment-sidebar.collapsed .comment-composer-slot {
    display: none;
}

/* 位置评论容器 - 横版标注样式 */
.pin-comment-badge {
    position: absolute;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 10;
    transform: translate(-4px, -4px);
}

/* 小圆点 - 标记位置 */
.pin-comment-badge .pin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.pin-comment-badge.mine .pin-dot {
    background: #4facfe;
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.5);
}

.pin-comment-badge.public .pin-dot {
    background: #22c55e;
}

/* 斜线 - 从圆点水平延伸到气泡框 */
.pin-comment-badge .pin-line {
    width: 30px;
    height: 2px;
    background: #94a3b8;
    flex-shrink: 0;
    margin: 0 -1px;
}

.pin-comment-badge.mine .pin-line {
    background: rgba(0, 0, 0, 0.3);
}

.pin-comment-badge.public .pin-line {
    background: rgba(34, 197, 94, 0.6);
}

/* 文本框 - 位置评论使用浅色背景黑色文字 */
.pin-comment-badge .pin-text {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12px;
    color: #1a1a1a;
    font-weight: 500;
    max-width: 180px;
    min-width: 40px;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    white-space: normal;
    word-break: break-word;
    text-align: left;
    text-shadow: none;
}

.pin-comment-badge.mine .pin-text {
    border-color: rgba(79, 172, 254, 0.5);
    background: rgba(240, 249, 255, 0.95);
}

.pin-comment-badge.public .pin-text {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(240, 253, 244, 0.95);
}

/* 浮动评论按钮容器 */
.floating-comment-container {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.floating-comment-container.dragging {
    opacity: 0.9;
    cursor: grabbing;
}

/* 隐藏评论按钮 */
.floating-hide-comments-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(100, 100, 100, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.25s ease;
}

.floating-hide-comments-btn:hover {
    transform: scale(1.08);
    background: rgba(80, 80, 80, 0.9);
}

/* 评论按钮 */
.floating-comment-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(79, 172, 254, 0.5);
    cursor: pointer;
    transition: all 0.25s ease;
}

.floating-comment-btn:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #0ea5e9 0%, #00d4ff 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.6);
}

.comment-bottom-bar {
    position: fixed;
    left: 280px;
    bottom: 20px;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 997;
    max-width: 220px;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 底部评论栏样式 - 半透明灰色 */
.comment-bottom-bar .comment-chip {
    background: rgba(80, 80, 80, 0.75) !important;
    border: none !important;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.comment-bottom-bar .comment-chip .comment-dot {
    background: #22c55e;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
}

.comment-bottom-bar .comment-chip.private .comment-dot {
    background: #f59e0b;
}

.comment-bottom-bar .comment-chip .comment-visibility-icon {
    color: #fff;
    font-size: 14px;
}

.comment-bottom-bar .comment-chip .comment-text {
    color: #fff;
    font-weight: 500;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .floating-comment-container {
        bottom: calc(100px + env(safe-area-inset-bottom));
        right: calc(20px + env(safe-area-inset-right));
    }
}

.pdf-page-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    /* 允许双指缩放和平移 */
    touch-action: pinch-zoom pan-x pan-y;
}

/* 虚拟滚动占位符样式 */
.pdf-page-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pdf-page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.pdf-page-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #4facfe;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-page-wrapper .pdf-page-canvas {
    /* Dimensions controlled by JavaScript viewport.width/height */
    display: block;
    /* 允许双指缩放 */
    touch-action: pinch-zoom pan-x pan-y;
}

.pdf-annotation-layer {
    position: absolute;
    top: 0;
    left: 0;
    left: 0;
    /* Dimensions must match PDF canvas exactly - set via JavaScript */
    /* 默认不拦截触摸事件，允许滚动 */
    pointer-events: none;
    background: transparent;
    touch-action: auto;
    z-index: 2;
    cursor: default;
}

.pdf-annotation-layer.drawing,
.pdf-annotation-layer.pin-mode {
    /* 仅在绘图或标注模式下拦截事件 */
    pointer-events: auto;
    touch-action: none;
    cursor: crosshair;
}

.annotation-visibility {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.annotation-visibility select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #dbe2ea;
    background: #fff;
    font-size: 12px;
    color: #334155;
}

.annotation-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    user-select: none;
}

.annotation-toggle input {
    accent-color: #0ea5e9;
}


/* Page Thumbnails Sidebar */
.pdf-thumbnails {
    display: none;
    width: 120px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    padding: 12px 8px;
    flex-direction: column;
    gap: 8px;
}

.pdf-thumbnails.active {
    display: flex;
}

.pdf-thumbnail {
    width: 100%;
    aspect-ratio: 0.707;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    overflow: hidden;
}

.pdf-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pdf-thumbnail.active {
    border-color: #0ea5e9;
}

.pdf-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-thumbnail-number {
    font-size: 10px;
    color: #64748b;
    text-align: center;
    margin-top: 2px;
}

/* PDF Content Area */
.pdf-content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Fullscreen Mode */
#pdf-viewer-container:fullscreen {
    border-radius: 0;
}

#pdf-viewer-container:fullscreen #pdf-toolbar {
    background: rgba(255, 255, 255, 0.95);
}

#pdf-viewer-container:fullscreen #pdf-canvas-wrapper {
    padding: 32px;
}

/* 移动端PDF查看器优化 */
@media (max-width: 768px) {
    #pdf-viewer-container {
        /* 移动端顶部间距 */
        padding-top: 75px;
        border-radius: 0;
    }

    #pdf-toolbar {
        padding: 8px 12px;
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    #pdf-toolbar button {
        min-width: 32px;
        height: 32px;
        padding: 6px 10px;
        font-size: 13px;
    }

    #pdf-canvas-wrapper {
        padding: 12px;
        gap: 12px;
        /* 确保移动端可以滚动 */
        overflow-y: scroll;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .pdf-page-canvas {
        max-width: 100%;
        height: auto !important;
        /* 允许canvas响应触摸事件和双指缩放 */
        touch-action: pinch-zoom pan-x pan-y;
        pointer-events: auto;
    }

    /* 移动端隐藏部分不常用按钮 */
    #pdf-dual-page,
    #pdf-thumbnails-toggle {
        display: none;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    #pdf-viewer-container {
        padding-top: 80px;
    }

    #pdf-toolbar {
        padding: 6px 8px;
        gap: 3px;
    }

    #pdf-toolbar button {
        min-width: 28px;
        height: 28px;
        padding: 4px 8px;
        font-size: 12px;
    }

    #pdf-canvas-wrapper {
        padding: 8px;
        gap: 8px;
    }

    .toolbar-separator {
        display: none;
    }
}

/* ===== ADMIN DASHBOARD - Apple Style ===== */
.admin-dashboard {
    display: flex;
    flex: 1;
    height: 100%;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(160deg, #f5f7fa 0%, #e8ecf1 50%, #dfe6ed 100%);
    position: relative;
    min-height: 0;
}

/* 背景装饰圆 */
.admin-dashboard::before {
    content: '';
    position: fixed;
    top: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.admin-dashboard::after {
    content: '';
    position: fixed;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Admin Header - Compact Apple Style */
.admin-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-header h1 {
    margin: 0;
    color: #1d1d1f;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.admin-header h1 i {
    font-size: 1rem;
    color: #0ea5e9;
}

.admin-subtitle {
    display: none;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
}

.admin-btn-refresh {
    background: #007AFF;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.2);
}

.admin-btn-refresh:hover {
    background: #0062cc;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Stats Row - Even Distribution Style */
.admin-stats-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem 0.75rem;
    overflow-x: auto;
    flex-shrink: 0;
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-stats-row .stat-card {
    flex: 1;
    min-width: 80px;
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-stats-row .stat-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-stats-row .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-radius: 10px;
    /* Remove gradient background, use subtle tint */
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-stats-row .stat-content {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.admin-stats-row .stat-value {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

.admin-stats-row .stat-label {
    font-size: 0.7rem;
    color: #86868b;
    font-weight: 500;
}

/* Legacy Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.stat-card::before {
    display: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

/* Remove gradient backgrounds from icons, use tints */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-users .stat-icon {
    background: rgba(79, 172, 254, 0.1);
    color: #007AFF;
}

.stat-docs .stat-icon {
    background: rgba(240, 147, 251, 0.1);
    color: #AF52DE;
}

.stat-soc .stat-icon {
    background: rgba(34, 211, 238, 0.1);
    color: #30B0C7;
}

.stat-links .stat-icon {
    background: rgba(67, 233, 123, 0.1);
    color: #34C759;
}

.stat-videos .stat-icon {
    background: rgba(0, 161, 214, 0.1);
    color: #FF2D55;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.3rem;
}

/* Admin Tabs Navigation - Compact Apple Style */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 0.9rem;
    border: none;
    background: transparent;
    color: #86868b;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.04);
}

.admin-tab.active {
    color: #0284c7;
    background: rgba(14, 165, 233, 0.08);
}

.admin-tab i {
    font-size: 0.85rem;
}

/* Admin Tab Content */
.admin-tab-content {
    display: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 1.25rem;
}

.admin-tab-content.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 博客管理页 - 允许完整滚动显示配置与管理卡片 */
#admin-tab-publish-article .admin-full-layout {
    display: block;
    height: auto;
    overflow: visible;
}

#admin-tab-publish-article .admin-full-layout > .admin-card:first-child {
    flex: none;
}

#admin-tab-publish-article .admin-full-layout > .admin-card:first-child .admin-card-body {
    overflow: visible;
    max-height: none;
}

#admin-tab-publish-article .publish-article-body {
    max-height: none;
    overflow: visible;
}

/* 全宽布局 - 用于用户管理等 */
.admin-full-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 400px;
    flex: 1;
}

.admin-full-layout>.admin-card:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-full-layout>.admin-card:first-child .admin-card-body {
    flex: 1;
    overflow: auto;
}

/* 创建用户表单布局 */
.create-user-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.create-user-form .input-sm,
.create-user-form .select-styled {
    width: 100%;
}

.create-user-form .form-full-width {
    grid-column: 1 / -1;
}

.create-user-form .btn-action-primary {
    grid-column: 1 / -1;
    max-width: 200px;
    justify-self: end;
}

/* ===== NEW GRID LAYOUT - Apple Style ===== */
.admin-grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    height: auto;
    min-height: 400px;
    flex: 1;
}

.admin-tab-content .admin-grid-layout,
.admin-tab-content .admin-full-layout {
    min-height: 0;
}

.admin-main-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    order: 2;
    min-height: 0;
}

.admin-side-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0;
    order: 1;
    min-height: 0;
}

/* Ensure the last card (Add Link) expands to fill remaining space if desired, 
   or we can just ensure the container is full height. 
   The user requested alignment, so let's make the last card fill the space 
   to visually align the bottom edges. */
.admin-side-area .admin-card:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-side-area .admin-card:last-child .admin-card-body {
    flex: 1;
}

/* 自定义滚动条 - 更细更透明 */
.admin-side-area::-webkit-scrollbar {
    width: 4px;
}

.admin-side-area::-webkit-scrollbar-track {
    background: transparent;
}

.admin-side-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.admin-side-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.admin-card.full-height {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-card.full-height .admin-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-table-wrapper.full {
    flex: 1;
    max-height: none;
    min-height: 0;
}

.admin-card.full-height .admin-table-wrapper.full {
    flex: 1;
    min-height: 0;
}

/* Mini Card Styles - Apple Style */
.admin-card.mini {
    border-radius: 14px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.admin-card-header.mini-header {
    padding: 0.75rem 1rem;
    background: transparent;
}

.admin-card-header.mini-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-card-body.mini-body {
    padding: 0.85rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Gradient Headers - Apple Style */
.gradient-header {
    background: rgba(14, 165, 233, 0.06) !important;
    border-bottom: 1px solid rgba(14, 165, 233, 0.1) !important;
}

.gradient-header h3 {
    color: #0284c7 !important;
}

.gradient-header h3 i {
    color: #0ea5e9 !important;
}

.bilibili-gradient {
    background: rgba(0, 161, 214, 0.08) !important;
    border-bottom: 1px solid rgba(0, 161, 214, 0.12) !important;
}

.bilibili-gradient h3 {
    color: #00a1d6 !important;
}

.bilibili-gradient h3 i {
    color: #00a1d6 !important;
}

.purple-gradient {
    background: rgba(139, 92, 246, 0.08) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12) !important;
}

.purple-gradient h3 {
    color: #8b5cf6 !important;
}

.purple-gradient h3 i {
    color: #8b5cf6 !important;
}

.bilibili-border {
    border: 2px solid #00a1d6;
}

/* Mini Input Styles */
.input-sm {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
}

.input-sm:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.input-sm:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.select-sm {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    color: #1e293b;
    cursor: pointer;
    min-width: 0;
    box-sizing: border-box;
}

.select-sm:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 美化版选择框 - Apple Style */
.select-styled {
    width: 100%;
    padding: 10px 14px;
    padding-right: 36px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 0.85rem;
    background: white;
    color: #1d1d1f;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    background-position: right 14px center;
    transition: all 0.2s ease;
}

.select-styled:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.select-styled:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.select-styled option {
    padding: 10px 14px;
    font-size: 0.9rem;
    background: white;
    color: #1d1d1f;
    border-radius: 0;
}

.select-styled option:hover {
    background: #f0f9ff;
}

.select-styled option:checked {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.textarea-sm {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.textarea-sm:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    width: 40px;
    padding: 8px;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Input Rows */
.input-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input-row .input-sm,
.input-row .select-sm {
    min-width: 0;
}

.input-row-icon {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

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

.flex-2 {
    flex: 2;
    min-width: 0;
}

/* Mini Buttons */
.btn-mini {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-mini:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.btn-mini.primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.btn-action-primary {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.btn-action-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-action-primary:active {
    transform: scale(0.98);
}

.btn-action-secondary {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00a1d6 0%, #fb7299 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(0, 161, 214, 0.25);
}

.btn-action-secondary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0, 161, 214, 0.35);
}

.btn-action-secondary:active {
    transform: scale(0.98);
}

/* Mini Divider */
.mini-divider {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 10px 0 8px 0;
    border-top: 1px dashed #e2e8f0;
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Mini Checkbox */
.checkbox-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    padding: 6px 0;
}

.checkbox-sm input {
    width: 18px;
    height: 18px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

/* Mini File Zone - Apple Style */
.file-zone-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.file-zone-mini:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.04);
}

.file-zone-mini i {
    color: #0ea5e9;
    font-size: 1.1rem;
}

.file-zone-mini span {
    font-size: 0.85rem;
    color: #86868b;
}

/* ===== 上传类型Tab切换样式 ===== */
.upload-type-tabs {
    display: flex !important;
    gap: 6px;
    margin-bottom: 10px;
}

.admin-card-body .upload-tab,
.mini-body .upload-tab,
.upload-tab {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    cursor: pointer;
    border-radius: 8px !important;
    transition: all 0.2s;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    outline: none;
}

.upload-tab:hover {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
}

.upload-tab.active {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.upload-tab i {
    font-size: 0.9rem;
}

/* ===== 图片预览网格样式 ===== */
.images-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.images-preview-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.images-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.images-preview-more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

/* ===== 图片集查看器样式 ===== */
.image-set-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a1628;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.image-set-toolbar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.8);
    gap: 16px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-set-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.image-set-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-set-title {
    flex: 1;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-set-page-indicator {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.image-set-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-set-zoom-controls button {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-set-zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-set-zoom-level {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    min-width: 45px;
    text-align: center;
}

.image-set-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
}

.image-set-page-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

.image-set-page {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.image-set-page.loading {
    opacity: 0;
}

.image-set-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 300px;
    background: #1a2a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    border-radius: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .image-set-toolbar {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .image-set-close-btn {
        width: 44px;
        height: 44px;
    }
    
    .image-set-title {
        font-size: 0.9rem;
    }
    
    .image-set-zoom-controls button {
        width: 44px;
        height: 44px;
    }
    
    .image-set-content {
        padding: 10px;
        gap: 10px;
    }
    
    .image-set-page-wrapper {
        max-width: 100%;
    }
}

/* iOS Safari 视口高度修复 */
@supports (-webkit-touch-callout: none) {
    .image-set-viewer {
        height: -webkit-fill-available;
    }
}

/* Category List Mini */
.category-list-mini {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-list-mini .category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.85rem;
}

.category-list-mini .category-icon {
    font-size: 1rem;
}

.category-list-mini .category-name {
    flex: 1;
    color: #334155;
}

.category-list-mini .category-actions {
    display: flex;
    gap: 4px;
}

.category-list-mini .btn-action {
    padding: 4px 6px;
    font-size: 0.7rem;
}

/* Admin Search & Filter Small */
.admin-search-sm {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 120px;
}

.admin-filter-sm {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: #1e293b;
}

.admin-filter-light {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

/* Legacy Admin Flex Layout */
.admin-flex-layout {
    display: flex;
    gap: 1.5rem;
    min-height: 100%;
}

.admin-forms-column {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-forms-column.narrow {
    width: 280px;
}

.admin-table-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-table-column.wide {
    flex: 2;
}

/* Legacy Admin Content Grid */
.admin-content-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    padding: 0 2rem 2rem;
}

.admin-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Admin Cards - Apple Style */
.admin-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
}

.admin-card-header {
    background: rgba(255, 255, 255, 0.3);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #1d1d1f;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.admin-card-header h3 i {
    color: #0ea5e9;
    font-size: 0.9rem;
}

.admin-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-search {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.admin-search:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-filter {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #1e293b;
    cursor: pointer;
}

.admin-filter option {
    color: #1e293b;
    background: white;
    padding: 8px;
}

.admin-card-body {
    padding: 1.2rem;
}

.admin-card-body.no-padding {
    padding: 0;
}

/* Settings Section Styles */
.settings-section {
    margin-bottom: 2rem;
}

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

.settings-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h4 i {
    color: #0ea5e9;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-label {
    font-weight: 500;
    color: #1e293b;
}

.setting-desc {
    font-size: 0.85rem;
    color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Compact Admin Card */
.admin-card.compact .admin-card-header {
    padding: 0.8rem 1rem;
}

.admin-card.compact .admin-card-body {
    padding: 1rem;
}

.admin-card.compact .form-group {
    margin-bottom: 0.8rem;
}

/* Special Headers */
.bilibili-header {
    background: linear-gradient(135deg, #00a1d6 0%, #fb7299 100%) !important;
}

.bilibili-header h3 {
    color: white !important;
}

.bilibili-header h3 i {
    color: white !important;
}

.purple-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

.purple-header h3 {
    color: white !important;
}

.purple-header h3 i {
    color: white !important;
}

/* Form Row Inline */
.form-row-inline {
    display: flex;
    gap: 0.8rem;
}

.form-row-inline .form-group {
    margin-bottom: 0.8rem;
}

.form-row-inline .flex-1 {
    flex: 1;
}

.form-row-inline .flex-2 {
    flex: 2;
}

/* Input with Button */
.input-with-btn {
    display: flex;
    gap: 6px;
}

.input-with-btn input {
    flex: 1;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    transform: scale(1.05);
}

.btn-icon.primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

/* Checkbox Inline */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-inline label {
    margin: 0 !important;
    font-weight: normal !important;
    cursor: pointer;
}

/* Add Category Row */
.add-category-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.icon-input {
    width: 50px !important;
    text-align: center;
    font-size: 1.2rem;
    padding: 8px !important;
}

/* Compact File Upload */
.file-upload-zone.compact {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.8rem;
}

.file-upload-zone.compact i {
    font-size: 1.5rem;
    color: #0ea5e9;
}

.file-upload-zone.compact span {
    font-size: 0.9rem;
    color: #64748b;
}

/* Full Width Button */
.full-width {
    width: 100%;
}

/* Admin Filter Light */
.admin-filter.light {
    background: rgba(255, 255, 255, 0.95);
    border: none;
}

/* Admin Form Styles */
.admin-card .form-group {
    margin-bottom: 1.2rem;
}

.admin-card .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.admin-card .form-group label i {
    color: #0ea5e9;
    margin-right: 6px;
    width: 16px;
}

.admin-card .form-group input,
.admin-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.admin-select option {
    color: #1e293b;
    background: #ffffff;
    padding: 12px;
    font-size: 0.95rem;
}

.admin-select option:hover,
.admin-select option:checked {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.admin-card .form-group input:focus,
.admin-select:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.admin-card .form-group input::placeholder {
    color: #94a3b8;
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
}

.file-upload-zone:hover {
    border-color: #0ea5e9;
    background: #f1f5f9;
}

.file-upload-zone.dragover {
    border-color: #0ea5e9;
    background: rgba(102, 126, 234, 0.1);
}

.file-upload-zone.has-file {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.file-upload-zone.has-file .upload-icon {
    color: #10b981;
}

.upload-text span {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.3rem;
}

.upload-text small {
    color: #94a3b8;
    font-size: 0.85rem;
}

.btn-clear-file {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-clear-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Admin Buttons */
.admin-btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.admin-btn-primary:hover {
    background: #0062cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
}

.admin-btn-primary:active {
    transform: translateY(0);
}

/* Admin Table - Apple Style */
.admin-table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table th {
    background: rgba(245, 247, 250, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #86868b;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.admin-table th:first-child {
    border-radius: 0;
}

.admin-table th:last-child {
    border-radius: 0;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-comment-thumb {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* 用户表格列宽均匀分布 */
.user-table-layout {
    table-layout: auto;
    width: 100%;
}

.user-table-layout th,
.user-table-layout td {
    padding: 8px 6px !important;
    text-align: center;
    white-space: nowrap;
}

.user-table-layout th:nth-child(2),
.user-table-layout td:nth-child(2) {
    text-align: left;
}

.user-table-layout td {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 资源表格列宽分布 */
.resource-table-layout {
    table-layout: fixed;
    width: 100%;
}

.resource-table-layout th:nth-child(1) {
    width: 12%;
}

/* 类型 */
.resource-table-layout th:nth-child(2) {
    width: 50%;
}

/* 标题 */
.resource-table-layout th:nth-child(3) {
    width: 20%;
}

/* 分类 */
.resource-table-layout th:nth-child(4) {
    width: 18%;
}

/* 操作 */

.resource-table-layout td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 创建用户表单紧凑布局 */
.admin-full-layout>.admin-card:last-child {
    flex-shrink: 0;
}

.admin-full-layout>.admin-card:last-child .admin-card-body {
    padding: 12px 16px;
}

/* Table Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-pdf {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.badge-link {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.badge-public {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.badge-assigned {
    background: rgba(88, 86, 214, 0.12);
    color: #5856D6;
}

.badge-admin {
    background: rgba(255, 45, 85, 0.12);
    color: #FF2D55;
}

.badge-user {
    background: rgba(0, 199, 190, 0.12);
    color: #00C7BE;
}

.badge-vip {
    background: rgba(255, 204, 0, 0.15);
    color: #FF9500;
}

.badge-paid {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.badge-trial {
    background: rgba(175, 82, 222, 0.12);
    color: #AF52DE;
}

/* ===== SESSIONS MODAL ===== */
.sessions-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.sessions-modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sessions-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sessions-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sessions-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sessions-modal-body {
    padding: 1.5rem;
}

.sessions-user-label {
    text-align: center;
    color: #64748b;
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
}

.sessions-user-label strong {
    color: #1e293b;
}

.sessions-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sessions-input-group {
    text-align: center;
}

.sessions-input-group label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.sessions-input-group label i {
    color: #0ea5e9;
    margin-right: 4px;
}

.sessions-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    transition: all 0.2s;
}

.sessions-input-group input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.sessions-quick-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.sessions-btn-add {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.sessions-btn-add.green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.sessions-btn-add.green:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sessions-btn-add.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
}

.sessions-btn-add.orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.sessions-btn-save {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.sessions-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Phone Number in Table */
.phone-number {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #64748b;
    background: rgba(100, 116, 139, 0.08);
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0;
    display: inline-block;
}

/* Sessions Cell in Table */
.sessions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sessions-nums {
    font-weight: 600;
    color: #0ea5e9;
    font-size: 13px;
}

.sessions-nums small {
    color: #94a3b8;
    font-weight: normal;
    font-size: 11px;
}

.btn-quick-edit {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.btn-quick-edit:hover {
    transform: scale(1.1);
}

/* Profile Select */
.profile-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Table Action Buttons */
.table-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.btn-action:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-action-view {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

.btn-action-view:hover {
    background: rgba(0, 122, 255, 0.15);
}

.btn-action-edit {
    color: #FF9500;
    background: rgba(255, 149, 0, 0.1);
}

.btn-action-edit:hover {
    background: rgba(255, 149, 0, 0.15);
}

.btn-action-delete {
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.1);
}

.btn-action-delete:hover {
    background: rgba(255, 59, 48, 0.15);
}

/* Action buttons group */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.btn-action-view,
.btn-action-pdf,
.btn-action-download,
.btn-action-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-action-view {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-action-view:hover {
    background: #bae6fd;
}

.btn-action-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.btn-action-pdf:hover {
    background: #fecaca;
}

.btn-action-download {
    background: #dcfce7;
    color: #16a34a;
}

.btn-action-download:hover {
    background: #bbf7d0;
}

.btn-action-delete {
    background: #fef2f2;
    color: #ef4444;
}

.btn-action-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Legacy Admin Panel (keeping for compatibility) */
.admin-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.admin-panel h3 {
    margin: 0 0 1.2rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.admin-panel .form-group {
    margin-bottom: 1rem;
}

.admin-panel .form-group input,
.admin-panel .form-group select {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.admin-panel .form-group input:focus,
.admin-panel .form-group select:focus {
    background: white;
    border-color: #4facfe;
}

.admin-panel label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
}

/* Fix for admin dashboard select dropdowns */
.admin-dashboard .form-group select,
.admin-dashboard .admin-select,
.admin-card .form-group select,
.admin-card select {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

.admin-dashboard .form-group select option,
.admin-dashboard .admin-select option,
.admin-card .form-group select option,
.admin-card select option {
    color: #1e293b !important;
    background-color: #ffffff !important;
    padding: 10px;
}

/* Responsive Admin */
@media (max-width: 1400px) {
    .admin-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-grid-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 1200px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-grid-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .admin-main-area {
        order: 1;
    }

    .admin-side-area {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
        overflow-y: visible;
        order: 2;
    }

    .admin-side-area .admin-card.mini {
        flex: 1;
        min-width: 260px;
    }

    .admin-content-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-forms-column,
    .admin-forms-column.narrow {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-forms-column .admin-card {
        flex: 1;
        min-width: 280px;
    }

    .admin-table-column,
    .admin-table-column.wide {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .admin-tab span {
        display: none;
    }

    .admin-tab {
        padding: 0.8rem;
    }

    .admin-tab i {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {

    /* 管理后台整体布局 */
    .admin-dashboard {
        background: #f5f7fa;
        height: auto;
        min-height: 100%;
        /* Enable scrolling */
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 120px;
        position: relative;
        /* 隐藏滚动条 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    /* 当显示管理后台时，允许body滚动 */
    body:has(#admin-panel-container:not(.hidden)) {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* 备用方案：通过JS添加的类 */
    body.admin-active {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-dashboard::-webkit-scrollbar {
        display: none;
    }

    /* 修复管理后台滚动问题 */
    #admin-panel-container.content-body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        height: calc(100vh - 65px);
        /* 隐藏滚动条 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #admin-panel-container.content-body::-webkit-scrollbar {
        display: none;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    /* 顶部统计栏 - 横向滚动 */
    .admin-stats-row {
        padding: 8px 12px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* 隐藏滚动条 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .admin-stats-row::-webkit-scrollbar {
        display: none;
    }

    .admin-stats-row .stat-card {
        min-width: 55px;
        padding: 6px 8px;
        flex-shrink: 0;
        border-radius: 8px;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .admin-stats-row .stat-icon {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
        margin-right: 0;
        margin-bottom: 2px;
    }
    
    .admin-stats-row .stat-content {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .admin-stats-row .stat-value {
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.2;
    }

    .admin-stats-row .stat-label {
        font-size: 0.5rem;
        white-space: nowrap;
    }

    /* 头部 */
    .admin-header {
        padding: 10px 12px;
    }

    .admin-header h1 {
        font-size: 0.95rem;
    }

    .admin-subtitle {
        display: none;
    }

    .admin-btn-refresh {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    /* 标签栏 */
    .admin-tabs {
        padding: 6px 10px;
        gap: 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        /* 隐藏滚动条 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .admin-tab i {
        font-size: 0.75rem;
    }

    .admin-tab span {
        display: inline;
    }

    /* 内容区域 */
    .admin-tab-content {
        padding: 10px;
        min-height: 0 !important;
        overflow-y: auto !important;
        flex: 1 !important;
        touch-action: pan-x pan-y;
    }

    .admin-tab-content.active {
        display: flex;
        flex-direction: column;
        overflow-y: auto !important;
    }
    
    /* 全宽布局移动端 */
    .admin-full-layout {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        touch-action: pan-x pan-y;
    }

    .admin-grid-layout {
        gap: 10px;
        height: auto;
        min-height: auto;
        overflow: visible !important;
        touch-action: pan-x pan-y;
    }

    .admin-side-area {
        flex-direction: column;
        max-height: none;
        gap: 10px;
        overflow: visible !important;
    }
    
    .admin-main-area {
        overflow: visible !important;
        height: auto !important;
    }

    .admin-side-area .admin-card.mini {
        min-width: 100%;
    }

    /* 卡片样式 */
    .admin-card {
        border-radius: 10px;
        margin-bottom: 15px;
        overflow: visible !important;
        height: auto !important;
    }

    .admin-card-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 14px;
        gap: 8px;
        align-items: center;
    }

    .admin-card-header h3 {
        font-size: 0.9rem;
        margin: 0;
    }

    .admin-card-body {
        padding: 16px 14px;
        overflow: visible !important;
        touch-action: pan-x pan-y;
    }

    .admin-card-actions {
        width: auto;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .admin-search {
        width: 100%;
        margin-bottom: 8px;
    }

    /* 表格移动端优化 */
    .admin-table-wrapper {
        overflow-x: auto;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 -8px;
        padding: 0 8px;
        max-height: none !important;
        touch-action: pan-x pan-y;
    }

    .admin-table-wrapper.full {
        max-height: none !important;
        height: auto !important;
        flex: none !important;
    }
    
    .admin-table {
        min-width: 100%;
        font-size: 0.68rem;
        table-layout: auto;
        touch-action: pan-x pan-y;
    }

    .admin-table th {
        padding: 5px 4px;
        font-size: 0.6rem;
        white-space: nowrap;
        background: #f8fafc;
    }

    .admin-table td {
        padding: 6px 4px;
        white-space: nowrap;
    }

    /* 表格内的徽章更小 */
    .admin-table .badge {
        padding: 2px 5px;
        font-size: 0.55rem;
        gap: 2px;
    }

    .admin-table .badge i {
        font-size: 0.5rem;
    }

    /* 资源表格移动端 - 紧凑布局 */
    .resource-table-layout {
        table-layout: fixed;
        min-width: 100%;
    }

    .resource-table-layout th:nth-child(1) {
        width: 32px;
    }

    /* 类型 */
    .resource-table-layout th:nth-child(2) {
        width: auto;
    }

    /* 标题 */
    .resource-table-layout th:nth-child(3) {
        width: 55px;
    }

    /* 分类 */
    .resource-table-layout th:nth-child(4) {
        width: 36px;
    }

    /* 操作 */

    .resource-table-layout td:nth-child(2) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .resource-table-layout td:nth-child(3) .badge {
        padding: 2px 6px;
        font-size: 0.6rem;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 用户表格移动端 - 隐藏部分列 */
    .user-table-layout {
        table-layout: auto;
        min-width: 100%;
    }

    /* 移动端隐藏 手机号 和 SOC 列 */
    .user-table-layout th:nth-child(4),
    .user-table-layout td:nth-child(4),
    .user-table-layout th:nth-child(7),
    .user-table-layout td:nth-child(7) {
        display: none;
    }

    .user-table-layout td {
        padding: 6px 4px !important;
    }

    .user-table-layout .badge {
        padding: 2px 5px;
        font-size: 0.55rem;
    }

    /* 用户列表布局 */
    .admin-full-layout {
        height: auto !important;
        min-height: auto !important;
        display: block;
        overflow: visible !important;
    }

    .admin-full-layout>.admin-card {
        margin-bottom: 15px;
        height: auto !important;
        overflow: visible !important;
        /* Allow table to expand */
    }

    .admin-full-layout>.admin-card:first-child {
        flex: none;
        max-height: none;
    }

    .admin-full-layout>.admin-card:first-child .admin-card-body {
        overflow: visible !important;
        /* Don't scroll inside, let page scroll */
        height: auto !important;
        max-height: none !important;
    }

    /* 创建用户表单 - 更紧凑 */
    .admin-full-layout>.admin-card:last-child {
        flex: none;
    }

    .admin-full-layout>.admin-card:last-child .admin-card-header {
        padding: 8px 12px;
    }

    .admin-full-layout>.admin-card:last-child .admin-card-body {
        padding: 10px 12px;
    }

    .create-user-form {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .create-user-form .form-group {
        margin-bottom: 0;
    }

    .create-user-form .form-group label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .create-user-form input,
    .create-user-form select {
        padding: 8px 10px;
        font-size: 13px;
        border-radius: 6px;
    }

    .create-user-form .form-full-width {
        grid-column: 1 / -1;
    }

    .create-user-form .btn-action-primary {
        grid-column: 1 / -1;
        padding: 10px;
        font-size: 13px;
    }

    /* 修复黑边问题 */
    .preview-pane,
    .content-body,
    #admin-panel-container {
        background: transparent;
    }

    /* 资源列表移动端筛选 */
    .admin-filter-sm,
    .admin-search-sm {
        font-size: 0.75rem;
        padding: 6px 10px;
        width: 100%;
        border-radius: 6px;
    }

    /* 资源项目列表 */
    .resource-list-item {
        padding: 10px;
        margin-bottom: 6px;
        border-radius: 8px;
    }

    /* 按钮统一样式 */
    .admin-btn-sm,
    .btn-action {
        padding: 6px 10px;
        font-size: 0.7rem;
        border-radius: 6px;
    }

    /* 表单组件 */
    .form-group {
        margin-bottom: 10px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 8px;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    /* 上传按钮 */
    .admin-upload-btn,
    .admin-submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.85rem;
        border-radius: 8px;
        margin-top: 8px;
    }

    /* 按钮移动端 */
    .admin-btn-refresh {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .btn-action {
        padding: 4px 6px;
        font-size: 0.65rem;
    }

    /* 表格内操作按钮更紧凑 */
    .admin-table .btn-action {
        padding: 4px 6px;
        font-size: 0.6rem;
        min-width: 28px;
    }

    .admin-table .btn-action i {
        font-size: 0.65rem;
    }

    /* 操作按钮组紧凑 */
    .admin-table td:last-child {
        white-space: nowrap;
    }

    .admin-table td:last-child .btn-action {
        margin: 1px;
    }

    /* 表单输入框 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    /* 侧边栏管理卡片 - 移动端优化 */
    .admin-side-area {
        gap: 15px;
        overflow: visible !important;
    }

    .admin-side-area .admin-card.mini {
        margin-bottom: 0;
    }

    .admin-side-area .admin-card.mini .admin-card-header {
        padding: 8px 10px;
    }

    .admin-side-area .admin-card.mini .admin-card-header h3 {
        font-size: 0.8rem;
    }

    .admin-side-area .admin-card.mini .admin-card-body {
        padding: 8px 10px;
    }

    .admin-side-area .mini-body {
        padding: 8px 10px;
        gap: 6px;
    }

    .admin-side-area .input-sm,
    .admin-side-area .select-styled {
        padding: 8px 10px;
        font-size: 12px;
    }

    .admin-side-area .btn-action-primary,
    .admin-side-area .btn-action-secondary {
        padding: 8px 12px;
        font-size: 12px;
    }

    .admin-side-area .file-upload-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .admin-side-area .mini-divider {
        margin: 8px 0;
        font-size: 10px;
    }

    .admin-side-area .textarea-sm {
        font-size: 12px;
        padding: 6px 8px;
    }

    .admin-side-area .checkbox-sm {
        font-size: 11px;
    }

    /* 资源内容区域优化 */
    .admin-main-area {
        min-height: 200px;
    }

    .admin-main-area .admin-card-header {
        padding: 8px 10px;
    }

    .admin-main-area .admin-card-actions {
        gap: 4px;
    }

    .admin-main-area .admin-search-sm {
        width: 80px;
        font-size: 11px;
        padding: 4px 6px;
    }

    .admin-main-area .admin-filter-sm {
        width: 60px;
        font-size: 11px;
        padding: 4px 6px;
    }

    /* 网格布局移动端 */
    .admin-grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        /* Increased gap */
    }

    .admin-side-area {
        gap: 1.5rem;
        /* Increased gap between cards in side area */
    }

    /* 增加卡片间距 */
    .admin-card {
        margin-bottom: 1.5rem !important;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

.error-msg {
    color: #ef4444;
    font-size: 14px;
    margin-top: 1rem;
    display: none;
    padding: 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.error-msg.visible {
    display: block !important;
}

/* New User Welcome Modal */
.new-user-modal {
    max-width: 420px;
}

.welcome-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.welcome-message {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 10px;
}

.welcome-message p {
    margin: 0.5rem 0;
    color: #065f46;
}

.welcome-message p:first-child {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-welcome {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    margin-bottom: 0.75rem;
}

.btn-welcome:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.btn-skip {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    background: #f1f5f9;
    color: #475569;
}

.required {
    color: #ef4444;
}

/* Custom Toast Notification */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 100001;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 400px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.custom-toast.hidden {
    display: none;
}

.custom-toast.success .toast-icon {
    color: #10b981;
}

.custom-toast.error .toast-icon {
    color: #ef4444;
}

.custom-toast.warning .toast-icon {
    color: #f59e0b;
}

.custom-toast.info .toast-icon {
    color: #3b82f6;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #f8fafc;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #f8fafc;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom Alert Modal */
#custom-alert-modal {
    z-index: 100000 !important;
}

.custom-alert-container {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: alertPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes alertPopIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.alert-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.alert-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: #10b981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.alert-icon.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.alert-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.alert-icon.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
    color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.alert-title {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 12px;
}

.alert-message {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 48px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.alert-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.alert-btn.success:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

/* Settings Button */
.settings-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.settings-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* 裁剪弹窗样式 */
.avatar-cropper-container {
    max-width: 450px;
}

#avatar-cropper-modal {
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
}

#avatar-cropper-modal .modal-container {
    margin: auto;
}

/* 覆盖 Cropper.js 的遮罩层样式 - 让裁剪区域外的部分更透明 */
.cropper-modal {
    background-color: rgba(0, 0, 0, 0.4) !important;
}

.cropper-body {
    padding: 1rem;
    background: #f8fafc;
}

.cropper-container-wrapper {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
}

.cropper-container-wrapper img {
    display: block;
    max-width: 100%;
}

.cropper-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
}

/* 封面裁剪弹窗样式 */
.cover-cropper-container {
    max-width: 760px;
}

.cover-crop-body {
    padding: 1.25rem 1.5rem 1rem;
    background: #f8fafc;
}

.cover-crop-preview {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

#cover-crop-canvas {
    max-width: 100%;
    max-height: 420px;
    display: block;
}

.cover-crop-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.cover-crop-controls label {
    font-size: 13px;
    color: #64748b;
}

.cover-crop-controls input[type="range"] {
    flex: 1;
    min-width: 160px;
}

.cover-crop-quality {
    font-size: 12px;
    color: #64748b;
}

.cover-crop-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
}

.cover-crop-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 1.5rem 1.25rem;
}

.btn-cancel-crop {
    padding: 10px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-cancel-crop:hover {
    background: #e2e8f0;
}

.btn-confirm-crop {
    padding: 10px 24px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-confirm-crop:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.modal-footer .btn-save-profile {
    width: 100%;
    margin: 0;
}

/* 头像区域 */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar #avatar-placeholder {
    font-size: 32px;
    color: #0ea5e9;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-overlay i {
    color: white;
    font-size: 20px;
}

.profile-avatar:hover .avatar-overlay {
    opacity: 1;
}

.profile-avatar-name {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.profile-tab {
    flex: 1;
    padding: 8px 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.profile-tab:hover {
    background: #e2e8f0;
}

.profile-tab.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Profile Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row label i {
    color: #0ea5e9;
    width: 16px;
}

.form-row input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-row input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Permission Toggle Switches */
.permission-toggles {
    margin-top: 0.5rem;
}

.permission-toggles .toggle-group {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-top: 0.5rem;
    flex-wrap: nowrap;
}

.toggle-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.9rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-switch input:checked~.toggle-label {
    color: #10b981;
    font-weight: 500;
}

.btn-save-profile {
    margin-top: 1rem;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Sessions Display */
.sessions-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.session-card {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
}

.session-card.session-remaining::before {
    background: linear-gradient(180deg, #10b981, #34d399);
}

.session-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.session-card.session-remaining .session-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.session-info {
    flex: 1;
}

.session-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.session-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.sessions-note {
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sessions-note i {
    color: #0ea5e9;
}

/* ==================== 外观设置 - 主题选择器 ==================== */
.appearance-settings {
    padding: 1rem 0;
}

.theme-section h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-section h4 i {
    color: #4facfe;
}

.theme-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.theme-option {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background: white;
}

.theme-option:hover {
    border-color: #4facfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.2);
}

.theme-option.active {
    border-color: #4facfe;
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.3);
}

.theme-preview {
    height: 80px;
    display: flex;
    padding: 8px;
    gap: 6px;
}

.theme-preview .preview-sidebar {
    width: 30%;
    border-radius: 6px;
}

.theme-preview .preview-content {
    flex: 1;
    border-radius: 6px;
}

/* 经典主题预览 */
.theme-preview-classic {
    background: #f0f2f5;
}
.theme-preview-classic .preview-sidebar {
    background: white;
    border: 1px solid #e9ecef;
}
.theme-preview-classic .preview-content {
    background: white;
    border: 1px solid #e9ecef;
}

/* 极简白蓝主题预览 */
.theme-preview-minimal {
    background: linear-gradient(135deg, #f2f6ff 0%, #e1e8f5 100%);
}
.theme-preview-minimal .preview-sidebar {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.theme-preview-minimal .preview-content {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* 赛博量子主题预览 */
.theme-preview-cyber {
    background: #050b14;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 8px 8px;
}
.theme-preview-cyber .preview-sidebar {
    background: rgba(12, 20, 35, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.2);
}
.theme-preview-cyber .preview-content {
    background: rgba(12, 20, 35, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.15);
}

.theme-name {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    background: #f8fafc;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.theme-check {
    display: none;
    color: #10b981;
}

.theme-option.active .theme-check {
    display: inline;
}

/* 移动端主题选择器 */
@media (max-width: 768px) {
    .theme-options {
        grid-template-columns: 1fr;
    }
    
    .theme-preview {
        height: 60px;
    }
}

/* User Edit Modal */
.user-edit-modal {
    max-width: 550px;
}

/* Admin User Table Edit Button */
.btn-action-edit-user {
    background: #e0e7ff;
    color: #4338ca;
}

.btn-action-edit-user:hover {
    background: #c7d2fe;
}

/* 疗愈次数单元格样式 */
.sessions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sessions-display {
    flex: 1;
}

.btn-quick-edit {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.btn-quick-edit:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* B站视频管理样式 */
.bilibili-card .admin-card-header {
    background: linear-gradient(135deg, #00a1d6 0%, #fb7299 100%);
}

.bilibili-card .admin-card-header h3 {
    color: white;
}

.bilibili-card .admin-card-header h3 i {
    color: white;
}

.section-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.section-divider span {
    padding: 0 1rem;
}

.video-batch-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.video-batch-section textarea:focus {
    outline: none;
    border-color: #00a1d6;
    box-shadow: 0 0 0 4px rgba(0, 161, 214, 0.1);
}

.admin-btn-secondary {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00a1d6 0%, #00b5e5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.admin-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 161, 214, 0.4);
}

/* 自动获取标题按钮 */
.btn-fetch-title {
    background: linear-gradient(135deg, #00a1d6 0%, #fb7299 100%);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-fetch-title:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 161, 214, 0.4);
}

/* 视频表格缩略图 */
#admin-video-table img {
    display: block;
}

/* 分类管理列表 */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateX(3px);
}

.category-icon {
    font-size: 1.4rem;
    width: 30px;
    text-align: center;
}

.category-name {
    flex: 1;
    font-weight: 600;
    color: #334155;
}

.category-key {
    font-size: 0.75rem;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.category-actions {
    display: flex;
    gap: 5px;
}

/* Compact Category List */
.category-list.compact {
    max-height: 180px;
    gap: 6px;
}

.category-list.compact .category-item {
    padding: 8px 10px;
}

.category-list.compact .category-icon {
    font-size: 1.1rem;
    width: 24px;
}

.category-list.compact .category-key {
    display: none;
}

/* 视频列表样式 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info .video-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-info .video-meta i {
    color: #00a1d6;
}

/* 视频播放器模态框 */
.video-player-modal {
    max-width: 900px;
    width: 95%;
}

.video-player-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-player-modal .modal-header h2 {
    flex: 1;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-open-bilibili {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-open-bilibili:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 其他内容页面容器 */
.other-content-container {
    padding: 1.5rem;
    padding-top: 75px; /* 电脑端间距 */
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    min-height: 100%;
}

.other-content-header {
    margin-bottom: 1.5rem;
}

.other-content-header h2 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.other-content-header h2 i {
    color: #00a1d6;
}

.other-content-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.empty-videos {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-videos i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-videos p {
    font-size: 1.1rem;
    margin: 0;
}

/* 太傻天书入口卡片 */
.taisha-entry-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.taisha-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.taisha-entry-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.taisha-entry-icon i {
    font-size: 1.8rem;
    color: white;
}

.taisha-entry-content {
    flex: 1;
}

.taisha-entry-content h3 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.taisha-entry-content p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.taisha-entry-arrow {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.taisha-entry-card:hover .taisha-entry-arrow {
    transform: translateX(4px);
    color: white;
}

/* Mobile Header */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn,
.mobile-user-btn {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: #e0e0e0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-menu-btn:hover,
.mobile-user-btn:hover {
    background: rgba(138, 43, 226, 0.4);
    transform: scale(1.05);
}

/* Mobile Floating Home Button - 只在PDF查看器打开时显示 */
.mobile-floating-home {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.mobile-floating-home:hover,
.mobile-floating-home:active {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* iPhone Safe Area Support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-floating-home {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* 只在PDF查看器可见时显示主页按钮 */
.pdf-viewer-active .mobile-floating-home {
    display: flex;
}

/* SOC计算页面时主页按钮移到左下方，避免遮挡底部按钮 */
.mobile-floating-home.home-btn-left {
    left: 20px;
    transform: none;
}

.mobile-floating-home.home-btn-left:hover,
.mobile-floating-home.home-btn-left:active {
    transform: scale(1.1);
}

/* 侧边栏打开时主页按钮移到右下角 */
.mobile-floating-home.home-btn-right {
    left: auto;
    right: 20px;
    transform: none;
}

.mobile-floating-home.home-btn-right:hover,
.mobile-floating-home.home-btn-right:active {
    transform: scale(1.1);
}

.mobile-title {
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(90deg, #8a2be2, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

.mobile-title:active {
    opacity: 0.7;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* ... existing styles ... */

    /* 移动端dashboard容器 - 使用block布局，让fixed的sidebar不影响布局 */
    .dashboard-container {
        display: block !important;
        height: 100vh;
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    /* 统一弹窗自适应 */
    .modal-container,
    .sessions-modal,
    .user-edit-modal,
    .video-player-modal {
        width: 92% !important;
        max-width: none !important;
        margin: 0 auto;
        max-height: 90vh;
        /* Increase height slightly */
        display: flex;
        flex-direction: column;
        position: relative;
        /* Ensure positioning context */
    }

    .modal-body,
    .sessions-modal-body {
        padding: 1.2rem;
        padding-bottom: 2rem;
        /* Extra padding for bottom safe area */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        /* Allow body to fill space and scroll */
        min-height: 0;
        /* Critical for flex nested scrolling */
    }

    .modal-header,
    .sessions-modal-header {
        padding: 1.2rem;
    }

    /* 登录界面自适应 */
    .login-container {
        width: 90%;
        max-width: 400px;
        padding: 2rem 1.5rem;
    }

    /* 个人中心标签页 - 横向滚动 */
    .profile-tabs {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.8rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0;
        margin-bottom: 1rem;
    }

    .profile-tab {
        flex: 0 0 auto;
        /* Don't shrink, size to content */
        width: auto;
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
        /* Capsule style tabs */
    }

    /* 表单行自适应 */
    .form-row-double {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 视频播放器全宽 */
    .video-player-modal {
        width: 100% !important;
        border-radius: 0;
        height: auto;
        max-height: none;
        background: black;
    }

    .video-player-modal .modal-header {
        padding: 12px 16px;
    }

    .video-player-modal .modal-header h2 {
        font-size: 1rem;
    }

    .video-player-container {
        padding-top: 56.25%;
        /* 16:9 Aspect Ratio */
        background: black;
        border-radius: 0;
    }

    /* 移动端评论按钮和评论显示 */
    .floating-comment-container {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        right: 12px !important;
        bottom: 70px !important;
        left: auto !important;
        top: auto !important;
        z-index: 99999 !important;
        position: fixed !important;
    }

    .floating-comment-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .floating-hide-comments-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .pdf-comment-sidebar {
        width: 92% !important;
        max-width: none !important;
        min-width: auto !important;
        left: 50% !important;
        right: auto !important;
        bottom: 140px !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        max-height: 45vh;
        overflow-y: auto;
    }

    .comment-composer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .comment-composer .comment-visibility-select {
        width: 100%;
        order: -1;
    }

    .comment-composer input {
        flex: 1;
        min-width: 0;
    }

    .pin-comment-float {
        position: fixed !important;
        width: 90% !important;
        max-width: none !important;
        left: 50% !important;
        right: auto !important;
        bottom: 50% !important;
        top: auto !important;
        transform: translate(-50%, 50%) !important;
    }

    .pin-comment-badge {
        transform: translate(-5px, -5px);
    }

    .pin-comment-badge .pin-text {
        max-width: 140px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .pin-comment-badge .pin-line {
        width: 20px;
    }

    .comment-bottom-bar {
        left: 12px;
        bottom: 100px;
        max-width: 200px;
    }

    /* 移动端头部显示 */
    .mobile-header {
        display: flex;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-title {
        color: #1d1d1f;
        background: none;
        -webkit-text-fill-color: initial;
    }

    .mobile-menu-btn,
    .mobile-user-btn {
        background: transparent;
        border: none;
        color: #007AFF;
    }

    /* 主页按钮默认隐藏，由JS控制显示 */
    .mobile-floating-home {
        display: none;
    }

    /* 移动端侧边栏样式覆盖 */
    .sidebar {
        width: 85%;
        max-width: 320px;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .sidebar-resource-list {
        max-height: 200px;
    }

    .content-body {
        flex-direction: column;
        padding-top: 0;
        width: 100% !important;
        flex: 1;
        height: calc(100vh - 65px);
        display: flex;
        overflow: visible;
    }

    .preview-pane {
        min-height: calc(100vh - 65px);
        height: calc(100vh - 65px);
        padding: 0;
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .preview-placeholder {
        width: 100%;
        height: 100%;
        padding: 0;
    }

    #welcome-canvas {
        width: 100% !important;
        height: 100% !important;
    }

    #preview-frame {
        width: 100% !important;
        height: calc(100vh - 65px) !important;
        border: none;
        flex: 1;
        min-height: calc(100vh - 65px);
        display: block;
    }

    /* 当preview-frame显示时（非hidden），确保它填满空间 */
    #preview-frame:not(.hidden) {
        position: relative;
        width: 100% !important;
        height: calc(100vh - 65px) !important;
    }

    .welcome-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
        margin-bottom: 5px;
    }

    .preview-placeholder {
        padding-bottom: 22vh;
    }

    .mobile-hint {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 28px;
        background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
        border: 1px solid rgba(79, 172, 254, 0.4);
        border-radius: 50px;
        color: rgba(200, 220, 255, 0.9);
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(79, 172, 254, 0.2);
    }

    .mobile-hint:hover,
    .mobile-hint:active {
        background: linear-gradient(135deg, rgba(79, 172, 254, 0.35) 0%, rgba(0, 242, 254, 0.35) 100%);
        border-color: rgba(79, 172, 254, 0.6);
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(79, 172, 254, 0.35);
    }

    .mobile-hint i {
        font-size: 1.1rem;
    }

    .profile-tabs {
        flex-direction: column;
    }

    .sessions-display {
        grid-template-columns: 1fr;
    }

    .form-row-double {
        grid-template-columns: 1fr;
    }

    /* PDF Toolbar Mobile */
    #pdf-toolbar {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 4px;
        justify-content: flex-start;
    }

    #pdf-toolbar button {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 13px;
        padding: 6px;
    }

    .toolbar-separator {
        display: none;
    }

    .toolbar-group {
        padding: 2px;
        gap: 2px;
        border-radius: 8px;
    }

    #pdf-page-info,
    #pdf-zoom-level {
        font-size: 11px;
        min-width: 40px;
        padding: 0 4px;
    }

    /* Hide some buttons on mobile for cleaner UI */
    #pdf-fit-width,
    #pdf-thumbnails-toggle {
        display: none;
    }

    /* Annotation toolbar mobile */
    .annotation-toolbar {
        padding: 6px 8px;
        gap: 6px;
    }

    .annotation-toolbar button {
        padding: 5px 8px;
        font-size: 11px;
    }

    .annotation-color {
        width: 20px;
        height: 20px;
    }

    /* PDF thumbnails mobile */
    .pdf-thumbnails {
        width: 80px;
        padding: 8px 4px;
    }

    /* PDF canvas wrapper mobile */
    #pdf-canvas-wrapper {
        padding: 12px;
        gap: 12px;
    }

    #pdf-canvas-wrapper.dual-column .pdf-page-canvas {
        max-width: 100%;
    }

    /* Hide logo text on mobile */
    .logo span {
        display: none;
    }

    .logo {
        justify-content: center;
    }

    /* 移动端空内容页面样式 */
    .empty-content-page {
        padding: 2rem 1.5rem;
        padding-top: 2rem;
        justify-content: flex-start;
    }

    .empty-content-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1.2rem;
    }

    .empty-content-icon i {
        font-size: 2rem;
    }

    .empty-content-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .empty-content-desc {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }

    .empty-content-hint {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
        max-width: 100%;
        line-height: 1.5;
    }
}

/* ==================== */
/* Login Tabs & SMS Styles */
/* ==================== */

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-tab:hover {
    color: #0ea5e9;
}

.login-tab.active {
    background: white;
    color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sms-group {
    display: flex;
    gap: 10px;
}

.sms-group input {
    flex: 1;
}

.btn-sms {
    padding: 0 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-sms:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-sms:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Slider Verify Modal */
.slider-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.slider-modal.hidden {
    display: none;
}

/* Privacy Policy Modal */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.privacy-modal.hidden {
    display: none;
}

.privacy-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    flex-shrink: 0;
}

.privacy-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}

.privacy-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.privacy-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.privacy-update {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
}

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

.privacy-section h3 {
    color: #4facfe;
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-section p {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.privacy-section ul {
    margin: 0;
    padding-left: 20px;
}

.privacy-section li {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.privacy-highlight {
    background: #f0f9ff;
    border-left: 3px solid #4facfe;
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #0369a1;
}

.slider-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    font-weight: 600;
}

.slider-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.slider-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-modal-body {
    padding: 24px 20px;
}

.slider-hint {
    text-align: center;
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.slider-container {
    user-select: none;
}

.slider-track {
    position: relative;
    height: 44px;
    background: #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
}

.slider-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 22px;
    transition: none;
}

.slider-progress.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.slider-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: none;
    z-index: 2;
}

.slider-thumb:active {
    cursor: grabbing;
}

.slider-thumb i {
    color: #0ea5e9;
    font-size: 14px;
    transition: all 0.3s ease;
}

.slider-thumb.success {
    background: #10b981;
}

.slider-thumb.success i {
    color: white;
}

.slider-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    white-space: nowrap;
}

.slider-text.hidden {
    display: none;
}

/* ==================== */
/* Consent Form Styles */
/* ==================== */

#consent-container {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: 100%;
    display: block !important;
    background: #f0f4f8;
}

#consent-container.hidden {
    display: none !important;
}

.consent-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 30px; /* 电脑端间距 */
    padding-bottom: 4rem;
}

.consent-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.consent-header h1 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.consent-header h1 i {
    color: #0ea5e9;
    flex-shrink: 0;
}

.consent-subtitle {
    color: #64748b;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
}

.consent-document {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.consent-intro {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #0ea5e9;
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.consent-section {
    margin-bottom: 2rem;
}

.consent-section h2 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
}

.consent-section p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.principle-item {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.principle-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.5rem;
}

.principle-item p {
    margin-bottom: 0;
}

.rights-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rights-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.rights-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
}

.rights-item p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.consent-confirmation {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    border: 1px solid #f59e0b;
}

.confirmation-text {
    color: #92400e;
    font-weight: 500;
    text-align: center;
    margin: 0;
    font-size: 1.05rem;
}

/* Signature Area */
.consent-signature-area {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.signature-form {
    margin-bottom: 1.5rem;
}

.signature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.signature-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.signature-field label i {
    color: #0ea5e9;
}

.signature-field input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.signature-field input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.signature-canvas-area {
    margin-top: 1.5rem;
}

.signature-canvas-area label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
}

.signature-canvas-area label i {
    color: #0ea5e9;
}

.canvas-container {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
}

#signature-canvas {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
    touch-action: none;
}

.canvas-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.btn-canvas-clear,
.btn-canvas-undo {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-canvas-clear {
    background: #fee2e2;
    color: #dc2626;
}

.btn-canvas-clear:hover {
    background: #fecaca;
}

.btn-canvas-undo {
    background: #e0e7ff;
    color: #4f46e5;
}

.btn-canvas-undo:hover {
    background: #c7d2fe;
}

.canvas-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Consent Actions */
.consent-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #374151;
    user-select: none;
}

.consent-checkbox input {
    display: none;
}

.consent-checkbox .checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.consent-checkbox input:checked+.checkmark {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.consent-checkbox input:checked+.checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.btn-consent-submit {
    padding: 14px 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-consent-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-consent-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Consent History */
#consent-history-container {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: 100%;
    display: block !important;
    background: #f0f4f8;
}

#consent-history-container.hidden {
    display: none !important;
}

.consent-history-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 75px; /* 电脑端间距 */
    padding-bottom: 4rem;
}

.consent-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-history {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-history i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-history p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-history .empty-hint {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.consent-history-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
}

.consent-history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.consent-history-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.consent-history-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.consent-history-details h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.consent-history-details p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.consent-history-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-view-consent,
.btn-download-consent,
.btn-pdf-consent {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-view-consent {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-view-consent:hover {
    background: #bae6fd;
}

.btn-pdf-consent {
    background: #fee2e2;
    color: #dc2626;
}

.btn-pdf-consent:hover {
    background: #fecaca;
}

.btn-download-consent {
    background: #dcfce7;
    color: #16a34a;
}

.btn-download-consent:hover {
    background: #bbf7d0;
}

/* Consent Signed Status */
.consent-signed-status {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    border: 2px solid #10b981;
}

.signed-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.signed-badge i {
    font-size: 1.6rem;
}

.signed-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.signed-info p {
    color: #475569;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.signed-info p strong {
    color: #1e293b;
}

.signed-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-view-signed,
.btn-download-signed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-view-signed {
    background: #0ea5e9;
    color: white;
}

.btn-view-signed:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

.btn-download-signed {
    background: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
}

.btn-download-signed:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

/* Consent Back Button (Mobile) */
.consent-back-btn {
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.consent-back-btn:hover {
    background: rgba(14, 165, 233, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .consent-header h1 {
        padding-left: 0;
        padding-right: 0;
    }

    .consent-page,
    .consent-history-page {
        padding: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 65px; /* 移动端顶部间距 */
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .consent-header h1 {
        font-size: 1.4rem;
    }

    .consent-document {
        padding: 1.25rem;
    }

    .consent-intro {
        padding: 1rem;
    }

    .signature-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .consent-signature-area {
        padding: 1.25rem;
    }

    #signature-canvas {
        height: 120px;
    }

    .btn-consent-submit {
        width: 100%;
        justify-content: center;
    }

    .consent-history-item {
        flex-direction: column;
        align-items: stretch;
    }

    .consent-history-actions {
        justify-content: flex-end;
    }

    /* 同意书页面底部内边距 - 防止提交按钮被遮挡 */
    .consent-page {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 20px));
    }

    .consent-actions {
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 20px));
        margin-bottom: 20px;
    }
}

/* ========================================
   情志病因 Grid Styles
   ======================================== */

.qingzhi-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px;
    padding-top: 75px; /* 电脑端间距 */
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    box-sizing: border-box;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* 隐藏情志病因容器的滚动条 - WebKit浏览器 */
.qingzhi-container::-webkit-scrollbar {
    display: none;
}

.qingzhi-header {
    margin-bottom: 40px;
    text-align: center;
}

.qingzhi-header h2 {
    font-size: 28px;
    color: #334155;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding-bottom: 24px; /* 增加下划线与文字的距离 */
    margin-bottom: 0;
}

.qingzhi-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    border-radius: 2px;
}

.qingzhi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
    box-sizing: border-box;
}

.qingzhi-card {
    background: transparent;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.qingzhi-card:hover {
    transform: translateY(-8px);
}

.qingzhi-card:active {
    transform: translateY(-4px);
}

.qingzhi-card:hover .qingzhi-cover-wrapper {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.qingzhi-cover-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: #fff;
}

.qingzhi-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.qingzhi-default-cover {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px;
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.1);
}

.book-title-vertical {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    max-height: 85%;
    letter-spacing: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qingzhi-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qingzhi-card:hover .qingzhi-card-overlay {
    opacity: 1;
}

.read-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    transform: translateY(15px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.qingzhi-card:hover .read-btn {
    transform: translateY(0);
}

.qingzhi-info {
    width: 100%;
    padding: 0 4px;
}

.qingzhi-card-title {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: left;
}

.qingzhi-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 12px;
}

.qingzhi-author {
    color: #64748b;
}

.qingzhi-stats {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qingzhi-stats i {
    font-size: 11px;
}

@media (max-width: 768px) {
    .qingzhi-container {
        padding: 20px 16px;
    }

    .qingzhi-header {
        margin-bottom: 24px;
    }

    .qingzhi-header h2 {
        font-size: 22px;
    }

    .qingzhi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 12px;
        padding: 0 10px 40px 10px;
    }

    .qingzhi-card-title {
        font-size: 13px;
    }

    .qingzhi-cover-wrapper {
        margin-bottom: 8px;
    }

    .book-title-vertical {
        font-size: 14px;
    }
}

/* ==================== 情志病因PDF下载按钮样式 ==================== */
.qingzhi-download-section {
    max-width: 1200px;
    margin: 40px auto 60px auto;
    padding: 0 20px;
    text-align: center;
}

.qingzhi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.qingzhi-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.qingzhi-download-btn:active {
    transform: translateY(-1px);
}

.qingzhi-download-btn i {
    font-size: 18px;
}

/* 情志病因下载模态框 */
.qingzhi-download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.qingzhi-download-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.qingzhi-download-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.qingzhi-download-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.qingzhi-download-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qingzhi-download-modal-header h3 i {
    color: #ef4444;
}

.qingzhi-download-modal-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.qingzhi-download-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.qingzhi-download-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 50vh;
}

.copyright-notice {
    text-align: center;
}

.copyright-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.copyright-icon i {
    font-size: 28px;
    color: #d97706;
}

.copyright-notice h4 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.copyright-notice p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.copyright-notice ul {
    text-align: left;
    padding-left: 24px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.8;
}

.copyright-notice ul li {
    margin-bottom: 4px;
}

.qingzhi-download-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    justify-content: flex-end;
}

.qingzhi-download-modal-footer .btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qingzhi-download-modal-footer .btn-secondary:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.qingzhi-download-modal-footer .btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qingzhi-download-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .qingzhi-download-section {
        margin: 30px auto 40px auto;
        padding: 0 16px;
    }

    .qingzhi-download-btn {
        padding: 14px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .qingzhi-download-modal-content {
        width: 95%;
        margin: 20px;
    }

    .qingzhi-download-modal-header {
        padding: 16px 20px;
    }

    .qingzhi-download-modal-header h3 {
        font-size: 16px;
    }

    .qingzhi-download-modal-body {
        padding: 20px;
    }

    .qingzhi-download-modal-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }

    .qingzhi-download-modal-footer .btn-secondary,
    .qingzhi-download-modal-footer .btn-primary {
        width: 100%;
        justify-content: center;
        white-space: nowrap;
    }
}

/* ==================== 情志病因PDF设置样式 ==================== */
.qingzhi-upload-row {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.qingzhi-file-zone {
    flex: 1;
    min-width: 200px;
}

.qingzhi-current-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    width: 100%;
}

.qingzhi-current-file i.fa-check-circle {
    color: #22c55e;
}

/* 删除按钮样式 */
.btn-delete-mini {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-delete-mini:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
}

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

.qingzhi-link-input {
    flex: 1;
    min-width: 200px;
}

/* 情志设置按钮尺寸调整 - 按钮不要太大 */
.qingzhi-upload-row .btn-action-primary,
.qingzhi-link-row .btn-action-secondary {
    flex-shrink: 0;
    flex-grow: 0;
    min-width: auto;
    width: auto;
    max-width: 120px;
    padding: 8px 16px !important;
}

.btn-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-action-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

@media (max-width: 768px) {
    .qingzhi-upload-row,
    .qingzhi-link-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .qingzhi-upload-row .btn-action-primary,
    .qingzhi-link-row .btn-action-secondary {
        width: auto;
        max-width: none;
        flex-shrink: 0;
    }

    .qingzhi-file-zone,
    .qingzhi-link-input {
        flex: 1;
        min-width: 150px;
    }
}


/* ==================== ICP备案信息样式 ==================== */
/* 登录页ICP */
.login-icp {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1000;
    padding: 10px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-icp .icp-line {
    margin: 3px 0;
}

.login-icp a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s ease;
}

.login-icp a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.login-icp span {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 6px;
    font-size: 11px;
}

/* 公安备案图标 */
.gongan-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.gongan-line {
    margin-top: 5px;
}

/* 主题按钮（在用户区域内） */
.theme-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-btn:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #7dd3fc;
    color: #0284c7;
}

.theme-btn i {
    font-size: 16px;
}

/* 主题选择面板 */
.theme-panel {
    position: absolute;
    bottom: 120px;
    left: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 6px;
    z-index: 100;
}

.theme-panel.hidden {
    display: none;
}

/* 色卡形式的主题选择 */
.theme-color-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-color-card:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.theme-color-card.active {
    border-color: #4facfe;
    background: #f0f9ff;
}

.theme-color-card .color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.theme-color-card:hover .color-swatch {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.theme-color-card span {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}

.theme-color-card.active span {
    color: #4facfe;
    font-weight: 600;
}

/* 旧版主题选项样式保留 */
.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background: #f8fafc;
}

.theme-option.active {
    border-color: #4facfe;
    background: #f0f9ff;
}

.theme-option span {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.theme-option.active span {
    color: #4facfe;
}

.theme-preview {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.classic-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #f0f2f5 50%);
}

.minimal-preview {
    background: linear-gradient(135deg, #00C6FB 0%, #005BEA 50%, #f8fafc 50%);
}

.cyber-preview {
    background: linear-gradient(135deg, #ff00ff 0%, #00f3ff 50%, #020208 50%);
}

/* 侧边栏ICP - 始终显示在底部 */
.sidebar-icp {
    padding: 10px 12px;
    text-align: center;
    border-top: 1px solid rgba(79, 172, 254, 0.1);
    flex-shrink: 0;
    background: linear-gradient(to bottom, transparent, rgba(79, 172, 254, 0.03));
    margin-top: auto;
}

.sidebar-icp .icp-line {
    margin: 4px 0;
}

.sidebar-icp a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 10px;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-icp a:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.08);
}

.sidebar-icp .gongan-icon {
    width: 12px;
    height: 12px;
}

/* 移动端侧边栏ICP */
@media (max-width: 768px) {
    .sidebar-icp {
        display: block;
        padding: 8px 10px;
    }
    
    .sidebar-icp a {
        font-size: 9px;
    }
    
    .login-icp {
        bottom: 10px;
    }
    
    .login-icp a {
        font-size: 10px;
    }
}



/* 屏幕阅读器专用（视觉隐藏但可访问） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==================== 疗程照片页面样式 - Apple风格 ==================== */
.photos-page {
    padding: 40px 24px;
    padding-top: 75px; /* 电脑端间距 */
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

#photos-container {
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

.photos-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 20px 0;
}

.photos-header h2 {
    font-size: 40px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.photos-header h2 i {
    display: none;
}

.photos-subtitle {
    color: #86868b;
    font-size: 18px;
    font-weight: 400;
}

/* 上传区域 - Apple风格 */
.photo-upload-section {
    margin-bottom: 32px;
    text-align: center;
}

.photo-upload-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #0071e3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.photo-upload-card.hidden {
    display: none;
}

.photo-upload-card:hover {
    background: #0077ed;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.4);
    transform: scale(1.02);
}

.photo-upload-card i {
    font-size: 18px;
    color: white;
    transition: transform 0.3s ease;
}

.photo-upload-card:hover i {
    transform: scale(1.1);
}

.photo-upload-card span {
    color: white;
    font-size: 15px;
    font-weight: 500;
}

/* 上传表单 - Apple风格 */
.photo-upload-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin: 16px auto 0;
    display: inline-block;
    min-width: 320px;
    text-align: left;
}

.photo-upload-form .form-row {
    margin-bottom: 14px;
}

.photo-upload-form .form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.photo-upload-form .form-row label i {
    margin-right: 5px;
    color: #0071e3;
}

.photo-upload-form .form-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    color: #1d1d1f;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.photo-upload-form .form-row input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.photo-preview-area {
    margin: 14px 0;
    text-align: center;
    padding: 12px;
    background: #f5f5f7;
    border-radius: 12px;
}

.photo-preview-area img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-upload-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.photo-upload-actions .btn-cancel {
    padding: 10px 20px;
    border: none;
    background: #f5f5f7;
    color: #1d1d1f;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.photo-upload-actions .btn-cancel:hover {
    background: #e8e8ed;
}

.photo-upload-actions .btn-confirm {
    padding: 10px 20px;
    border: none;
    background: #0071e3;
    color: white;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.photo-upload-actions .btn-confirm:hover:not(:disabled) {
    background: #0077ed;
    transform: scale(1.02);
}

.photo-upload-actions .btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 照片网格 - Apple风格 */
.photos-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.photos-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #86868b;
}

.photos-empty i {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #1d1d1f;
}

.photos-empty p {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.photos-empty span {
    font-size: 15px;
    color: #86868b;
}

/* 照片卡片 - Apple风格 */
.photo-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.photo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.photo-card-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
}

.photo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.photo-card:hover .photo-card-image img {
    transform: scale(1.08);
}

.photo-card-date {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1d1d1f;
    padding: 8px 14px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-card-date i {
    margin-right: 6px;
    color: #0071e3;
}

.photo-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
}

.photo-card:hover .photo-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.photo-card-actions button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-card-actions button:hover {
    background: #0071e3;
    color: white;
    transform: scale(1.1);
}

.photo-card-actions button:last-child:hover {
    background: #ff3b30;
}

.photo-card-info {
    padding: 20px;
}

.photo-card-desc {
    color: #1d1d1f;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

/* 照片查看器 - Apple风格 */
.photo-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-viewer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}

.photo-viewer-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.photo-viewer-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.photo-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* 移动端适配 - Apple风格 */
@media (max-width: 768px) {
    .photos-page {
        padding: 20px 16px;
    }
    
    .photos-header {
        margin-bottom: 32px;
    }
    
    .photos-header h2 {
        font-size: 28px;
    }
    
    .photos-subtitle {
        font-size: 15px;
    }
    
    .photo-upload-card {
        padding: 32px 20px;
    }
    
    .photo-upload-card i {
        font-size: 44px;
    }
    
    .photo-upload-card span {
        font-size: 15px;
    }
    
    .photo-upload-form {
        padding: 24px 20px;
    }
    
    .photos-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .photo-card-image {
        aspect-ratio: 1/1;
    }
    
    .photo-card-date {
        font-size: 11px;
        padding: 6px 10px;
        bottom: 10px;
        left: 10px;
    }
    
    .photo-card-info {
        padding: 14px;
    }
    
    .photo-card-desc {
        font-size: 13px;
    }
    
    .photo-card-actions {
        opacity: 1;
        transform: none;
    }
    
    .photo-card-actions button {
        width: 32px;
        height: 32px;
    }
    
    .photo-viewer-close {
        top: 20px;
        right: 20px;
    }
}

/* ==================== 管理员照片上传样式 ==================== */
.admin-photo-upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-photo-upload-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-photo-upload-form label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.admin-photo-upload-form label i {
    margin-right: 6px;
    color: #4facfe;
}

.admin-photo-preview {
    text-align: center;
}

/* 管理员照片网格 */
.admin-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.photos-empty-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.photos-empty-hint i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.photos-empty-hint p {
    font-size: 14px;
    margin: 0;
}

.admin-photo-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.admin-photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.admin-photo-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.admin-photo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.admin-photo-item:hover .admin-photo-img img {
    transform: scale(1.05);
}

.admin-photo-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-photo-date {
    font-size: 12px;
    color: #4facfe;
    font-weight: 500;
}

.admin-photo-desc {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-photo-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-photo-item:hover .admin-photo-delete {
    opacity: 1;
}

.admin-photo-delete:hover {
    background: #ef4444;
    color: white;
}

@media (max-width: 768px) {
    .admin-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

/* ==================== 太傻天书页面样式 ==================== */
.taisha-page {
    padding: 40px 24px;
    padding-top: 75px; /* 电脑端间距 */
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100%;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

#taisha-container {
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

.taisha-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 20px 0;
}

.taisha-header h2 {
    font-size: 40px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.taisha-subtitle {
    color: #86868b;
    font-size: 18px;
    font-weight: 400;
}

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

.taisha-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
}

.taisha-loading i {
    font-size: 32px;
    margin-bottom: 12px;
}

.taisha-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #86868b;
}

.taisha-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.taisha-empty p {
    font-size: 18px;
    color: #1d1d1f;
    margin-bottom: 8px;
}

/* 文章卡片 */
.article-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.article-card-cover {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.article-card-cover .default-cover {
    color: white;
    font-size: 48px;
    opacity: 0.5;
}

.article-card-body {
    padding: 20px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-summary {
    font-size: 14px;
    color: #86868b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #86868b;
}

.article-card-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-card-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 文章阅读器 */
#article-reader-container {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
}

.article-reader {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    padding-top: 75px; /* 电脑端间距 */
    padding-bottom: 100px;
    background: white;
    min-height: auto;
}

.article-reader-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f5f7;
    border: none;
    border-radius: 980px;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #e8e8ed;
}

.article-content {
    line-height: 1.8;
    color: #1d1d1f;
}

.article-content-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.article-content-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-content-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: #86868b;
    font-size: 14px;
}

.article-content-body {
    font-size: 16px;
}

.article-content-body h1,
.article-content-body h2,
.article-content-body h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.article-content-body h1 { font-size: 28px; }
.article-content-body h2 { font-size: 24px; }
.article-content-body h3 { font-size: 20px; }

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

.article-content-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 24px 0;
}

.article-content-body blockquote {
    border-left: 4px solid #0071e3;
    padding-left: 20px;
    margin: 24px 0;
    color: #64748b;
    font-style: italic;
}

.article-content-body code {
    background: #f5f5f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.article-content-body pre {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content-body pre code {
    background: none;
    padding: 0;
}

.article-content-body ul,
.article-content-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content-body li {
    margin-bottom: 8px;
}

/* 文章编辑器模态框 */
#article-editor-modal {
    z-index: 10000;
}

.article-editor-modal {
    max-width: 900px;
    max-height: 90vh;
    z-index: 10000;
}

.article-editor-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-editor-modal .modal-header h2 {
    color: white;
}

.article-editor-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
}

.article-editor-body .form-row {
    margin-bottom: 20px;
}

.article-editor-body .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.article-editor-body .form-row label i {
    margin-right: 6px;
    color: #6366f1;
}

.article-editor-body input[type="text"],
.article-editor-body input[type="number"],
.article-editor-body textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8fafc;
    box-sizing: border-box;
}

.article-editor-body input[type="text"]:focus,
.article-editor-body input[type="number"]:focus,
.article-editor-body textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px 10px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    flex-wrap: wrap;
    align-items: center;
}

.editor-toolbar button {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-toolbar button:hover {
    background: white;
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.editor-mode-label {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

#article-content {
    border-radius: 0 0 10px 10px;
    border-top: none;
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.7;
    min-height: 300px;
    resize: vertical;
}

.article-editor-preview {
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #f8fafc;
    color: #334155;
    min-height: 120px;
}

.article-editor-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
}

.cover-upload-area {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cover-preview {
    width: 180px;
    height: 100px;
    border: 2px dashed #d2d2d7;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    background: #f8fafc;
}

.cover-preview:hover {
    border-color: #6366f1;
    background: #f0f4ff;
}

.cover-preview i {
    font-size: 28px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.cover-preview span {
    font-size: 12px;
    color: #94a3b8;
}

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

/* 文章编辑器底部布局 */
.article-bottom-row {
    margin-bottom: 0 !important;
}

.article-meta-group {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: visible;
}

.article-meta-group .form-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-meta-group .form-col label {
    margin-bottom: 0 !important;
    white-space: nowrap;
}

.article-meta-group .sort-col {
    flex: 0 0 auto;
}

.article-meta-group .sort-col input {
    width: 80px;
    text-align: center;
}

.article-meta-group .publish-col {
    margin-left: auto;
    padding-right: 10px;
}

.article-meta-group .toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
    position: relative;
    z-index: 1;
}

.article-meta-group .toggle-slider {
    flex-shrink: 0;
}

.article-meta-group .toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

/* 文章编辑器按钮 */
.article-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-article-cancel {
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-article-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #374151;
}

.btn-article-draft {
    padding: 12px 24px;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #d97706;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-article-draft:hover {
    background: #fef3c7;
    border-color: #d97706;
}

.btn-article-publish {
    padding: 12px 28px;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-article-publish:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-article-publish:active {
    transform: translateY(0);
}

/* MD上传模态框 */
.md-upload-modal {
    max-width: 500px;
}

.md-upload-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-md-cancel {
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-md-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #374151;
}

.btn-md-upload {
    padding: 12px 28px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-md-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-md-upload:active {
    transform: translateY(0);
}

.md-upload-area {
    border: 2px dashed #d2d2d7;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f7;
}

.md-upload-area:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.md-upload-area i {
    font-size: 48px;
    color: #86868b;
    margin-bottom: 12px;
}

.md-upload-area p {
    color: #64748b;
    margin-bottom: 8px;
}

.md-upload-area #md-file-name {
    color: #0071e3;
    font-weight: 500;
}

/* 管理后台文章列表 */
.article-admin-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.article-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-admin-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.article-admin-item:hover {
    background: #f1f5f9;
}

.article-admin-cover {
    width: 80px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.article-admin-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-admin-info {
    flex: 1;
    min-width: 0;
}

.article-admin-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-admin-meta {
    font-size: 12px;
    color: #86868b;
    display: flex;
    gap: 12px;
}

.article-admin-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.article-admin-status.published {
    background: #dcfce7;
    color: #16a34a;
}

.article-admin-status.draft {
    background: #fef3c7;
    color: #d97706;
}

.article-admin-actions-btns {
    display: flex;
    gap: 8px;
}

.article-admin-actions-btns button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-article {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-edit-article:hover {
    background: #0284c7;
    color: white;
}

.btn-delete-article {
    background: #fee2e2;
    color: #dc2626;
}

.btn-delete-article:hover {
    background: #dc2626;
    color: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .taisha-page {
        padding: 20px 16px;
    }
    
    .taisha-header h2 {
        font-size: 28px;
    }
    
    .taisha-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .article-reader {
        padding: 16px;
    }
    
    .article-content-header h1 {
        font-size: 24px;
    }
    
    .article-editor-modal {
        max-width: 100%;
        width: 100% !important;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .article-editor-body {
        padding: 16px;
        max-height: calc(100vh - 60px);
    }
    
    .article-meta-group {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .article-meta-group .form-col {
        width: 100%;
        justify-content: space-between;
    }
    
    .article-meta-group .sort-col input {
        width: 100px;
    }
    
    .article-meta-group .publish-col {
        margin-left: 0;
    }
    
    .article-form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .btn-article-cancel,
    .btn-article-draft,
    .btn-article-publish {
        width: 100%;
        justify-content: center;
    }
    
    .editor-toolbar {
        padding: 8px;
    }
    
    .editor-toolbar button {
        width: 30px;
        height: 30px;
    }
    
    #article-content {
        min-height: 200px;
    }
    
    /* 文章管理列表移动端适配 */
    .article-admin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    
    .article-admin-cover {
        width: 100%;
        height: 120px;
        border-radius: 8px;
    }
    
    .article-admin-info {
        width: 100%;
    }
    
    .article-admin-title {
        white-space: normal;
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .article-admin-meta {
        flex-wrap: wrap;
        gap: 8px 16px;
    }
    
    .article-admin-item > .article-admin-status {
        position: absolute;
        top: 14px;
        right: 14px;
    }
    
    .article-admin-item {
        position: relative;
    }
    
    .article-admin-actions-btns {
        width: 100%;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 4px;
    }
    
    .article-admin-actions-btns button {
        width: 40px;
        height: 40px;
    }
    
    /* 文章管理操作按钮 */
    .article-admin-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-admin-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Ethereal Theme Preview */
.theme-preview-ethereal {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.theme-preview-ethereal .preview-sidebar {
    background: rgba(255, 255, 255, 0.75);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
}

.theme-preview-ethereal .preview-content {
    background: transparent;
}
/* ==================== Mobile & Console Fixes ==================== */

/* 1. Mobile Consent Header Fix */
@media screen and (max-width: 768px) {
    .consent-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .consent-back-btn {
        position: static;
        /* Remove absolute positioning if it exists */
        transform: none;
        margin-bottom: 10px;
    }

    .consent-header h1 {
        font-size: 1.3rem !important;
        /* Smaller font on mobile */
        line-height: 1.3;
        margin: 0;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    /* 隐藏手机端的图标 */
    .consent-header h1 i {
        display: none;
    }

    .consent-subtitle {
        font-size: 0.85rem;
        white-space: nowrap;
        text-align: center;
    }
}

/* 2. Global Mobile Adjustments for Ethereal */
[data-theme="ethereal"] .consent-header {
    /* Ensure flex is enabled if not already */
    display: flex;
    position: relative;
}
/* ==================== Theme Thumbnail REDESIGN ==================== */

/* Base Thumbnail Style */
.theme-preview {
    position: relative !important;
    width: 100% !important;
    height: 80px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    display: flex !important;
}

/* Selected State */
.theme-option.active .theme-preview {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* 1. Classic Theme (Blue Header, Light Sidebar) */
.theme-preview-classic {
    background: #f0f2f5 !important;
}

.theme-preview-classic .preview-sidebar {
    width: 30% !important;
    background: #fff !important;
    border-right: 1px solid #e5e7eb !important;
}

.theme-preview-classic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
}

/* 2. Minimalist Theme (Clean White/Blue) */
.theme-preview-minimal {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
}

.theme-preview-minimal .preview-sidebar {
    width: 25% !important;
    background: #f8fafc !important;
    margin: 4px;
    border-radius: 4px;
}

.theme-preview-minimal .preview-content::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #e0f2fe;
    border-radius: 50%;
}

/* 3. Cyber Theme (Dark, Neon Pink/Blue) */
.theme-preview-cyber {
    background: #050510 !important;
    border: 1px solid #333 !important;
}

.theme-preview-cyber .preview-sidebar {
    width: 30% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-right: 1px solid #00f3ff !important;
}

.theme-preview-cyber::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f3ff, #ff00ff);
    box-shadow: 0 0 8px #ff00ff;
}

.theme-preview-cyber .preview-content {
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
}

/* 4. Ethereal Theme (Glass, Soft Gradients, Rounded) */
.theme-preview-ethereal {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    padding: 4px !important;
    gap: 4px !important;
}

.theme-preview-ethereal .preview-sidebar {
    width: 28% !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 6px !important;
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.theme-preview-ethereal .preview-content {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8);
}
/* ==================== Theme Thumbnail COMPACT REDESIGN ==================== */

/* 1. Reset Container Grid/Flex to be more compact */
.theme-options {
    display: flex !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.theme-option {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    width: 80px !important;
    /* Fixed small width */
}

/* 2. Smaller, Circular Swatches */
.theme-preview {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    /* Circle */
    border: 3px solid transparent !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    background: #fff;
    /* fallback */
    /* Remove old internal elements */
}

/* Hide internal mockup divs if they exist */
.theme-preview .preview-sidebar,
.theme-preview .preview-content {
    display: none !important;
}

/* Hover & Active States */
.theme-option:hover .theme-preview {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

.theme-option.active .theme-preview {
    border-color: #fff !important;
    /* Inner white border */
    box-shadow:
        0 0 0 3px #3b82f6,
        /* Outer focus ring */
        0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: scale(1.05) !important;
}

/* Hide the check circle icon text - strictly visual selection */
.theme-name i {
    display: none !important;
}

.theme-name {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.theme-option.active .theme-name {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

/* ==================== THEME SWATCH STYLES ==================== */

/* 1. Classic (Blue/White) - Diagonal Split */
.theme-preview-classic {
    background: linear-gradient(135deg, #1e3a8a 50%, #f0f2f5 50%) !important;
}

/* 2. Minimal (White/Light Blue) - Soft Gradient */
.theme-preview-minimal {
    background: #fff !important;
    background: linear-gradient(135deg, #ffffff 40%, #e0f2fe 100%) !important;
    border: 1px solid #e2e8f0 !important;
}

/* 3. Cyber (Dark/Neon) - Tech Gradient */
.theme-preview-cyber {
    background: linear-gradient(135deg, #020208 0%, #1a1a2e 50%, #00f3ff 100%) !important;
    position: relative !important;
}

/* Add a neon ping ring for cyber */
.theme-preview-cyber::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 60% !important;
    height: 60% !important;
    border-radius: 50% !important;
    border: 2px solid #ff00ff !important;
    box-shadow: 0 0 5px #ff00ff !important;
}

/* 4. Ethereal (Glass/Pastel) - Mesh Gradient */
.theme-preview-ethereal {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%) !important;
    /* Add a nice holographic sheen */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent),
        linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%) !important;
    /* Fresh Green/Blue */
    /* Let's match the "Ethereal" vibe better: Matte White + Teal/Purple hints */
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%) !important;
    overflow: hidden !important;
}

.theme-preview-ethereal::before {
    content: '' !important;
    position: absolute !important;
    top: -10% !important;
    right: -10% !important;
    width: 60% !important;
    height: 60% !important;
    background: rgba(45, 212, 191, 0.4) !important;
    /* Teal */
    filter: blur(8px) !important;
    border-radius: 50% !important;
}

.theme-preview-ethereal::after {
    content: '' !important;
    position: absolute !important;
    bottom: -10% !important;
    left: -10% !important;
    width: 60% !important;
    height: 60% !important;
    background: rgba(167, 139, 250, 0.4) !important;
    /* Lavender */
    filter: blur(8px) !important;
    border-radius: 50% !important;
}


/* ==================== 全局导航栏样式 ==================== */
:root {
    --global-nav-height: 60px;
    --global-nav-island-top: 16px;
}

#global-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    pointer-events: none;
}

#global-navigation > * {
    pointer-events: auto;
}

/* 展开状态 - 全宽导航 */
.global-nav-expanded {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.global-nav.scrolled .global-nav-expanded {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

.global-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo */
.global-nav-logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    color: #1f2937;
    white-space: nowrap;
    transition: color 0.2s;
}

.global-nav-logo:hover {
    color: #0ea5e9;
}

/* 菜单按钮 */
.global-nav-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #374151;
    transition: background 0.2s, transform 0.2s;
    font-size: 16px;
}

.global-nav-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

/* 导航链接 */
.global-nav-links {
    display: flex;
    gap: 2rem;
}

.global-nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem;
    white-space: nowrap;
}

.global-nav-links a:hover {
    color: #1f2937;
}

/* 灵动岛状态 */
.global-nav-island {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.global-nav.scrolled .global-nav-island {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

/* 确保灵动岛内所有元素可点击 */
.global-nav.scrolled .global-nav-island * {
    pointer-events: auto;
}

.global-nav-island .global-nav-menu-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 14px;
}

.global-nav-island .global-nav-logo {
    font-size: 12px;
    white-space: nowrap;
}

.global-nav-island .global-nav-links {
    gap: 1rem;
}

.global-nav-island .global-nav-links a {
    font-size: 12px;
    padding: 0.25rem;
    white-space: nowrap;
}

/* 灵动岛状态下显示右侧菜单按钮 */
.global-nav-island .global-nav-mobile-menu {
    display: flex;
    width: 28px;
    height: 28px;
    font-size: 14px;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

/* 移动端菜单按钮 */
.global-nav-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #374151;
    transition: background 0.2s;
    font-size: 16px;
}

.global-nav-mobile-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 移动端下拉菜单 */
.global-nav-mobile-dropdown {
    display: none;
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 99999;
    pointer-events: auto;
}

#global-nav-mobile-dropdown.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* 确保下拉菜单在任何情况下都能显示 */
body:not(.homepage-active) #global-nav-mobile-dropdown.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
}

.global-nav-mobile-dropdown a {
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.global-nav-mobile-dropdown a i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

.global-nav-mobile-dropdown a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0ea5e9;
}

.global-nav-mobile-dropdown a:hover i {
    color: #0ea5e9;
}

.mobile-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.mobile-dropdown-profile {
    color: #0ea5e9 !important;
}

.mobile-dropdown-profile i {
    color: #0ea5e9 !important;
}

/* 响应式 - 移动端 */
@media (max-width: 768px) {
    .global-nav-expanded .global-nav-links,
    .global-nav-island .global-nav-links {
        display: none;
    }
    
    .global-nav-mobile-menu {
        display: flex;
    }
    
    .global-nav-expanded {
        padding: 1rem 1.5rem;
    }
    
    .global-nav-island {
        padding: 0.5rem 1rem;
        gap: 1rem;
    }
    
    /* 非主页时隐藏原本的mobile-header，使用灵动岛导航 */
    body:not(.homepage-active) .mobile-header {
        display: none !important;
    }
}

/* 主页时隐藏全局导航（iframe有自己的导航） */
.homepage-active #global-navigation {
    display: none;
}

/* 主页时也隐藏全局导航的下拉菜单 */
.homepage-active #global-nav-mobile-dropdown {
    display: none !important;
}

/* 非主页时不需要额外的顶部间距，因为iframe内的页面已经有了 */
body:not(.homepage-active) .main-content {
    padding-top: 0;
}

/* 侧边栏打开时，主内容区域不需要左边距（侧边栏是fixed定位，覆盖在上面） */
.sidebar.active ~ .main-content {
    margin-left: 0;
}

/* 内容区域居中显示 */
.main-content {
    margin: 0 auto;
    max-width: 100%;
}

/* 各内容容器居中 */
#soc-container,
#consent-container,
#consent-history-container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 75px; /* 电脑端间距 */
}

/* 管理后台全屏显示 */
#admin-panel-container {
    max-width: 100%;
    margin: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0; /* 管理后台内部处理间距 */
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

#admin-panel-container::-webkit-scrollbar {
    display: none; /* WebKit浏览器 */
}

/* 管理后台头部需要顶部间距 */
#admin-panel-container .admin-header {
    margin-top: 70px; /* 为全局导航栏留出空间 */
}

/* 隐藏SOC容器的滚动条但保持滚动功能 */
#soc-container {
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

#soc-container::-webkit-scrollbar {
    display: none; /* WebKit浏览器 */
}

/* ==================== 新主页iframe样式 ==================== */
.homepage-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #0a1628;
    display: block; /* 移除iframe底部间隙 */
}

#preview-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    line-height: 0; /* 移除iframe底部间隙 */
    background: #0a1628; /* 与iframe背景一致 */
}

/* iframe加载状态 */
.homepage-iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4facfe;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.homepage-iframe-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 172, 254, 0.2);
    border-top-color: #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* iframe错误状态 */
.homepage-iframe-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6c757d;
}

.homepage-iframe-error button {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.homepage-iframe-error button:hover {
    opacity: 0.9;
}

/* 桌面端主页全屏显示 */
.homepage-active .main-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
}

.homepage-active .preview-pane {
    width: 100%;
    height: 100%;
}

.homepage-active #preview-placeholder {
    width: 100%;
    height: 100%;
}

.homepage-active .homepage-iframe {
    width: 100%;
    height: 100%;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    /* 当主页iframe显示时，隐藏父页面的mobile-header */
    /* 因为React主页有自己的导航栏 */
    .homepage-active .mobile-header {
        display: none !important;
    }
    
    /* 移动端容器重置padding */
    #consent-container,
    #consent-history-container,
    #admin-panel-container,
    #soc-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 非主页时，为所有侧边栏页面添加顶部间距（灵动岛空间） */
    body:not(.homepage-active) #soc-container,
    body:not(.homepage-active) #consent-container,
    body:not(.homepage-active) #consent-history-container,
    body:not(.homepage-active) .consent-page,
    body:not(.homepage-active) .qingzhi-container,
    body:not(.homepage-active) .taisha-page,
    body:not(.homepage-active) .photos-page,
    body:not(.homepage-active) .consent-history-page,
    body:not(.homepage-active) .empty-content-page,
    body:not(.homepage-active) .other-preview-container,
    body:not(.homepage-active) .other-content-container,
    body:not(.homepage-active) #taisha-container,
    body:not(.homepage-active) #photos-container,
    body:not(.homepage-active) .article-reader,
    body:not(.homepage-active) #article-reader-container {
        padding-top: 80px !important; /* 移动端为灵动岛留出空间 */
    }
    
    /* 管理后台特殊处理 - 需要更大的顶部间距 */
    body:not(.homepage-active) #admin-panel-container {
        padding-top: 0 !important; /* 管理后台内部处理间距 */
    }
    
    /* 管理后台头部需要额外的顶部间距 */
    body:not(.homepage-active) #admin-panel-container .admin-header {
        margin-top: 70px; /* 为灵动岛留出空间 */
        position: relative; /* 取消sticky，避免重叠 */
        top: auto;
    }
    
    /* 主页iframe全屏显示 */
    .homepage-active .homepage-iframe {
        width: 100%;
        height: 100vh !important;
        min-height: 100vh !important;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
    }
    
    .homepage-active #preview-placeholder {
        height: 100vh !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 50;
    }
    
    .homepage-active .preview-pane {
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    /* 非主页状态下的iframe样式 */
    .homepage-iframe {
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 60px); /* 减去移动端头部高度 */
    }
    
    #preview-placeholder {
        height: calc(100vh - 60px);
    }
    
    /* 未登录状态在移动端的样式调整 */
    .user-profile-guest {
        padding: 0.6rem 0.8rem;
    }
    
    .guest-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .guest-name {
        font-size: 12px;
    }
    
    .guest-hint {
        font-size: 10px;
    }
    
    .login-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .homepage-active .homepage-iframe {
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    .homepage-active #preview-placeholder {
        height: 100vh !important;
    }
    
    .homepage-iframe {
        min-height: calc(100vh - 56px);
    }
    
    #preview-placeholder {
        height: calc(100vh - 56px);
    }
}


/* ==================== 登录模态框样式 ==================== */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.login-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.login-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(79, 172, 254, 0.2);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.login-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(79, 172, 254, 0.1);
}

.login-modal-header h3 {
    margin: 0;
    color: #f1f5f9;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-modal-header h3 i {
    color: #4facfe;
}

.login-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.login-modal-close:hover {
    color: #f1f5f9;
}

.login-modal-body {
    padding: 24px;
    text-align: center;
}

.login-modal-body p {
    margin: 0 0 12px 0;
    color: #e2e8f0;
    font-size: 1rem;
}

.login-modal-body .login-modal-hint {
    color: #94a3b8;
    font-size: 0.875rem;
}

.login-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: center;
}

.login-modal-footer .btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
}

.login-modal-footer .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
}

.login-modal-footer .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: #0f172a;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.login-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .login-modal-content {
        width: 95%;
        margin: 16px;
    }
    
    .login-modal-footer {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .login-modal-footer .btn-secondary,
    .login-modal-footer .btn-primary {
        flex: 1;
        justify-content: center;
        white-space: nowrap;
    }
}

/* ==================== 滚动性能优化 ==================== */
/* Smooth scrolling for all scrollable elements */
html {
    scroll-behavior: smooth;
}

/* Optimize scrolling performance */
.sidebar,
.sidebar-resource-list,
#pdf-canvas-wrapper,
.content-body,
.admin-table-wrapper,
.modal-content,
.privacy-modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Reduce repaints during scroll */
@media (prefers-reduced-motion: no-preference) {
    .sidebar-resource-list .resource-item,
    .nav-item,
    .stat-card,
    .admin-card {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Disable heavy effects during scroll for better performance */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - simplify hover effects */
    .nav-item:hover,
    .resource-item:hover,
    .stat-card:hover {
        transform: none !important;
    }

    /* Reduce backdrop-filter intensity on mobile for performance */
    .pdf-comment-sidebar,
    .pin-comment-float,
    .annotation-toolbar {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

/* ==================== 文章页面样式 ==================== */

/* 文章列表页容器 - 覆盖content-body默认样式 */
#articles-page-container.content-body,
#article-detail-container.content-body {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(140deg, #f6f1e9 0%, #fbfaf7 55%, #efe7da 100%);
}

#articles-page-container {
    --blog-ink: #101010;
    --blog-muted: #6b6b6b;
    --blog-paper: #fbfaf7;
    --blog-sand: #f0eadf;
    --blog-line: #e2dccf;
    --blog-heading-font: 'Cormorant Garamond', serif;
    --blog-body-font: 'Rajdhani', sans-serif;

    position: relative;
    width: 100%;
    max-width: none;
    padding: 36px clamp(20px, 4vw, 96px) 80px;
    padding-top: calc(58px + var(--global-nav-height) + var(--global-nav-island-top));
    margin: 0;
    min-height: 100%;
    color: var(--blog-ink);
    font-family: var(--blog-body-font);
}

#articles-page-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.4;
    pointer-events: none;
}

/* 轮播图区域 */
.articles-banner-section {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 48px;
    box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
    background: #101010;
    z-index: 1;
}

.articles-banner-carousel {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.banner-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
}

.banner-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #2b2b2b 0%, #0f0f0f 100%);
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 70%);
    color: #f8f5ef;
}

.banner-overlay h3 {
    font-family: var(--blog-heading-font);
    font-size: 28px;
    font-weight: 600;
    margin: 8px 0 6px;
}

.banner-overlay p {
    font-size: 14px;
    margin: 0 0 10px;
    color: rgba(248, 245, 239, 0.8);
    max-width: 520px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.banner-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(248, 245, 239, 0.7);
}

.banner-meta {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(248, 245, 239, 0.7);
}

.banner-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-indicators .banner-indicator {
    width: 28px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-indicators .banner-indicator.active {
    background: #f8f5ef;
}

.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.articles-banner-section:hover .banner-nav-btn {
    opacity: 1;
}

.banner-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.08);
}

.articles-banner-section.single-banner .banner-nav-btn {
    display: none;
}

.banner-prev {
    left: 16px;
}

.banner-next {
    right: 16px;
}

/* 文章列表布局 */
.articles-blog-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 56px;
    align-items: start;
    z-index: 1;
}

#articles-page-container .articles-banner-section,
#articles-page-container .articles-sidebar,
#articles-page-container .articles-list-panel {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#articles-page-container.is-ready .articles-banner-section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.05s;
}

#articles-page-container.is-ready .articles-sidebar {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
}

#articles-page-container.is-ready .articles-list-panel {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}

.articles-sidebar {
    position: sticky;
    top: 24px;
}

.articles-sidebar-title h1 {
    font-family: var(--blog-heading-font);
    font-size: 64px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
}

.articles-sidebar-title sup {
    font-size: 18px;
    font-weight: 500;
    color: var(--blog-muted);
    margin-left: 8px;
}

.articles-sidebar-block {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--blog-line);
}

.articles-sidebar-label {
    font-size: 12px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--blog-muted);
}

.articles-sidebar-desc {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--blog-muted);
}

.articles-sidebar-thumbnail {
    margin-top: 32px;
    height: 220px;
    border-radius: 14px;
    border: 1px solid var(--blog-line);
    background: linear-gradient(135deg, #0f0f0f 0%, #2a2a2a 100%);
    color: #f8f5ef;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.articles-sidebar-thumbnail.empty {
    cursor: default;
    opacity: 0.7;
}

.articles-sidebar-thumbnail::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0.9;
}

.articles-sidebar-thumbnail.has-image {
    background-size: cover;
    background-position: center;
}

.articles-sidebar-thumbnail span {
    position: relative;
    z-index: 1;
}

.articles-sidebar-thumbnail:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.thumbnail-badge {
    font-size: 28px;
    letter-spacing: 0.12em;
    font-family: var(--blog-heading-font);
}

.thumbnail-caption {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(248, 245, 239, 0.8);
}

.articles-list-panel {
    border-top: 1px solid var(--blog-line);
    padding-top: 12px;
}

.articles-list-header {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    padding: 0 0 16px;
    color: var(--blog-muted);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
}

.articles-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-row {
    border-bottom: 1px solid var(--blog-line);
}

.article-row-link {
    width: 100%;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    align-items: center;
    padding: 22px 0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    animation: blogFadeUp 0.5s ease forwards;
    animation-delay: var(--delay, 0s);
    transition: background 0.3s ease, color 0.3s ease;
}

.article-row-date {
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--blog-muted);
}

.article-row-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-row-title {
    font-family: var(--blog-heading-font);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.3s ease;
}

.article-row-summary {
    display: none;
    font-size: 14px;
    color: var(--blog-muted);
    line-height: 1.6;
}

.article-row-thumb {
    display: none;
}

.article-row-thumb img,
.article-row-thumb .thumb-placeholder {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.article-row-thumb .thumb-placeholder {
    background: linear-gradient(135deg, #d7d0c4 0%, #efe9df 100%);
}

.article-row.featured {
    border-bottom: none;
}

.article-row.featured .article-row-link {
    background: #111;
    color: #f8f5ef;
    border-radius: 16px;
    padding: 26px;
    margin: 14px 0;
}

.article-row:not(.featured) .article-row-link:hover,
.article-row:not(.featured) .article-row-link.is-hovered {
    background: #111;
    color: #f8f5ef;
}

.article-row:not(.featured) .article-row-link:hover .article-row-title,
.article-row:not(.featured) .article-row-link.is-hovered .article-row-title {
    transform: translateX(6px);
}

.article-row:not(.featured) .article-row-link:hover .article-row-date,
.article-row:not(.featured) .article-row-link.is-hovered .article-row-date {
    color: rgba(248, 245, 239, 0.7);
}

.article-row:not(.featured) .article-row-link:hover .article-row-summary,
.article-row:not(.featured) .article-row-link.is-hovered .article-row-summary {
    color: rgba(248, 245, 239, 0.65);
}

.article-row.featured .article-row-date {
    color: rgba(248, 245, 239, 0.7);
}

.articles-loading,
.articles-no-more,
.articles-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--blog-muted);
}

.articles-loading i,
.articles-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

@keyframes blogFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #articles-page-container .articles-banner-section,
    #articles-page-container .articles-sidebar,
    #articles-page-container .articles-list-panel {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .article-row-link {
        animation: none;
    }
}

/* ==================== 文章详情页样式 ==================== */

#article-detail-container {
    padding: 32px clamp(16px, 4vw, 96px) 80px;
    padding-top: calc(58px + var(--global-nav-height) + var(--global-nav-island-top));
    max-width: none;
    margin: 0;
    min-height: 100%;
    background: linear-gradient(140deg, #f6f1e9 0%, #fbfaf7 55%, #efe7da 100%);
}

.article-detail-wrapper {
    max-width: 980px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    position: relative;
}

.article-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255,255,255,0.85);
    position: sticky;
    top: 0;
    z-index: 10;
    pointer-events: auto;
}

.article-detail-header .btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f2ec;
    border: none;
    border-radius: 8px;
    color: #6b6b6b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.article-detail-header .btn-back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.article-actions {
    display: flex;
    gap: 8px;
}

.article-actions-bottom {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e6e0d5;
    justify-content: center;
    flex-wrap: wrap;
}

.article-actions .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fdfaf6;
    border: 1px solid #e6e0d5;
    border-radius: 999px;
    color: #5c5851;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.article-actions .action-btn:hover {
    background: #f4eee4;
    border-color: #d8d1c4;
}

.article-actions .action-btn.active {
    background: #1f1d1b;
    border-color: #1f1d1b;
    color: #f8f5ef;
}

.article-actions .action-btn.active i {
    color: #f8f5ef;
}

#btn-article-collect.active {
    background: #1f1d1b;
    border-color: #1f1d1b;
    color: #f8f5ef;
}

#btn-article-collect.active i {
    color: #f8f5ef;
}

.article-detail-content {
    padding: 32px;
    font-family: var(--blog-body-font);
}

.article-title {
    font-family: var(--blog-heading-font);
    font-size: 34px;
    font-weight: 600;
    color: #1f1d1b;
    line-height: 1.25;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #7b7367;
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e6e0d5;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-cover {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 16px;
    line-height: 1.9;
    color: #2f2a24;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body h1, .article-body h2, .article-body h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: #1f1d1b;
    font-family: var(--blog-heading-font);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.article-body blockquote {
    border-left: 4px solid #c9b79d;
    padding-left: 16px;
    margin: 16px 0;
    color: #6e6558;
    font-style: italic;
}

.article-body pre {
    background: #1f1d1b;
    color: #f8f5ef;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.article-body code {
    background: #f0e9de;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e6e0d5;
}

.article-tags .article-tag {
    padding: 6px 12px;
    background: #f1e9dc;
    color: #6b5f4f;
    border-radius: 20px;
    font-size: 13px;
}

/* 阅读原文链接 - 仿微信公众号风格 */
.article-source-link {
    margin: 24px 0 16px 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-source-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-source-link a:hover {
    color: #666;
    text-decoration: underline;
}

.article-source-link a i {
    font-size: 12px;
}

.article-source-link .source-note {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

/* 评论区样式 - 行业标准简洁风格 */
.article-comments-section {
    padding: 24px 32px 32px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.comments-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input-area {
    margin-bottom: 24px;
}

.comment-toolbar {
    display: flex;
    gap: 12px;
    margin: 12px 16px 0;
    flex-wrap: wrap;
}

.comment-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-tool-btn:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.comment-emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px 0;
}

.comment-emoji-panel .emoji-btn {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.comment-image-preview {
    margin: 12px 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.comment-image-preview img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.comment-image-remove {
    border: none;
    background: #fef2f2;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.comment-image-remove:hover {
    background: #fee2e2;
}

.comment-item .comment-image {
    margin-top: 10px;
}

.comment-item .comment-image img {
    max-width: 260px;
    width: auto;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: block;
}

.comment-input-wrapper {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-input-wrapper textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: none;
    resize: vertical;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    background: #ffffff;
}

.comment-input-wrapper textarea::placeholder {
    color: #9ca3af;
}

.comment-input-wrapper textarea:focus {
    outline: none;
}

.comment-input-wrapper textarea:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.comment-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.char-count {
    font-size: 12px;
    color: #9ca3af;
}

.btn-submit-comment {
    padding: 8px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-submit-comment:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-submit-comment:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.comment-login-tip {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.comment-login-tip a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.comment-login-tip a:hover {
    text-decoration: underline;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: #9ca3af;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    word-break: break-word;
}

.comment-actions {
    margin-top: 8px;
}

.comment-actions button {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-actions button:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.comments-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.comments-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    color: #d1d5db;
}

/* ==================== 轮播图管理样式 ==================== */

.banner-admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.banner-admin-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.banner-admin-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-admin-image {
    width: 100%;
    aspect-ratio: 3/1;
    overflow: hidden;
    background: #f1f5f9;
}

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

.banner-admin-info {
    padding: 16px;
}

.banner-admin-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.banner-admin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.banner-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.banner-status.active {
    background: #dcfce7;
    color: #16a34a;
}

.banner-status.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.banner-admin-actions {
    display: flex;
    gap: 8px;
}

.banner-admin-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.banner-admin-actions button:hover {
    background: #f8fafc;
}

.banner-admin-actions .btn-edit {
    color: #0ea5e9;
}

.banner-admin-actions .btn-delete {
    color: #ef4444;
}

.banner-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.banner-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* 轮播图编辑器模态框 */
.banner-editor-modal {
    max-width: 680px;
}

.banner-editor-modal .modal-body {
    background: #f8fafc;
}

.banner-image-upload {
    width: 100%;
}

.banner-image-preview {
    width: 100%;
    aspect-ratio: 3/1;
    height: clamp(160px, 22vw, 240px);
    min-height: 160px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.banner-image-preview:hover {
    border-color: #0ea5e9;
    background-color: #f0f9ff;
}

.banner-image-preview.has-image {
    border-style: solid;
    border-color: #0ea5e9;
}

.banner-image-preview.has-image i,
.banner-image-preview.has-image p,
.banner-image-preview.has-image .image-hint {
    display: none;
}

.banner-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.banner-image-preview i {
    font-size: 32px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.banner-image-preview p {
    color: #64748b;
    font-size: 14px;
}

.image-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.form-row-inline {
    display: flex;
    gap: 20px;
}

.form-row-inline .form-row {
    flex: 1;
}

.banner-editor-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.banner-editor-modal .btn-cancel,
.banner-editor-modal .btn-save {
    width: auto;
    height: auto;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.banner-editor-modal .btn-cancel {
    background: #e2e8f0;
    color: #1f2937;
}

.banner-editor-modal .btn-cancel:hover {
    background: #cbd5f5;
}

.banner-editor-modal .btn-save {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
}

.banner-editor-modal .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

/* 分享模态框 */
.share-modal {
    max-width: 520px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px 0;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s;
}

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

.share-btn i {
    font-size: 28px;
}

.share-btn span {
    font-size: 12px;
    color: #64748b;
}

.share-wechat i { color: #07c160; }
.share-wechat-moments i { color: #2ecc71; }
.share-weibo i { color: #e6162d; }
.share-qq i { color: #12b7f5; }
.share-qzone i { color: #f59e0b; }
.share-xhs i { color: #ef4444; }
.share-douyin i { color: #111827; }
.share-system i { color: #6366f1; }
.share-copy i { color: #64748b; }

.share-qrcode {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.share-qrcode p {
    color: #64748b;
    margin-bottom: 16px;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
    color: #991b1b;
}

/* 布局配置样式 */
.settings-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

/* 文章精选管理表格 */
#featured-articles-admin-list .featured-toggle {
    cursor: pointer;
}

#featured-articles-admin-list input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #articles-page-container {
        padding: 16px;
        padding-top: calc(18px + var(--global-nav-height) + var(--global-nav-island-top));
    }

    #article-detail-container {
        padding: 16px;
        padding-top: calc(18px + var(--global-nav-height) + var(--global-nav-island-top));
    }

    .articles-banner-section {
        height: 220px;
        border-radius: 18px;
        margin-bottom: 24px;
    }

    .banner-overlay {
        padding: 18px 20px;
    }

    .banner-overlay h3 {
        font-size: 20px;
    }

    .articles-blog-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .articles-sidebar {
        position: static;
    }

    .articles-sidebar-title h1 {
        font-size: 44px;
    }

    .articles-sidebar-thumbnail {
        height: 160px;
    }

    .articles-list-panel {
        border-top: none;
        padding-top: 0;
    }

    .articles-list-header {
        display: none;
    }

    .article-row-link {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 14px;
        align-items: start;
        padding: 16px 0;
    }

    .article-row-date {
        font-size: 12px;
        color: var(--blog-muted);
        grid-column: 1 / 2;
        grid-row: 1;
    }

    .article-row-title {
        font-size: 16px;
    }

    .article-row-summary {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
    }

    .article-row-text {
        grid-column: 1 / 2;
        grid-row: 2;
    }

    .article-row-thumb {
        display: block;
        width: 96px;
        height: 72px;
        border-radius: 8px;
        overflow: hidden;
        background: #e9e4da;
        grid-column: 2 / 3;
        grid-row: 1 / span 2;
    }

    .article-row-thumb img,
    .article-row-thumb .thumb-placeholder {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

    .article-row.featured .article-row-link {
        background: transparent;
        color: inherit;
        padding: 16px 0;
        margin: 0;
    }

    .article-detail-wrapper {
        margin: 0;
        border-radius: 12px;
    }

    .article-detail-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .article-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .article-actions .action-btn span {
        display: none;
    }

    .article-detail-content {
        padding: 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        gap: 12px;
        font-size: 13px;
    }

    .article-comments-section {
        padding: 20px;
    }

    .comment-item {
        padding: 12px;
    }

    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-admin-list {
        grid-template-columns: 1fr;
    }

    .form-row-inline {
        flex-direction: column;
        gap: 0;
    }
}

/* ==================== 发布文章页面样式（大气玻璃态风格） ==================== */

/* 发布文章卡片 - 玻璃态设计 */
.publish-article-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    min-height: auto;
    flex: 1;
}

.publish-article-card .admin-card-header {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
    padding: 20px 28px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.publish-article-card .admin-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.publish-article-card .admin-card-header h3 i {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.publish-article-body {
    padding: 0 !important;
    overflow-y: visible;
    max-height: none;
}

.publish-article-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0;
    min-height: auto;
}

.publish-article-editor {
    padding: 20px 24px;
    border-right: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.3);
}

.publish-article-settings {
    padding: 28px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.9) 100%);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

/* 表单组 - 精致设计 */
.publish-form-group {
    position: relative;
    margin-bottom: 4px;
}

.publish-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.publish-label.required::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
    font-weight: 700;
}

.publish-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    box-sizing: border-box;
}

.publish-input:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.publish-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1), 0 4px 12px rgba(14, 165, 233, 0.08);
    background: white;
}

.publish-input::placeholder {
    color: #94a3b8;
}

.publish-input-sm {
    width: 90px;
    padding: 10px 14px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
}

.publish-input-sm:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.publish-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
    line-height: 1.6;
    box-sizing: border-box;
}

.publish-textarea:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.publish-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    background: white;
}

.publish-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s;
    color: #374151;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.publish-select:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.publish-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.char-counter {
    position: absolute;
    right: 14px;
    bottom: 10px;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== 所见即所得编辑器样式 ==================== */
.wysiwyg-editor {
    min-height: var(--editor-min-height);
    max-height: var(--editor-max-height);
    overflow-y: auto;
    padding: var(--editor-padding);
    border: 1px solid var(--editor-border);
    border-radius: 0 0 var(--editor-radius) var(--editor-radius);
    background: var(--editor-bg);
    font-size: var(--editor-font-size);
    line-height: var(--editor-line-height);
    color: var(--editor-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wysiwyg-editor:focus {
    border-color: var(--editor-accent);
    box-shadow: 0 0 0 3px var(--editor-accent-light);
}

.wysiwyg-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--editor-text-muted);
    pointer-events: none;
}

.wysiwyg-editor img {
    max-width: 100%;
    height: auto;
    border-radius: var(--editor-radius-sm);
    margin: 12px 0;
    display: block;
    box-shadow: var(--editor-shadow-sm);
    cursor: pointer;
}

.wysiwyg-editor img:hover {
    box-shadow: var(--editor-shadow-md);
}

.wysiwyg-editor img.selected {
    outline: 3px solid var(--editor-accent);
    outline-offset: 2px;
}

.wysiwyg-editor h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 24px 0 16px;
    color: var(--editor-heading-dark);
}

.wysiwyg-editor h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--editor-text);
}

.wysiwyg-editor h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 10px;
    color: var(--editor-heading-medium);
}

.wysiwyg-editor p {
    margin: 12px 0;
}

.wysiwyg-editor blockquote {
    border-left: 4px solid var(--editor-accent);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--editor-text-secondary);
    font-style: italic;
    background: var(--editor-accent-light);
    padding: 12px 16px;
    border-radius: 0 var(--editor-radius-sm) var(--editor-radius-sm) 0;
}

.wysiwyg-editor ul, .wysiwyg-editor ol {
    padding-left: 24px;
    margin: 12px 0;
}

.wysiwyg-editor li {
    margin: 6px 0;
}

.wysiwyg-editor a {
    color: var(--editor-accent);
    text-decoration: underline;
}

.wysiwyg-editor code {
    background: var(--editor-code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.wysiwyg-editor pre {
    background: var(--editor-pre-bg);
    color: var(--editor-pre-text);
    padding: 16px;
    border-radius: var(--editor-radius-sm);
    overflow-x: auto;
    margin: 16px 0;
}

.wysiwyg-editor pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.wysiwyg-editor hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 24px 0;
}

/* 工具栏宽选择框 */
.toolbar-select-wide {
    min-width: 110px;
}

/* 一键排版按钮 */
.btn-auto-format {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px !important;
    width: auto !important;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
    color: white !important;
    font-weight: 500;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
    white-space: nowrap;
}

/* 清空内容按钮 */
.btn-clear-content {
    color: #ef4444 !important;
}

.btn-clear-content:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* 填入上次内容按钮 */
.btn-fill-last {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-fill-last:hover {
    background: #f0f0f0;
    color: #666;
}

/* ==================== 孤儿图片管理样式 ==================== */
.orphan-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.orphan-stats .stat-box {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
}

.orphan-stats .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0ea5e9;
}

.orphan-stats .stat-label {
    font-size: 12px;
    color: #64748b;
}

.orphan-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cleanup-options-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cleanup-options-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.select-sm {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

/* 孤儿图片模态框 */
.orphan-modal {
    max-width: 900px;
    max-height: 80vh;
}

.orphan-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.orphan-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.orphan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 4px;
}

.orphan-item {
    position: relative;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.orphan-item:hover {
    border-color: #0ea5e9;
}

.orphan-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.orphan-item .orphan-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.orphan-item .btn-delete-mini {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.orphan-item:hover .btn-delete-mini {
    opacity: 1;
}

.orphan-info {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
}

.btn-action-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-action-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    transform: translateY(-1px);
}

/* ==================== 历史封面图选择 ==================== */
.cover-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-history-cover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-history-cover:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    transform: translateY(-1px);
}

.btn-remove-cover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    color: #ef4444;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-cover:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

/* 历史封面弹窗 */
.history-cover-modal {
    max-width: 800px;
    max-height: 80vh;
}

.history-cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
}

.history-cover-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 16/9;
}

.history-cover-item:hover {
    border-color: #8b5cf6;
    transform: scale(1.02);
}

.history-cover-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-cover-item .history-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-cover-item:hover .history-cover-overlay {
    opacity: 1;
}

.history-cover-item .history-cover-overlay i {
    font-size: 32px;
    color: white;
}

.btn-auto-format:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

/* 拖拽悬停效果 */
.wysiwyg-editor.drag-over {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

/* 图片调整大小手柄 */
.wysiwyg-editor .img-resize-wrapper {
    display: inline-block;
    position: relative;
}

.wysiwyg-editor .img-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #0ea5e9;
    border: 2px solid white;
    border-radius: 50%;
    cursor: se-resize;
    right: -5px;
    bottom: -5px;
}

/* ==================== 增强富文本编辑器工具栏 ==================== */
.rich-editor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    backdrop-filter: blur(10px);
}

.rich-editor-toolbar .toolbar-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.rich-editor-toolbar .toolbar-group {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    align-items: center;
}

.rich-editor-toolbar .toolbar-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.4), transparent);
    margin: 0 6px;
}

.rich-editor-toolbar .toolbar-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rich-editor-toolbar .toolbar-btn:hover {
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
    transform: translateY(-1px);
}

.rich-editor-toolbar .toolbar-btn:active {
    transform: translateY(0);
    background: rgba(14, 165, 233, 0.18);
}

.rich-editor-toolbar .toolbar-btn-format {
    width: auto;
    padding: 0 14px;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    color: white;
    font-weight: 500;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.rich-editor-toolbar .toolbar-btn-format:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.rich-editor-toolbar .toolbar-select {
    padding: 6px 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 6px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
    min-width: 90px;
}

.rich-editor-toolbar .toolbar-select:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.1);
}

.rich-editor-toolbar .toolbar-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.rich-editor-toolbar .toolbar-color {
    width: 34px;
    height: 34px;
    padding: 3px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 6px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.rich-editor-toolbar .toolbar-color:hover {
    border-color: rgba(14, 165, 233, 0.4);
    transform: scale(1.08);
}

.rich-editor-toolbar .toolbar-color::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.rich-editor-toolbar .toolbar-color::-webkit-color-swatch {
    border-radius: 3px;
    border: none;
}

/* 文章图片样式 */
.article-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-figure {
    margin: 1.5rem 0;
    text-align: center;
}

.article-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.article-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
}

/* 预览内容样式 */
.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.preview-empty {
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rich-editor-toolbar {
        padding: 8px 10px;
        gap: 6px;
    }

    .rich-editor-toolbar .toolbar-section {
        gap: 4px;
    }

    .rich-editor-toolbar .toolbar-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .rich-editor-toolbar .toolbar-select {
        min-width: 70px;
        font-size: 11px;
        padding: 4px 6px;
    }

    .rich-editor-toolbar .toolbar-divider {
        display: none;
    }

    .rich-editor-toolbar .toolbar-btn-format {
        padding: 0 10px;
        font-size: 12px;
    }
}

/* 编辑器工具栏 - 现代化设计 */
.publish-editor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    align-items: stretch;
    backdrop-filter: blur(10px);
}

.publish-editor-toolbar .toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.3), transparent);
    margin: 0 10px;
}

.publish-editor-toolbar button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.publish-editor-toolbar button:hover {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    transform: translateY(-1px);
}

.publish-editor-toolbar button:active {
    transform: translateY(0);
    background: rgba(14, 165, 233, 0.15);
}

.publish-editor-toolbar select {
    padding: 6px 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

.publish-editor-toolbar select:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.publish-editor-toolbar input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 4px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.publish-editor-toolbar input[type="color"]:hover {
    border-color: rgba(14, 165, 233, 0.3);
    transform: scale(1.05);
}

/* 内容编辑区 - 沉浸式设计 */
.publish-content-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.publish-content-textarea {
    flex: 1;
    width: 100%;
    min-height: 200px;
    padding: 20px 22px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-top: none;
    border-radius: 0 0 14px 14px;
    font-size: 15px;
    line-height: 1.9;
    resize: none;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    transition: all 0.3s;
    box-sizing: border-box;
}

.publish-content-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
    background: white;
}

.publish-content-textarea::placeholder {
    color: #94a3b8;
}

.publish-content-preview {
    margin-top: 16px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-height: 120px;
    color: #334155;
}

.publish-content-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
}

.publish-preview-empty {
    color: #94a3b8;
    font-size: 13px;
}

/* 右侧设置区 - 卡片式设计 */
.settings-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.3s;
}

.settings-section:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.settings-section:last-of-type {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.02em;
}

.settings-section h4 i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 8px;
    color: #0ea5e9;
    font-size: 13px;
}

.settings-hint {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.5;
}

/* 封面上传 - 精美设计 */
.cover-upload-box {
    width: 100%;
    aspect-ratio: 16/9;
    border: 2px dashed rgba(14, 165, 233, 0.3);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.8) 0%, rgba(224, 242, 254, 0.6) 100%);
}

.cover-upload-box:hover {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.9) 0%, rgba(186, 230, 253, 0.7) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
}

.cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.cover-placeholder i {
    font-size: 36px;
    margin-bottom: 12px;
    color: #0ea5e9;
    opacity: 0.8;
}

.cover-placeholder span {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.cover-placeholder small {
    font-size: 12px;
    margin-top: 6px;
    color: #94a3b8;
}

#publish-cover-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-cover {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: none;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #ef4444;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-remove-cover:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* 设置开关 - 现代化设计 */
.setting-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.setting-toggle span {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.setting-item-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.setting-item-inline span {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* 发布按钮 - 大气设计 */
.publish-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.btn-publish-draft {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-publish-draft:hover {
    background: white;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-publish-submit {
    width: 100%;
    padding: 16px 24px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
    letter-spacing: 0.02em;
}

.btn-publish-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
}

.btn-publish-submit:active {
    transform: translateY(-1px);
}

/* 文章列表区域 - 大气设计 */
.publish-article-list-section {
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.3) 100%);
}

.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.section-header-bar h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.01em;
}

.section-header-bar h4 i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(59, 130, 246, 0.1));
    border-radius: 10px;
    color: #0ea5e9;
}

.list-actions {
    display: flex;
    gap: 10px;
}

.list-actions .admin-filter-sm {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.list-actions .admin-filter-sm:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.list-actions .btn-action-sm {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-actions .btn-action-sm:hover {
    background: white;
    border-color: rgba(14, 165, 233, 0.3);
    color: #0ea5e9;
}

.publish-article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.publish-article-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.publish-article-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

.publish-article-item-cover {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 0.8) 100%);
    overflow: hidden;
    position: relative;
}

.publish-article-item-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.publish-article-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.publish-article-item:hover .publish-article-item-cover img {
    transform: scale(1.05);
}

.publish-article-item-cover .no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #94a3b8;
    opacity: 0.5;
}

.publish-article-item-body {
    padding: 18px 20px;
}

.publish-article-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.publish-article-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 14px;
}

.publish-article-item-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.publish-article-item-status.published {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.publish-article-item-status.draft {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.publish-article-item-actions {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.publish-article-item-actions button {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.publish-article-item-actions button:hover {
    transform: translateY(-1px);
}

.publish-article-item-actions .btn-edit {
    color: #0ea5e9;
}

.publish-article-item-actions .btn-edit:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

.publish-article-item-actions .btn-delete {
    color: #ef4444;
}

.publish-article-item-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* 空状态提示 */
.publish-article-list .empty-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.publish-article-list .empty-hint i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    display: block;
}

.publish-article-list .empty-hint p {
    font-size: 15px;
    margin: 0;
}

/* 响应式 - 平板和移动端适配 */
@media (max-width: 1200px) {
    .publish-article-layout {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 1024px) {
    .publish-article-layout {
        grid-template-columns: 1fr;
    }

    .publish-article-editor {
        border-right: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
        padding: 24px;
    }

    .publish-article-settings {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 24px;
    }

    .settings-section {
        margin-bottom: 0;
    }

    .publish-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        border-top: none;
        padding-top: 0;
    }

    .btn-publish-draft,
    .btn-publish-submit {
        flex: 1;
    }

    .publish-article-list-section {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .publish-article-card {
        border-radius: 16px;
        min-height: auto;
    }

    .publish-article-card .admin-card-header {
        padding: 16px 20px;
    }

    .publish-article-card .admin-card-header h3 {
        font-size: 1.1rem;
    }

    .publish-article-body {
        max-height: none;
    }

    .publish-article-editor {
        padding: 20px;
        gap: 20px;
    }

    .publish-article-settings {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .settings-section {
        padding: 16px;
    }

    .publish-actions {
        flex-direction: column;
    }

    .publish-editor-toolbar {
        padding: 10px 12px;
        border-radius: 12px 12px 0 0;
    }

    .toolbar-group {
        padding: 3px;
    }

    .toolbar-divider {
        display: none;
    }

    .publish-editor-toolbar button {
        width: 34px;
        height: 34px;
    }

    .publish-content-textarea {
        min-height: 250px;
        padding: 16px;
        border-radius: 0 0 12px 12px;
    }

    .publish-article-list-section {
        padding: 20px;
    }

    .section-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .list-actions {
        width: 100%;
    }

    .list-actions .admin-filter-sm {
        flex: 1;
    }

    .publish-article-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .publish-article-item {
        border-radius: 14px;
    }

    .publish-article-item-body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .publish-article-editor {
        padding: 16px;
        gap: 16px;
    }

    .publish-article-settings {
        padding: 16px;
    }

    .settings-section {
        padding: 14px;
        border-radius: 12px;
    }

    .publish-input,
    .publish-textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .publish-editor-toolbar {
        gap: 4px;
        padding: 8px 10px;
    }

    .toolbar-group {
        gap: 2px;
    }

    .publish-editor-toolbar button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .btn-publish-draft,
    .btn-publish-submit {
        padding: 14px 18px;
        font-size: 14px;
    }

    .publish-article-list-section {
        padding: 16px;
    }

    .section-header-bar h4 {
        font-size: 15px;
    }

    .section-header-bar h4 i {
        width: 28px;
        height: 28px;
    }
}

/* ==================== 超链接弹窗样式 ==================== */
.hyperlink-modal-container {
    max-width: 560px;
    width: 95%;
}

.hyperlink-modal-body {
    padding: 20px;
}

.hyperlink-form-row {
    margin-bottom: 20px;
}

.hyperlink-form-row > label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.hyperlink-display-type,
.hyperlink-content-type {
    display: flex;
    gap: 24px;
}

.hyperlink-display-type .radio-option,
.hyperlink-content-type .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hyperlink-display-type .radio-option input,
.hyperlink-content-type .radio-option input {
    width: 18px;
    height: 18px;
    accent-color: #07c160;
}

.hyperlink-display-type .radio-label,
.hyperlink-content-type .radio-label {
    font-size: 14px;
    color: #333;
}

.hyperlink-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.hyperlink-input:focus {
    outline: none;
    border-color: #07c160;
}

.hyperlink-input::placeholder {
    color: #999;
}

.hyperlink-section {
    margin-top: 16px;
}

.hyperlink-search-box {
    position: relative;
}

.hyperlink-search-box input {
    padding-right: 40px;
}

.hyperlink-search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.hyperlink-article-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 12px;
}

.hyperlink-article-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.hyperlink-article-item:last-child {
    border-bottom: none;
}

.hyperlink-article-item:hover {
    background-color: #f8f8f8;
}

.hyperlink-article-item.selected {
    background-color: #e8f8ee;
}

.hyperlink-article-item .radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hyperlink-article-item .radio-option input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #07c160;
}

.hyperlink-article-item .article-info {
    flex: 1;
}

.hyperlink-article-item .article-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 4px;
}

.hyperlink-article-item .article-date {
    font-size: 12px;
    color: #999;
}

.hyperlink-article-list .loading-text,
.hyperlink-article-list .empty-text,
.hyperlink-article-list .error-text {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.modal-footer .btn-cancel {
    padding: 10px 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-cancel:hover {
    background: #f5f5f5;
}

.modal-footer .btn-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    background: #07c160;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-confirm:hover {
    background: #06ad56;
}

/* 超链接卡片样式（编辑器内） */
.hyperlink-card {
    display: block;
    margin: 16px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 400px;
}

.hyperlink-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.hyperlink-card-image {
    width: 100%;
    height: 0;
    padding-bottom: 52.5%;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.hyperlink-card-content {
    padding: 12px 14px;
    background: #fff;
}

.hyperlink-card-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 位置选择弹窗样式 ==================== */
.location-modal-container {
    max-width: 600px;
    width: 95%;
}

.location-modal-body {
    padding: 20px;
}

.location-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.location-search-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.location-search-input:focus {
    outline: none;
    border-color: #4facfe;
}

.location-search-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #4facfe;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.location-search-btn:hover {
    background: #3d9ae8;
}

.location-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}

.location-result-item {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.location-result-item:last-child {
    border-bottom: none;
}

.location-result-item:hover {
    background: #f8f8f8;
}

.location-result-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.location-result-address {
    font-size: 12px;
    color: #999;
}

.location-search-results .no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.location-map-container {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

#amap-container {
    background: #f5f5f5;
}

.location-selected-info {
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.location-info-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.location-info-address {
    font-size: 13px;
    color: #666;
}

/* 位置卡片样式（编辑器内） */
.location-card {
    display: block;
    margin: 16px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.location-card-map {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    background-color: #e8e8e8;
}

.location-card-info {
    padding: 12px 14px;
    background: #fff;
}

.location-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.location-card-name i {
    color: #f5222d;
    margin-right: 6px;
}

.location-card-address {
    font-size: 12px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .hyperlink-modal-container,
    .location-modal-container {
        max-width: 100%;
        margin: 10px;
        max-height: 90vh;
    }

    .hyperlink-article-list {
        max-height: 200px;
    }

    .location-search-results {
        max-height: 150px;
    }

    #amap-container {
        height: 250px !important;
    }
}

/* ==================== 高德地图API配置样式 ==================== */
.amap-key-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.amap-key-input {
    flex: 1;
    min-width: 200px;
    font-family: monospace;
    font-size: 13px;
}

.amap-key-row .btn-sm {
    flex-shrink: 0;
    padding: 8px 12px;
    white-space: nowrap;
}

.setting-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.setting-hint i {
    color: #4facfe;
}

.config-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #e8f8ee;
    border-radius: 6px;
    font-size: 13px;
    color: #07c160;
    margin-top: 12px;
}

.config-status i {
    font-size: 14px;
}
