/*
Theme Name: DSN
Theme URI: https://www.518667.com/
Author: DSN Studio
Author URI: https://www.518667.com
Description: 一个充满设计感的多彩渐变内容型主题，支持丰富的内容展示和互动功能。
Version: 1.2.3
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dsn
Tags: blog, news, colorful, gradient, magazine, modern, flat-design
*/

/* 引入 Tailwind CSS */
@import url('https://cdn.tailwindcss.com');

/* 引入 Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* 引入 Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* 自定义CSS变量 */
:root {
    --dsn-primary: #667eea;
    --dsn-secondary: #764ba2;
    --dsn-accent: #f093fb;
    --dsn-success: #4ade80;
    --dsn-warning: #fbbf24;
    --dsn-error: #ef4444;
    --dsn-dark: #0f172a;
    --dsn-light: #f8fafc;
    --dsn-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dsn-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dsn-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dsn-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --dsn-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dsn-gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --dsn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --dsn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --dsn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --dsn-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --dsn-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置样式 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--dsn-dark);
    background: var(--dsn-light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 只在首页和文章单页添加顶部间距 */
body.has-top-spacing {
    padding-top: 80px; /* 为固定导航条留出空间 */
}

/* 全局样式 */
.dsn-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dsn-hero-container {
    max-width: 3440px;
    margin: 0 auto;
}

/* 渐变背景类 */
.dsn-bg-gradient-1 { background: var(--dsn-gradient-1); }
.dsn-bg-gradient-2 { background: var(--dsn-gradient-2); }
.dsn-bg-gradient-3 { background: var(--dsn-gradient-3); }
.dsn-bg-gradient-4 { background: var(--dsn-gradient-4); }
.dsn-bg-gradient-5 { background: var(--dsn-gradient-5); }
.dsn-bg-hero { background: var(--dsn-gradient-hero); }

/* 文本渐变类 */
.dsn-text-gradient-1 {
    background: var(--dsn-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-text-gradient-2 {
    background: var(--dsn-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 阴影类 */
.dsn-shadow-sm { box-shadow: var(--dsn-shadow-sm); }
.dsn-shadow-md { box-shadow: var(--dsn-shadow-md); }
.dsn-shadow-lg { box-shadow: var(--dsn-shadow-lg); }
.dsn-shadow-xl { box-shadow: var(--dsn-shadow-xl); }

/* 过渡动画 */
.dsn-transition { transition: var(--dsn-transition); }

/* 头部样式 */
.dsn-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dsn-logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--dsn-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-nav-link {
    position: relative;
    font-weight: 500;
    color: var(--dsn-dark);
    transition: var(--dsn-transition);
}

.dsn-nav-link:hover {
    color: var(--dsn-primary);
}

/* 导航链接下划线效果 */
.dsn-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dsn-gradient-1);
    transition: width 0.3s ease;
}

.dsn-nav-link:hover::after,
.dsn-nav-link.active::after {
    width: 100%;
}

/* 下拉菜单样式 */
.dsn-nav-item {
    position: relative;
}

.dsn-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    overflow: hidden;
    margin-top: 8px;
    padding: 8px 0;
    list-style: none;
}

/* 鼠标悬停显示下拉菜单 */
.dsn-nav-item:hover .dsn-dropdown-menu,
.dsn-nav-item:focus-within .dsn-dropdown-menu,
.dsn-dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

/* 确保下拉菜单项可见 */
.dsn-dropdown-menu li {
    display: block !important;
    opacity: 1 !important;
}

.dsn-dropdown-menu a {
    display: block !important;
    opacity: 1 !important;
}

/* 调试样式已移除 - 下拉菜单现在应该正常工作 */

/* 增加悬停区域，防止鼠标移动时菜单消失 */
.dsn-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}

.dsn-dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dsn-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dsn-dropdown-menu li:last-child a {
    border-bottom: none;
}

.dsn-dropdown-menu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--dsn-primary);
    padding-left: 20px;
}

/* 暗黑模式下的下拉菜单 */
.dark .dsn-dropdown-menu {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-dropdown-menu a {
    color: #f3f4f6;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-dropdown-menu a:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #e5e7eb;
}

/* 下拉箭头动画 */
.dsn-nav-item:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* 改善悬停体验 */
.dsn-nav-item {
    transition: all 0.2s ease;
}

.dsn-nav-item:hover {
    position: relative;
}

/* 确保下拉菜单在悬停时保持显示 */
.dsn-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 为下拉菜单添加悬停延迟 */
.dsn-nav-item:hover .dsn-dropdown-menu,
.dsn-dropdown-menu.show {
    transition-delay: 0s;
}

.dsn-nav-item .dsn-dropdown-menu {
    transition-delay: 0.15s;
}

/* 改善下拉菜单的交互体验 */
.dsn-nav-item > a {
    position: relative;
    z-index: 51;
}

/* 下拉菜单项样式增强 */
.dsn-dropdown-menu a {
    position: relative;
    z-index: 52;
}

/* 添加下拉菜单的连接区域 */
.dsn-nav-item:hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    z-index: 49;
}

/* 确保下拉菜单不被其他元素遮挡 */
.dsn-primary-nav {
    position: relative;
    z-index: 40;
}

.dsn-primary-nav .dsn-nav-item {
    position: relative;
}

/* 移动端菜单中的子菜单样式 */
.dsn-mobile-menu .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.dsn-mobile-menu .menu-item-has-children.open > a::after {
    transform: rotate(180deg);
}

.dsn-mobile-menu .sub-menu {
    display: none;
    padding-left: 20px;
    margin-top: 8px;
}

.dsn-mobile-menu .menu-item-has-children.open .sub-menu {
    display: block;
}

/* 搜索框样式 */
.dsn-search-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    transition: var(--dsn-transition);
    width: 300px;
}

.dsn-search-input:focus {
    outline: none;
    border-color: var(--dsn-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

/* 按钮样式 */
.dsn-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--dsn-transition);
    cursor: pointer;
    border: none;
}

.dsn-btn-primary {
    background: var(--dsn-gradient-1);
    color: white;
    box-shadow: var(--dsn-shadow-md);
}

.dsn-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--dsn-shadow-lg);
}

.dsn-btn-secondary {
    background: white;
    color: var(--dsn-primary);
    border: 2px solid var(--dsn-primary);
}

.dsn-btn-secondary:hover {
    background: var(--dsn-primary);
    color: white;
}

.dsn-btn-ghost {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(8px);
}

.dsn-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 英雄区域样式 */
.dsn-hero {
    height: 450px;
    min-height: 450px;
    background: var(--dsn-gradient-hero);
    position: relative;
    overflow: hidden;
}

/* 视频背景英雄区域 */
.dsn-video-hero {
    background: linear-gradient(135deg, 
                #1e3a8a 0%,   /* 深蓝 */
                #3730a3 25%,  /* 靛蓝 */
                #1e40af 50%,  /* 蓝色 */
                #1e293b 75%,  /* 深灰蓝 */
                #0f172a 100%  /* 深色 */
    );
}

/* 视频容器 */
.dsn-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* 英雄区域视频样式 */
.dsn-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.75) contrast(1.15) saturate(1.3) hue-rotate(-5deg);
    transition: filter 0.5s ease, transform 0.3s ease;
    animation: dsn-video-subtle-movement 20s ease-in-out infinite;
}

/* 视频微妙的运动效果 */
@keyframes dsn-video-subtle-movement {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(0.75) contrast(1.15) saturate(1.3) hue-rotate(-5deg);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.02);
        filter: brightness(0.7) contrast(1.2) saturate(1.35) hue-rotate(-3deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.01);
        filter: brightness(0.8) contrast(1.1) saturate(1.25) hue-rotate(-7deg);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.015);
        filter: brightness(0.72) contrast(1.18) saturate(1.32) hue-rotate(-4deg);
    }
}

/* 视频加载优化 */
.dsn-hero-video::-webkit-media-controls {
    display: none !important;
}

.dsn-hero-video::-webkit-media-controls-panel {
    display: none !important;
}

/* 视频备用背景 */
.dsn-video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                #1e3a8a 0%,
                #3730a3 25%,
                #1e40af 50%,
                #1e293b 75%,
                #0f172a 100%),
                url('https://images.unsplash.com/photo-1439066615861-d1af74d74000?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    background-blend-mode: overlay;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* CSS动画海浪备用效果 */
.dsn-video-fallback::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,80 350,20 500,50 C650,80 850,20 1000,50 L1000,100 L0,100 Z' fill='%23ffffff15'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,90 400,30 500,60 C600,30 800,90 1000,60 L1000,100 L0,100 Z' fill='%23ffffff10'/%3E%3C/svg%3E");
    background-size: 1000px 100%, 800px 80%;
    background-position: 0 bottom, 200px bottom;
    background-repeat: repeat-x;
    animation: dsn-css-waves 15s linear infinite, dsn-css-waves-2 20s linear infinite reverse;
    opacity: 0.6;
}

@keyframes dsn-css-waves {
    0% { transform: translateX(0); }
    100% { transform: translateX(-1000px); }
}

@keyframes dsn-css-waves-2 {
    0% { background-position: 0 bottom, 200px bottom; }
    100% { background-position: -800px bottom, -600px bottom; }
}

/* 视频性能优化动画 */
@keyframes dsn-video-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.05);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.dsn-hero-video[data-loaded="true"] {
    animation: dsn-video-fade-in 2s ease-out forwards;
}

/* 动态光影效果 */
.dsn-light-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.dsn-light-beam {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    filter: blur(20px);
}

.dsn-light-1 {
    top: 20%;
    left: 10%;
    animation: dsn-light-float 15s ease-in-out infinite;
}

.dsn-light-2 {
    top: 60%;
    right: 15%;
    width: 150px;
    height: 150px;
    animation: dsn-light-float 18s ease-in-out infinite reverse;
    animation-delay: -5s;
}

.dsn-light-3 {
    bottom: 30%;
    left: 70%;
    width: 100px;
    height: 100px;
    animation: dsn-light-float 22s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes dsn-light-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 30px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(15px, -10px) scale(1.05);
        opacity: 0.6;
    }
}

/* 现代化分页组件 */
.dsn-pagination-wrapper {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.dsn-pagination {
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dsn-pagination:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dsn-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(75, 85, 99, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dsn-pagination-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    color: rgb(99, 102, 241);
    transform: scale(1.1);
}

.dsn-pagination-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.dsn-pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dsn-pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
}

.dsn-pagination-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: inherit;
}

.dsn-pagination-dots {
    color: rgba(75, 85, 99, 0.6);
    font-weight: 600;
    padding: 0 0.5rem;
}

.dsn-pagination-info {
    font-weight: 500;
    white-space: nowrap;
}

.dsn-pagination-prev,
.dsn-pagination-next {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dsn-pagination-prev:hover:not(:disabled),
.dsn-pagination-next:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

/* 暗黑模式分页样式 */
.dark .dsn-pagination-btn {
    color: rgba(209, 213, 219, 0.8);
}

.dark .dsn-pagination-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    color: rgb(196, 181, 253);
}

.dark .dsn-pagination-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.4);
}

.dark .dsn-pagination-dots {
    color: rgba(209, 213, 219, 0.6);
}

.dark .dsn-pagination-prev,
.dark .dsn-pagination-next {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-pagination-prev:hover:not(:disabled),
.dark .dsn-pagination-next:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}

/* 分页加载动画 */
.dsn-pagination-loading {
    pointer-events: none;
}

.dsn-pagination-loading .dsn-pagination-btn {
    opacity: 0.6;
}

.dsn-pagination-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-top-color: rgb(99, 102, 241);
    border-radius: 50%;
    animation: dsn-pagination-spin 1s linear infinite;
}

@keyframes dsn-pagination-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 粒子效果 */
.dsn-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.dsn-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.dsn-particle-1 {
    top: 25%;
    left: 20%;
    animation: dsn-particle-float 12s linear infinite;
}

.dsn-particle-2 {
    top: 70%;
    left: 60%;
    animation: dsn-particle-float 15s linear infinite reverse;
    animation-delay: -3s;
}

.dsn-particle-3 {
    top: 40%;
    right: 25%;
    animation: dsn-particle-float 18s linear infinite;
    animation-delay: -6s;
}

.dsn-particle-4 {
    bottom: 20%;
    left: 80%;
    animation: dsn-particle-float 14s linear infinite reverse;
    animation-delay: -9s;
}

.dsn-particle-5 {
    top: 15%;
    right: 40%;
    animation: dsn-particle-float 16s linear infinite;
    animation-delay: -12s;
}

@keyframes dsn-particle-float {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(50px, -100px) scale(0.5);
        opacity: 0;
    }
}

.dsn-hero-content {
    position: relative;
    z-index: 10;
}

.dsn-hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.2;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.dsn-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 700px;
    font-weight: 300;
}

/* Hero 搜索框样式 */
.dsn-hero-search {
    position: relative;
    z-index: 15;
}

.dsn-hero-search-input {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dsn-hero-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.dsn-hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.dsn-hero-search-input::-webkit-search-decoration,
.dsn-hero-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Hero 搜索框图标 */
.dsn-hero-search .fas.fa-search {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.dsn-hero-search:hover .fas.fa-search,
.dsn-hero-search:focus-within .fas.fa-search {
    color: rgba(255, 255, 255, 0.9);
}

/* 内容区域样式 */
.dsn-section {
    padding: 5rem 0;
    position: relative;
}

.dsn-section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.dsn-section-title::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -25px;
    font-size: 1.2rem;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(8deg); }
}

/* 文章卡片样式 */
.dsn-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--dsn-shadow-lg);
    transition: var(--dsn-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dsn-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.dsn-card:hover::before {
    opacity: 1;
}

.dsn-card > * {
    position: relative;
    z-index: 1;
}

.dsn-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--dsn-shadow-xl);
}

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

.dsn-card:hover .dsn-card-category {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.dsn-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.2/1;
    border-radius: 8px 8px 0 0;
    height: 220px;
    width: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsn-card-image::before {
    content: '🖼️';
    font-size: 2rem;
    opacity: 0.3;
    z-index: 0;
}

.dsn-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
    min-width: 100%;
    min-height: 100%;
    z-index: 1;
}

.dsn-card:hover .dsn-card-image img {
    transform: scale(1.05);
}

.dsn-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--dsn-gradient-2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* 去掉大头针图标，五角星改为黄色 */
.dsn-card-badge i.fa-star {
    color: #fbbf24; /* 黄色 */
}

.dsn-card-content {
    padding: 0.75rem 1rem;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dsn-card-category {
    display: inline-flex;
    align-items: center;
    background: var(--dsn-gradient-3);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.dsn-card-category::before {
    content: '🏷️';
    margin-right: 0.25rem;
}

.dsn-card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    color: var(--dsn-dark);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.2em;
    max-height: 1.2em;
}

.dsn-card-title:hover {
    background: var(--dsn-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-card-excerpt {
    color: rgba(15, 23, 42, 0.7);
    line-height: 1.3;
    margin-bottom: 3px;
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.3em;
    max-height: 1.3em;
}

.dsn-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.dsn-card-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dsn-card-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsn-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid var(--dsn-primary);
}

/* 通用头像样式 - 确保所有头像都是圆形 */
.avatar,
img.avatar,
.wp-user-avatar,
.dsn-author-avatar img,
#user-header-avatar img,
#avatar-preview img {
    border-radius: 50% !important;
    object-fit: cover !important;
}

.dsn-card-author-info h4 {
    font-weight: 600;
    margin: 0;
    color: var(--dsn-dark);
    font-size: 0.8rem;
}

.dsn-card-author-info span {
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.6);
}

.dsn-card-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.6);
}

.dsn-card-stat {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.dsn-card-stat i {
    width: 12px;
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 互动图标彩色样式 */
.dsn-card-stat .fa-eye {
    color: #3b82f6; /* 蓝色 - 阅读 */
}

.dsn-card-stat .fa-heart {
    color: #ef4444; /* 红色 - 点赞 */
}

.dsn-card-stat .fa-bookmark {
    color: #f59e0b; /* 橙色 - 收藏 */
}

.dsn-card-stat .fa-comment {
    color: #10b981; /* 绿色 - 评论 */
}

.dsn-card:hover .dsn-card-stat i {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 悬停时的特殊效果 */
.dsn-card:hover .dsn-card-stat .fa-eye {
    color: #2563eb;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.dsn-card:hover .dsn-card-stat .fa-heart {
    color: #dc2626;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: heartbeat 0.6s ease-in-out;
}

.dsn-card:hover .dsn-card-stat .fa-bookmark {
    color: #d97706;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.dsn-card:hover .dsn-card-stat .fa-comment {
    color: #059669;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* 心跳动画效果 */
@keyframes heartbeat {
    0%, 100% { transform: scale(1.15); }
    50% { transform: scale(1.3); }
}

/* 搜索页面的互动图标彩色样式 */
.dsn-search-results .fa-eye {
    color: #3b82f6;
}

.dsn-search-results .fa-heart {
    color: #ef4444;
}

.dsn-search-results .fa-bookmark {
    color: #f59e0b;
}

.dsn-search-results .fa-comment {
    color: #10b981;
}

/* 暗黑模式下的搜索页面图标 */
.dark .dsn-search-results .fa-eye {
    color: #60a5fa;
}

.dark .dsn-search-results .fa-heart {
    color: #f87171;
}

.dark .dsn-search-results .fa-bookmark {
    color: #fbbf24;
}

.dark .dsn-search-results .fa-comment {
    color: #34d399;
}

/* 互动图标的渐变背景效果 */
.dsn-card-stat:hover {
    transform: translateY(-1px);
}

.dsn-card-stat:hover .fa-eye {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-card-stat:hover .fa-heart {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-card-stat:hover .fa-bookmark {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-card-stat:hover .fa-comment {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 脉冲动画效果 */
@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

@keyframes pulse-orange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* 点击时的脉冲效果 */
.dsn-card-stat:active .fa-eye {
    animation: pulse-blue 0.6s ease-out;
}

.dsn-card-stat:active .fa-heart {
    animation: pulse-red 0.6s ease-out;
}

.dsn-card-stat:active .fa-bookmark {
    animation: pulse-orange 0.6s ease-out;
}

.dsn-card-stat:active .fa-comment {
    animation: pulse-green 0.6s ease-out;
}

/* 网格布局 */
.dsn-grid {
    display: grid;
    gap: 1.25rem;
}

/* 横板卡片布局 */
.dsn-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* 横板卡片样式 */
.dsn-card-horizontal {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--dsn-shadow-lg);
    transition: var(--dsn-transition);
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 140px;
}

.dsn-card-horizontal:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--dsn-shadow-xl);
}

.dsn-card-horizontal::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.dsn-card-horizontal:hover::before {
    opacity: 1;
}

.dsn-card-horizontal > * {
    position: relative;
    z-index: 1;
}

/* 横板卡片图片区域 */
.dsn-card-horizontal-image {
    position: relative;
    overflow: hidden;
    width: 180px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsn-card-horizontal-image::before {
    content: '🖼️';
    font-size: 1.5rem;
    opacity: 0.3;
    z-index: 0;
}

.dsn-card-horizontal-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
    z-index: 1;
}

.dsn-card-horizontal:hover .dsn-card-horizontal-image img {
    transform: scale(1.05);
}

/* 横板卡片内容区域 */
.dsn-card-horizontal-content {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* 横板卡片标题 */
.dsn-card-horizontal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--dsn-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 横板卡片摘要 */
.dsn-card-horizontal-excerpt {
    color: rgba(15, 23, 42, 0.7);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 横板卡片元信息 */
.dsn-card-horizontal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
}

/* 横板卡片分类标签 */
.dsn-card-horizontal-category {
    display: inline-flex;
    align-items: center;
    background: var(--dsn-gradient-4);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    width: fit-content;
    max-width: fit-content;
}

.dsn-card-horizontal-category::before {
    content: '🔥';
    margin-right: 0.15rem;
    font-size: 0.6rem;
}

/* 横板卡片统计信息 */
.dsn-card-horizontal-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: rgba(15, 23, 42, 0.6);
}

.dsn-card-horizontal-stat {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.dsn-card-horizontal-stat i {
    width: 10px;
    font-size: 0.7rem;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.dsn-card-horizontal:hover .dsn-card-horizontal-stat i {
    opacity: 1;
    transform: scale(1.1);
}

/* 横板卡片徽章 */
.dsn-card-horizontal-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--dsn-gradient-2);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.dsn-card-horizontal-badge::before {
    content: '🔥';
    margin-right: 0.2rem;
}

.dsn-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.dsn-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 专门为9篇文章优化的网格布局 */
.dsn-grid-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .dsn-grid-9 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.dsn-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* 瀑布流布局 */
.dsn-masonry {
    columns: 3;
    column-gap: 2rem;
}

.dsn-masonry .dsn-card {
    break-inside: avoid;
    margin-bottom: 1.25rem;
}

/* 特色卡片样式 */
.dsn-card-featured {
    grid-column: span 2;
}

.dsn-card-featured .dsn-card-content {
    padding: 3rem;
}

.dsn-card-featured .dsn-card-title {
    font-size: 2rem;
}

/* 页脚样式 */
.dsn-footer {
    background: var(--dsn-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.dsn-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.dsn-footer-section h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--dsn-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsn-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dsn-footer-links li {
    margin-bottom: 0.75rem;
}

.dsn-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--dsn-transition);
}

.dsn-footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.dsn-qr-code {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.dsn-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* 移动端汉堡菜单 */
.dsn-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dsn-dark);
}

.dsn-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--dsn-shadow-lg);
    border-radius: 0 0 6px 6px;
    padding: 2rem;
    z-index: 40;
}

.dsn-mobile-menu.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dsn-container {
        padding: 0 2rem;
    }
    
    .dsn-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .dsn-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dsn-grid-horizontal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dsn-card-horizontal-image {
        width: 120px;
    }
    
    .dsn-card-featured {
        grid-column: span 1;
    }
    
    .dsn-masonry {
        columns: 2;
    }
}

@media (max-width: 768px) {
    body.has-top-spacing {
        padding-top: 70px; /* 移动端导航条稍小一些 */
    }
    
    .dsn-header nav {
        display: none;
    }
    
    .dsn-mobile-menu-toggle {
        display: block;
    }
    
    .dsn-search-input {
        width: 200px;
    }
    
    .dsn-hero {
        height: 450px;
        min-height: 450px;
        padding: 2rem 0;
    }
    
    /* 移动端视频优化 */
    .dsn-hero-video {
        /* 移动端使用更低的分辨率以节省带宽 */
        transform: translate(-50%, -50%) scale(1.1);
        filter: brightness(0.6) contrast(1.0) saturate(1.0);
    }
    
    .dsn-section {
        padding: 3rem 0;
    }
    
    .dsn-grid-2,
    .dsn-grid-3,
    .dsn-grid-4,
    .dsn-grid-9,
    .dsn-grid-horizontal {
        grid-template-columns: 1fr;
    }
    
    .dsn-card-horizontal {
        min-height: 120px;
    }
    
    .dsn-card-horizontal-image {
        width: 100px;
    }
    
    .dsn-card-horizontal-content {
        padding: 0.75rem 1rem;
    }
    
    .dsn-card-horizontal-category {
        padding: 0.1rem 0.3rem;
        font-size: 0.6rem;
        border-radius: 6px;
    }
    
    .dsn-card-horizontal-category::before {
        margin-right: 0.1rem;
        font-size: 0.55rem;
    }
    
    .dsn-masonry {
        columns: 1;
    }
    
    .dsn-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dsn-footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .dsn-container {
        padding: 0 1rem;
    }
    
    .dsn-card-content {
        padding: 0.6rem 0.85rem;
    }
    
    .dsn-card-image {
        height: 180px;
        aspect-ratio: 1.3/1;
    }
    
    .dsn-card-title {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
        min-height: 1.02em;
        max-height: 1.02em;
        line-height: 1.2;
    }
    
    .dsn-card-excerpt {
        font-size: 0.7rem;
        margin-bottom: 3px;
        min-height: 0.91em;
        max-height: 0.91em;
        line-height: 1.3;
    }
    
    .dsn-card-stats {
        font-size: 0.7rem;
        gap: 0.4rem;
    }
    
    .dsn-section-title::after {
        right: -20px;
        font-size: 1rem;
    }
    
    .dsn-search-input {
        width: 150px;
    }
    
    .dsn-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .dsn-hero,
    .dsn-page-header,
    .dsn-post-hero {
        height: 450px;
        min-height: 450px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dsn-animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.dsn-animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.dsn-animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

/* 加载动画 */
.dsn-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .dsn-card {
        border: 2px solid var(--dsn-dark);
    }
    
    .dsn-btn {
        border: 2px solid currentColor;
    }
}

/* 暗黑模式切换按钮样式 */
.dsn-dark-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsn-dark-toggle:hover {
    transform: scale(1.05);
}

.dsn-dark-toggle i {
    font-size: 18px;
    transition: all 0.3s ease;
}

/* 暗色模式样式 - 优化背景层次 */
.dark {
    --dsn-dark: #f8fafc;
    --dsn-light: #0a0f1c;
    --dsn-bg-primary: #0a0f1c;      /* 主背景 - 更深的蓝黑色 */
    --dsn-bg-secondary: #111827;    /* 次要背景 - 深灰蓝 */
    --dsn-bg-tertiary: #1f2937;     /* 第三层背景 - 中灰蓝 */
    --dsn-bg-card: #2d3748;         /* 卡片背景 - 浅灰蓝 */
    --dsn-bg-card-hover: #374151;   /* 卡片悬停背景 */
}

.dark body {
    background: var(--dsn-bg-primary);
    color: #f8fafc;
}

.dark {
    background: var(--dsn-bg-primary);
}

.dark .dsn-section {
    background: var(--dsn-bg-primary);
}

.dark .dsn-posts-section {
    background: var(--dsn-bg-secondary);
}

.dark .dsn-related-posts {
    background: var(--dsn-bg-secondary);
}

.dark .dsn-comments {
    background: var(--dsn-bg-primary);
}

.dark .dsn-header {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-logo {
    color: #f8fafc;
}

/* 网站Logo图片样式 */
.dsn-logo img {
    transition: all 0.3s ease;
    max-height: 40px;
    border-radius: 0.375rem;
}

.dsn-logo:hover img {
    transform: scale(1.05);
}

.dsn-logo span {
    transition: all 0.3s ease;
}

.dsn-logo:hover span {
    transform: translateX(2px);
}

/* 响应式Logo调整 */
@media (max-width: 768px) {
    .dsn-logo img {
        max-height: 32px;
    }

    .dsn-logo span {
        font-size: 1.25rem;
    }
}

/* 移动端分页优化 - 确保分页在移动端也显示且好用 */
@media (max-width: 768px) {
    .dsn-pagination-wrapper {
        margin-top: 2rem;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }
    
    .dsn-pagination {
        padding: 0.5rem 1rem;
        gap: 0.375rem;
        font-size: 0.875rem;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .dsn-pagination::-webkit-scrollbar {
        display: none;
    }
    
    .dsn-pagination-numbers {
        gap: 0.25rem !important;
        flex-shrink: 0;
    }
    
    .dsn-pagination-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.75rem;
        flex-shrink: 0;
        min-width: 36px;
    }
    
    .dsn-pagination-info {
        font-size: 0.75rem !important;
        margin-left: 0.5rem !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .dsn-pagination-dots {
        font-size: 0.75rem;
        padding: 0 0.25rem;
        flex-shrink: 0;
    }
}

/* 精彩分类卡片样式 */
.dsn-category-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dsn-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.dsn-category-card:hover::before {
    left: 100%;
}

.dsn-category-stats {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .dsn-category-stats {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dsn-category-icon {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dsn-category-icon:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 分类卡片动画效果 */
@keyframes categoryFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.dsn-category-card:hover {
    animation: categoryFloat 3s ease-in-out infinite;
}

/* 统计数字脉冲动画 */
@keyframes statPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.dsn-category-card:hover .dsn-stat-number {
    animation: statPulse 2s ease-in-out infinite;
}

/* 默认分类样式 */
.dsn-category-card .cursor-default {
    position: relative;
}

.dsn-category-card .cursor-default::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 1.5rem;
    pointer-events: none;
}

.dsn-category-card .cursor-default:hover {
    transform: translateY(-8px) !important;
}

/* 默认分类渐变边框效果 */
.dsn-category-card .cursor-default {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(139, 92, 246, 0.3)) border-box;
}

.dark .dsn-category-card .cursor-default {
    background: linear-gradient(rgb(30, 41, 59), rgb(30, 41, 59)) padding-box,
                linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(139, 92, 246, 0.3)) border-box;
}

/* 用户中心文章页面平滑过渡动画 */
.articles-content-fade {
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    will-change: transform, opacity;
}

.articles-content-fade.fade-out {
    opacity: 0.4;
    transform: translate3d(0, 3px, 0);
}

.articles-content-fade.fade-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* 筛选按钮平滑过渡 */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.switching {
    transform: scale(0.95);
}

/* 加载状态容器 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    pointer-events: none;
}

.dark .loading-overlay {
    background: rgba(30, 41, 59, 0.95);
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 文章列表容器 */
.articles-container {
    position: relative;
    min-height: 200px;
}

/* 平滑的按钮状态切换 */
.filter-btn-transition {
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.filter-btn-transition:active {
    transform: scale(0.98);
}

/* 内容淡入动画 */
@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.content-animate-in {
    animation: contentFadeIn 0.25s ease-out;
    will-change: transform, opacity;
}

/* 加载指示器优化 */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.75rem;
    color: rgb(59, 130, 246);
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.dark .loading-indicator {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: rgb(147, 197, 253);
}

.loading-spinner {
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

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

/* 移动端分类卡片优化 */
@media (max-width: 768px) {
    .dsn-category-card {
        margin-bottom: 1.5rem;
    }
    
    .dsn-category-icon {
        width: 60px;
        height: 60px;
    }
    
    .dsn-category-title {
        font-size: 1.5rem;
    }
    
    .dsn-category-stats {
        gap: 0.75rem;
    }
    
    .dsn-stat-item {
        padding: 0.5rem;
    }
}

.dark .dsn-nav-link {
    color: rgba(248, 250, 252, 0.9);
}

.dark .dsn-nav-link:hover {
    color: #f8fafc;
}

.dark .dsn-search-input {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

.dark .dsn-search-input::placeholder {
    color: rgba(248, 250, 252, 0.6);
}

.dark .dsn-btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    color: #f8fafc;
}

.dark .dsn-btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
}

.dark .dsn-card {
    background: var(--dsn-bg-card);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark .dsn-card:hover {
    background: var(--dsn-bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 
                0 8px 24px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-8px) scale(1.02);
}

.dark .dsn-card-title a {
    color: #f8fafc;
}

.dark .dsn-card-excerpt {
    color: rgba(248, 250, 252, 0.8);
}

.dark .dsn-card-author strong {
    color: #f8fafc;
}

.dark .dsn-card-author span {
    color: rgba(248, 250, 252, 0.7);
}

.dark .dsn-card-stats {
    color: rgba(248, 250, 252, 0.7);
}

.dark .dsn-card-meta {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-card-image {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* 暗黑模式下的横板卡片 */
.dark .dsn-card-horizontal {
    background: var(--dsn-bg-card);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark .dsn-card-horizontal:hover {
    background: var(--dsn-bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 
                0 8px 24px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-4px) scale(1.01);
}

.dark .dsn-card-horizontal-image {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.dark .dsn-card-horizontal-title {
    color: #f8fafc;
}

.dark .dsn-card-horizontal-title:hover {
    color: #60a5fa;
}

.dark .dsn-card-horizontal-excerpt {
    color: rgba(248, 250, 252, 0.8);
}

.dark .dsn-card-horizontal-stats {
    color: rgba(248, 250, 252, 0.7);
}

/* 暗黑模式下的横板卡片彩色图标 */
.dark .dsn-card-horizontal-stat .fa-eye {
    color: #60a5fa;
}

.dark .dsn-card-horizontal-stat .fa-heart {
    color: #f87171;
}

.dark .dsn-card-horizontal-stat .fa-bookmark {
    color: #fbbf24;
}

.dark .dsn-card-horizontal-stat .fa-comment {
    color: #34d399;
}

/* 暗黑模式下的互动图标彩色样式 */
.dark .dsn-card-stat .fa-eye {
    color: #60a5fa; /* 亮蓝色 - 阅读 */
}

.dark .dsn-card-stat .fa-heart {
    color: #f87171; /* 亮红色 - 点赞 */
}

.dark .dsn-card-stat .fa-bookmark {
    color: #fbbf24; /* 亮橙色 - 收藏 */
}

.dark .dsn-card-stat .fa-comment {
    color: #34d399; /* 亮绿色 - 评论 */
}

/* 暗黑模式悬停效果 */
.dark .dsn-card:hover .dsn-card-stat .fa-eye {
    color: #93c5fd;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

.dark .dsn-card:hover .dsn-card-stat .fa-heart {
    color: #fca5a5;
    text-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
    animation: heartbeat 0.6s ease-in-out;
}

.dark .dsn-card:hover .dsn-card-stat .fa-bookmark {
    color: #fcd34d;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.dark .dsn-card:hover .dsn-card-stat .fa-comment {
    color: #6ee7b7;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

/* 暗黑模式下的高级视觉效果 */
.dark .dsn-card-category {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.dark .dsn-card-badge {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(239, 68, 68, 0.9));
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
}

/* 暗黑模式下的分类卡片 */
.dark .dsn-section-title {
    color: #f8fafc;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 暗黑模式下的渐变按钮优化 */
.dark .dsn-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.dark .dsn-btn-primary:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px) scale(1.02);
}

/* 暗黑模式下的页面装饰 */
.dark .dsn-section {
    position: relative;
}

.dark .dsn-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.1) 20%, 
                rgba(255, 255, 255, 0.2) 50%, 
                rgba(255, 255, 255, 0.1) 80%, 
                transparent 100%);
}

/* 暗黑模式下的背景纹理 */
.dark .dsn-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.02) 0%, transparent 25%),
        radial-gradient(circle at 50% 10%, rgba(236, 72, 153, 0.01) 0%, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.dark .dsn-section > * {
    position: relative;
    z-index: 1;
}

/* 暗黑模式下的卡片光效 */
.dark .dsn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.1) 50%, 
                transparent 100%);
    border-radius: 8px 8px 0 0;
}

.dark .dsn-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0), 
                rgba(255, 255, 255, 0.02) 0%, 
                transparent 40%);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dark .dsn-card:hover::after {
    opacity: 1;
}

.dark .dsn-section-title {
    color: #f8fafc;
}

/* 暗黑模式下的全局优化 */
.dark .dsn-container {
    position: relative;
}

/* 暗黑模式下的搜索框优化 */
.dark .dsn-search-input {
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    backdrop-filter: blur(10px);
}

.dark .dsn-search-input:focus {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

/* 暗黑模式下的按钮组优化 */
.dark .dsn-btn-secondary {
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dark .dsn-btn-secondary:hover {
    background: rgba(55, 65, 81, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 暗黑模式下的分页优化 */
.dark .dsn-pagination a {
    background: var(--dsn-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dark .dsn-pagination a:hover,
.dark .dsn-pagination .current {
    background: var(--dsn-bg-card-hover);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

/* 暗黑模式下的表单元素优化 */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="url"],
.dark textarea {
    background: var(--dsn-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="url"]:focus,
.dark textarea:focus {
    background: var(--dsn-bg-card-hover);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.dark .dsn-footer {
    background: #020617;
}

.dark .dsn-mobile-menu {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dsn-mobile-menu a {
    color: rgba(248, 250, 252, 0.9);
}

.dark .dsn-mobile-menu a:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #f8fafc;
}

/* 暗黑模式下的页面区域背景 - 深度优化 */
.dark .dsn-hero {
    height: 450px;
    min-height: 450px;
    background: linear-gradient(135deg, 
                #0a0f1c 0%, 
                #1a1f2e 25%, 
                #2d1b3d 50%, 
                #1e2a3a 75%, 
                #0f1419 100%);
    position: relative;
}

/* 暗黑模式下的视频背景 */
.dark .dsn-video-hero {
    background: linear-gradient(135deg, 
                #0f172a 0%,   /* 极深蓝 */
                #1e1b4b 25%,  /* 深紫蓝 */
                #312e81 50%,  /* 靛蓝 */
                #1e293b 75%,  /* 深灰蓝 */
                #0a0f1c 100%  /* 极深色 */
    );
}

/* 暗黑模式下的视频滤镜调整 */
.dark .dsn-hero-video {
    filter: brightness(0.5) contrast(1.2) saturate(0.9) hue-rotate(10deg);
}

/* 暗黑模式下的动态效果增强 */
.dark .dsn-light-beam {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

.dark .dsn-particle {
    background: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

/* 暗黑模式下的视频微妙运动 */
@keyframes dsn-video-subtle-movement-dark {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(0.5) contrast(1.2) saturate(0.9) hue-rotate(10deg);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.015);
        filter: brightness(0.45) contrast(1.25) saturate(0.95) hue-rotate(12deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.01);
        filter: brightness(0.55) contrast(1.15) saturate(0.85) hue-rotate(8deg);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.02);
        filter: brightness(0.48) contrast(1.22) saturate(0.92) hue-rotate(11deg);
    }
}

.dark .dsn-hero-video {
    animation: dsn-video-subtle-movement-dark 25s ease-in-out infinite;
}

/* 暗黑模式下的视频备用背景 */
.dark .dsn-video-fallback {
    background: linear-gradient(135deg, 
                #0f172a 0%,
                #1e1b4b 25%,
                #312e81 50%,
                #1e293b 75%,
                #0a0f1c 100%),
                url('https://images.unsplash.com/photo-1547036967-23d11aacaee0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    background-blend-mode: multiply;
}

/* 暗黑模式下的Hero搜索框 */
.dark .dsn-hero-search-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark .dsn-hero-search-input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 3px rgba(139, 92, 246, 0.2);
}

.dark .dsn-page-header {
    background: linear-gradient(135deg, var(--dsn-bg-secondary) 0%, var(--dsn-bg-tertiary) 100%);
}

.dark .dsn-post-hero {
    background: linear-gradient(135deg, var(--dsn-bg-primary) 0%, var(--dsn-bg-secondary) 100%);
}

.dark .dsn-no-content {
    background: var(--dsn-bg-secondary);
}

.dark .dsn-single-post {
    background: var(--dsn-bg-primary);
}

.dark .dsn-post-content {
    background: var(--dsn-bg-secondary);
}

/* 暗黑模式下的文本颜色 */
.dark .dsn-empty {
    color: rgba(248, 250, 252, 0.8);
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f8fafc;
}

.dark p {
    color: rgba(248, 250, 252, 0.9);
}

/* 暗黑模式下的边框和分隔线 */
.dark .border-gray-200 {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .border-t {
    border-color: rgba(255, 255, 255, 0.1);
}

/* 暗黑模式下的输入框和表单 */
.dark input, .dark textarea, .dark select {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

.dark input:focus, .dark textarea:focus, .dark select:focus {
    border-color: #667eea;
    background: #334155;
}

/* 暗黑模式下的代码块 */
.dark code {
    background: #1e293b;
    color: #f8fafc;
}

.dark pre {
    background: #111827;
    color: #f8fafc;
}

/* 暗色模式过渡动画 */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dsn-header,
.dsn-card,
.dsn-mobile-menu {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 暗色模式自动检测支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --dsn-dark: #f8fafc;
        --dsn-light: #0f172a;
    }
}

/* 页面头部英雄区域样式 */
.dsn-page-header {
    height: 450px;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 文章英雄区域样式 */
.dsn-post-hero {
    height: 450px;
    min-height: 450px;
    display: flex;
    align-items: center;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--dsn-gradient-1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dsn-gradient-2);
}

/* ===============================
   文章单页样式
   =============================== */

/* 文章内容样式 */
.dsn-article-content.prose {
    color: rgb(31 41 55);
}

.dark .dsn-article-content.prose {
    color: rgb(229 231 235);
}

.dsn-article-content.prose h1,
.dsn-article-content.prose h2,
.dsn-article-content.prose h3,
.dsn-article-content.prose h4,
.dsn-article-content.prose h5,
.dsn-article-content.prose h6 {
    color: rgb(17 24 39);
    font-weight: 700;
}

.dark .dsn-article-content.prose h1,
.dark .dsn-article-content.prose h2,
.dark .dsn-article-content.prose h3,
.dark .dsn-article-content.prose h4,
.dark .dsn-article-content.prose h5,
.dark .dsn-article-content.prose h6 {
    color: rgb(255 255 255);
}

.dsn-article-content.prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.dsn-article-content.prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.dsn-article-content.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.dsn-article-content.prose a {
    color: rgb(37 99 235);
    text-decoration: underline;
}

.dark .dsn-article-content.prose a {
    color: rgb(96 165 250);
}

.dsn-article-content.prose a:hover {
    color: rgb(29 78 216);
}

.dark .dsn-article-content.prose a:hover {
    color: rgb(147 197 253);
}

.dsn-article-content.prose img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dsn-article-content.prose blockquote {
    border-left: 4px solid rgb(59 130 246);
    padding-left: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgb(239 246 255);
    color: rgb(55 65 81);
    font-style: italic;
}

.dark .dsn-article-content.prose blockquote {
    background-color: rgba(59, 130, 246, 0.2);
    color: rgb(209 213 219);
}

.dsn-article-content.prose code {
    background-color: rgb(243 244 246);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

.dark .dsn-article-content.prose code {
    background-color: rgb(31 41 55);
}

.dsn-article-content.prose pre {
    background-color: rgb(17 24 39);
    color: rgb(255 255 255);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.dsn-article-content.prose ul,
.dsn-article-content.prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.dsn-article-content.prose li {
    margin-bottom: 0.5rem;
}

/* 排行榜按钮样式 */
.ranking-tab {
    color: rgb(75 85 99);
}

.dark .ranking-tab {
    color: rgb(156 163 175);
}

.ranking-tab.active {
    background-color: rgb(59 130 246);
    color: rgb(255 255 255);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 评论样式 */
.dsn-comment-item {
    margin-bottom: 1.5rem;
}

.dsn-comment-children {
    margin-left: 2rem;
    margin-top: 1rem;
}

.dsn-comment-children .dsn-comment-item {
   
    padding-left: 1rem;
}

.dark .dsn-comment-children .dsn-comment-item {
    border-left-color: rgb(37 99 235);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .dsn-single-main aside {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .dsn-article-header {
        padding: 1rem;
    }
    
    .dsn-article-content {
        padding: 1rem;
    }
    
    .dsn-featured-image {
        margin-bottom: 1.5rem;
    }
    
    .dsn-article-header h1 {
        font-size: 1.5rem;
    }
    
    .dsn-article-actions .flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .dsn-article-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* ===============================
   用户中心样式
   =============================== */

/* 用户中心主容器 */
.dsn-user-center {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.dark .dsn-user-center {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* 用户中心头部 */
.dsn-user-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 用户头像动画效果 */
#user-header-avatar {
    transition: transform 0.3s ease;
}

#user-header-avatar img {
    transition: all 0.3s ease;
}

#user-header-avatar:hover {
    transform: scale(1.05);
}

/* 用户中心导航 */
.dsn-user-nav {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    flex-shrink: 0;
}

.dark .dsn-user-nav {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 用户中心布局优化 */
@media (min-width: 1024px) {
    .dsn-user-center aside {
        width: 320px !important;
        flex-shrink: 0 !important;
        min-width: 320px !important;
        max-width: 320px !important;
    }
    
    .dsn-user-center .flex-1 {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 320px - 2rem) !important;
    }
}

/* 确保用户中心内容区域正确响应式布局 */
.dsn-user-center .grid {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.dsn-user-center .grid > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 修复统计卡片在小屏幕上的显示 */
@media (max-width: 1280px) {
    .dsn-user-center .grid.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .dsn-user-center .grid.lg\:grid-cols-4,
    .dsn-user-center .grid.md\:grid-cols-2 {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* 防止导航项文字换行 */
.dsn-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 导航项目 */
.dsn-nav-item {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.dsn-nav-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 用户中心内容区 */
.dsn-user-content {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .dsn-user-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 统计卡片动画 */
.dsn-stat-card {
    transition: all 0.3s ease;
}

.dsn-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 表单样式增强 */
.dsn-form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dsn-form-input:focus {
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 头像上传区域 */
.dsn-avatar-upload {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dsn-avatar-upload:hover .dsn-avatar-overlay {
    opacity: 1;
}

.dsn-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;
    cursor: pointer;
}

/* 头像预览区域动画 */
#avatar-preview {
    transition: transform 0.3s ease;
}

#avatar-preview img {
    transition: all 0.3s ease;
}

/* 用户中心SPA动画 */
#user-center-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#content-loading {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.dsn-tab-link {
    position: relative;
    overflow: hidden;
}

.dsn-tab-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.dsn-tab-link:hover::before {
    left: 100%;
}

/* 加载动画优化 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 内容淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* 导航项点击效果 */
.dsn-tab-link:active {
    transform: scale(0.98);
}

/* 错误提示动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* 二维码上传区域样式 */
.qq-upload-area,
.wechat-upload-area {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qq-upload-area:hover,
.wechat-upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.qq-upload-area.drag-over {
    border-color: #f97316 !important;
    background-color: rgba(249, 115, 22, 0.05);
    transform: scale(1.02);
}

.wechat-upload-area.drag-over {
    border-color: #22c55e !important;
    background-color: rgba(34, 197, 94, 0.05);
    transform: scale(1.02);
}

/* 二维码预览样式 */
#qq-qr-preview,
#wechat-qr-preview {
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

#qq-qr-preview:hover,
#wechat-qr-preview:hover {
    transform: scale(1.05);
}

#qq-qr-preview img,
#wechat-qr-preview img {
    transition: all 0.3s ease;
}

#qq-qr-preview:hover img,
#wechat-qr-preview:hover img {
    transform: scale(1.1);
}

/* 上传进度条动画已移除以提升性能 */

/* 文件拖拽效果 */
.qq-upload-area::before,
.wechat-upload-area::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.qq-upload-area:hover::before,
.wechat-upload-area:hover::before {
    opacity: 1;
}

/* 上传成功动画已移除以提升性能 */

/* Logo上传区域样式 */
.logo-upload-area {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.logo-upload-area.drag-over {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.02);
}

/* Logo预览样式 */
#logo-preview {
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

#logo-preview:hover {
    transform: scale(1.05);
}

#logo-preview img {
    transition: all 0.3s ease;
}

#logo-preview:hover img {
    transform: scale(1.1);
}

/* Logo上传进度条动画 */
#logo-upload-progress .bg-blue-500 {
    animation: uploadPulse 1.5s ease-in-out infinite;
}

/* Logo拖拽效果 */
.logo-upload-area::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.logo-upload-area:hover::before {
    opacity: 1;
}

/* 网站设置上传区域样式 */
.favicon-upload-area {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.favicon-upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.favicon-upload-area.drag-over {
    border-color: #f97316 !important;
    background-color: rgba(249, 115, 22, 0.05);
    transform: scale(1.02);
}

/* 网站设置预览样式 */
#favicon-preview {
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

#favicon-preview:hover {
    transform: scale(1.05);
}

#favicon-preview img {
    transition: all 0.3s ease;
}

#favicon-preview:hover img {
    transform: scale(1.1);
}

/* 网站设置进度条动画 */
#favicon-upload-progress .bg-orange-500 {
    animation: uploadPulse 1.5s ease-in-out infinite;
}

/* Favicon拖拽效果 */
.favicon-upload-area::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(249, 115, 22, 0.1), transparent);
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.favicon-upload-area:hover::before {
    opacity: 1;
}

/* 删除按钮样式优化 - 仅限媒体上传相关 */
.media-upload-container .absolute.-top-2.-right-2,
.media-preview-item .absolute.-top-2.-right-2 {
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 确保删除按钮在所有预览容器中都能正确显示 */
#qq-qr-preview,
#wechat-qr-preview,
#logo-preview,
#favicon-preview {
    padding: 8px; /* 为删除按钮留出空间 */
}

/* 页脚编辑页面删除按钮修复 */
.dsn-user-center .bg-red-500 {
    background-color: #ef4444 !important;
    color: white !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dsn-user-center .bg-red-500:hover {
    background-color: #dc2626 !important;
}

.dsn-user-center .absolute.-top-2.-right-2 {
    position: absolute !important;
    top: -0.5rem !important;
    right: -0.5rem !important;
    z-index: 20 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 调整图片以适应新的padding */
#qq-qr-preview img,
#wechat-qr-preview img,
#logo-preview img,
#favicon-preview img {
    border-radius: 0.375rem;
}

/* 文章卡片在用户中心的样式 */
.dsn-user-article-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .dsn-user-article-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dsn-user-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 分页控件 */
.dsn-user-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.dsn-user-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background: white;
    color: rgb(75 85 99);
    transition: all 0.3s ease;
}

.dark .dsn-user-pagination button {
    background: rgb(31 41 55);
    color: rgb(156 163 175);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dsn-user-pagination button:hover {
    background: rgb(59 130 246);
    color: white;
    border-color: rgb(59 130 246);
}

.dsn-user-pagination button.active {
    background: rgb(59 130 246);
    color: white;
    border-color: rgb(59 130 246);
}

.dsn-user-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 用户中心响应式 */
@media (max-width: 1024px) {
    .dsn-user-nav {
        position: static !important;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dsn-user-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .dsn-user-header .flex {
        flex-direction: column;
        text-align: center;
    }
    
    .dsn-user-content {
        padding: 1rem;
    }
    
    .dsn-user-pagination {
        flex-wrap: wrap;
    }
    
    /* 移动端导航优化 */
    .dsn-user-nav {
        position: static !important;
        margin-bottom: 1.5rem;
        width: 100% !important;
    }
    
    .dsn-nav-item {
        justify-content: center;
        text-align: center;
    }
    
    .dsn-nav-item span {
        font-size: 0.9rem;
    }
}

/* ===== 媒体上传功能样式 ===== */

/* 媒体上传弹窗样式 */
#mediaUploadModal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#mediaUploadModal .media-item {
    position: relative;
    /* 移除过渡动画 */
}

/* 移除媒体项目悬停动画 */

/* 移除旧的选择状态样式，避免冲突 */

/* 拖拽区域样式 */
/* dropZone动画已移除以提升性能 */

#dropZone.drag-over {
    border-color: #a855f7;
    background-color: rgba(168, 85, 247, 0.05);
    /* 移除transform缩放 */
}

/* 上传进度条（移除动画） */
.progress-bar {
    background: linear-gradient(90deg, #a855f7, #ec4899);
    /* 移除width过渡动画 */
}

.progress-bar.bg-green-500 {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar.bg-red-500 {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* 上传队列项目动画 */
#uploadQueue .bg-white {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 状态图标动画 */
.status-text {
    transition: color 0.3s ease;
}

/* 媒体网格响应式 */
#mediaGrid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    #mediaGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    #mediaGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    #mediaGrid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 文件预览图标样式 */
.file-preview-icon {
    font-size: 2rem;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.file-preview-icon:hover {
    color: #6b7280;
}

/* 选择状态指示器（优化版本） */
.selection-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* 移除过渡动画 */
}

/* 媒体项目选中状态 - 彻底修复灰色问题 */
.media-item.selected {
    background: linear-gradient(45deg, #a855f7, #ec4899, #3b82f6) !important;
    padding: 3px !important;
    border: none !important;
}

.media-item.selected > * {
    background: white !important;
    border-radius: inherit !important;
}

.dark .media-item.selected > * {
    background: #1f2937 !important;
}

.media-item.selected .selection-indicator {
    opacity: 1 !important;
    display: flex !important;
    z-index: 30 !important;
}

/* 彻底禁用媒体项目的所有动画和过渡效果 */
.media-item,
.media-item *,
.media-item img,
.media-item div,
.media-item button {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
}

/* 确保所有图片正常显示 */
.media-item img {
    opacity: 1 !important;
    filter: none !important;
}

/* 媒体项目容器优化 */
.media-item {
    contain: layout style paint !important;
    isolation: isolate !important;
}

/* 渐变边框类 */
.border-gradient-purple {
    border: 3px solid;
    border-image: linear-gradient(45deg, #a855f7, #ec4899, #3b82f6) 1;
}

.selection-indicator i {
    color: white;
    font-size: 0.75rem;
}

/* 标签页切换动画 */
.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* 加载状态样式 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* 工具栏媒体按钮高亮 */
.editor-toolbar button[onclick="openMediaUploadModal()"] {
    position: relative;
    overflow: hidden;
}

.editor-toolbar button[onclick="openMediaUploadModal()"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.editor-toolbar button[onclick="openMediaUploadModal()"]:hover::before {
    left: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #mediaUploadModal .max-w-4xl {
        max-width: 95vw;
        margin: 0 auto;
    }
    
    #mediaUploadModal .h-\[80vh\] {
        height: 90vh;
    }
    
    #mediaGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .upload-queue-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .upload-queue-item .file-info {
        order: 1;
    }
    
    .upload-queue-item .file-actions {
        order: 2;
        align-self: stretch;
        justify-content: space-between;
    }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .media-item {
        border-color: #374151;
    }
    
    /* 移除暗色模式下的悬停动画 */
    
    .file-preview-icon {
        color: #6b7280;
    }
    
    .progress-bar {
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
    }
}

/* ===== 新版媒体上传样式优化 ===== */

/* 自定义滚动条样式 */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #a855f7 #f3f4f6;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #a855f7;
    border-radius: 3px;
    transition: background 0.2s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* 暗色模式下的滚动条 */
.dark .custom-scrollbar {
    scrollbar-color: #a855f7 #374151;
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: #374151;
}

/* 媒体网格项动画 */
#mediaUploadModal .media-item {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 进度环形动画 */
.progress-ring {
    transition: stroke-dasharray 0.3s ease-in-out;
}

/* 选择状态动画 */
.media-item[data-selected="true"] {
    animation: pulse 0.3s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 媒体网格改进 */
#mediaGrid .media-item {
    aspect-ratio: 1;
    overflow: hidden;
}

#mediaGrid .media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 移除过渡动画 */
}

/* 移除图片缩放悬停动画 */

/* 选择顺序数字样式 - 左上角 */
.media-item .absolute.top-2.left-2:not(button) {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 删除按钮样式 - 右上角 */
.media-item .absolute.top-2.right-2 {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.media-item .absolute.top-2.right-2:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* 删除按钮图标动画 */
.media-item .absolute.top-2.right-2 i {
    transition: transform 0.2s ease;
}

.media-item .absolute.top-2.right-2:hover i {
    transform: rotate(90deg);
}

/* ===== 可视化编辑器样式 ===== */

/* 可视化编辑器基本样式 */
#visual_editor {
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

#visual_editor:focus {
    outline: none;
}

/* 防止编辑器变形 */
#visual_editor * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 确保编辑器保持固定尺寸 */
#visual_editor {
    width: 100% !important;
    min-height: 500px !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    resize: none !important;
    position: relative !important;
}

/* 防止内容溢出导致的变形 */
#visual_editor {
    overflow-x: hidden !important;
    scroll-behavior: smooth;
}

/* 确保所有子元素都符合容器边界 */
#visual_editor > * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 编辑器内元素样式 */
#visual_editor h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #1f2937;
}

.dark #visual_editor h1 {
    color: #f9fafb;
}

#visual_editor h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #374151;
}

.dark #visual_editor h2 {
    color: #e5e7eb;
}

#visual_editor h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #4b5563;
}

.dark #visual_editor h3 {
    color: #d1d5db;
}

#visual_editor p {
    margin: 0.5rem 0;
}

#visual_editor strong, #visual_editor b {
    font-weight: bold;
}

#visual_editor em, #visual_editor i {
    font-style: italic;
}

#visual_editor u {
    text-decoration: underline;
}

#visual_editor blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin: 1rem 0;
}

.dark #visual_editor blockquote {
    color: #9ca3af;
}

#visual_editor code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #e5e7eb;
    color: #d73a49;
    display: inline-block;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#visual_editor code:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.dark #visual_editor code {
    background-color: #374151;
    border-color: #4b5563;
    color: #f97316;
}

.dark #visual_editor code:hover {
    background-color: #4b5563;
    border-color: #6b7280;
}

#visual_editor a {
    color: #3b82f6;
    text-decoration: none;
}

#visual_editor a:hover {
    text-decoration: underline;
}

/* 媒体元素样式 */
#visual_editor img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: block;
    object-fit: contain;
}

#visual_editor video {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: block;
}

/* 媒体容器样式 */
#visual_editor .media-insert-container {
    margin: 1rem 0;
}

/* Placeholder样式 */
#visual_editor p.text-gray-400,
#visual_editor p.text-gray-500 {
    font-style: italic;
    pointer-events: none;
}

/* ===== 付费内容块样式 ===== */

/* 付费内容块容器 */
.paid-content-block {
    background: linear-gradient(135deg, #fff9e6, #fffbf0);
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
    transition: all 0.3s ease;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.dark .paid-content-block {
    background: linear-gradient(135deg, #1f2937, #374151);
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.paid-content-block:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

/* 付费内容块头部 */
.paid-content-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.paid-content-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.paid-content-price {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.paid-content-price:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.paid-content-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* 编辑器通知样式 */
.editor-notification {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
    z-index: 9999;
}

.editor-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* 编辑器激活状态样式 */
#visual_editor.editor-active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* 编辑器工具栏激活提示 */
.editor-toolbar.editor-focused {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.editor-toolbar.editor-focused .toolbar-text {
    color: white;
    font-weight: 600;
}

/* ============================================================================
   登录注册模态框样式
   ============================================================================ */

/* 模态框背景 */
.auth-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1) !important;
}

/* 模态框内容 */
.auth-modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 标签切换 */
.auth-tab {
    background: transparent;
    color: #6b7280;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.auth-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* 输入框样式增强 */
.auth-form input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.auth-form label {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* 数学验证码 */
.math-captcha {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.math-captcha::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.math-captcha:hover::before {
    left: 100%;
}

/* 密码强度条 */
#passwordStrength {
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

#passwordStrengthBar {
    height: 100%;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

/* 按钮样式 */
.auth-form button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-form button[type="submit"]:hover {
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3);
}

.auth-form button[type="submit"]:active {
    transform: scale(0.98);
}

.auth-form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-form button[type="submit"]:hover::before {
    left: 100%;
}

/* 发送验证码按钮 */
#sendEmailCodeBtn {
    transition: all 0.3s ease;
    min-width: 120px;
}

#sendEmailCodeBtn:hover {
    box-shadow: 0 8px 20px rgba(245, 101, 101, 0.3);
    transform: translateY(-1px);
}

#sendEmailCodeBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 复选框样式 */
.auth-form input[type="checkbox"] {
    accent-color: #3b82f6;
}

.auth-form input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 链接样式 */
.auth-form a {
    position: relative;
    transition: all 0.3s ease;
}

.auth-form a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.auth-form a:hover::after {
    width: 100%;
}

/* 字段反馈样式 */
.field-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 忘记密码表单特殊样式 */
#forgotPasswordForm .text-center i {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 加载覆盖层 */
#authLoadingOverlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#authLoadingOverlay .bg-white {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Toast通知样式 */
.auth-toast {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .auth-modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .auth-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .math-captcha {
        min-width: 80px;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    #sendEmailCodeBtn {
        min-width: 100px;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    .auth-modal-content {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .auth-form input {
        background-color: #374151;
        border-color: #4b5563;
        color: #ffffff;
    }
    
    .auth-form input:focus {
        background-color: #374151;
        border-color: #3b82f6;
    }
    
    .auth-form input::placeholder {
        color: #9ca3af;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.auth-form {
    animation: fadeIn 0.3s ease-out;
}

.auth-toast {
    animation: slideInRight 0.3s ease-out;
}

/* 输入框图标颜色 */
.auth-form label i {
    opacity: 0.8;
}

.auth-form input:focus + label i,
.auth-form input:not(:placeholder-shown) + label i {
    opacity: 1;
}

/* 自定义滚动条 */
.auth-modal-content::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.auth-modal-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.auth-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ============================================================================
   头像样式优化
   ============================================================================ */

/* 确保所有头像都是圆形并有统一描边 */
.avatar, 
img.avatar,
.avatar img,
#avatar-preview img,
.user-avatar,
.profile-avatar,
#user-header-avatar img {
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border: 3px solid rgba(255, 1, 109) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 头像容器 */
.avatar-container {
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    position: relative;
}

/* 头像预览区域 */
#avatar-preview {
    position: relative;
    display: inline-block;
}

#avatar-preview .w-30 {
    width: 120px !important;
    height: 120px !important;
}

/* 头像悬停效果 */
#avatar-preview:hover .absolute {
    opacity: 1;
}

/* 修复Tailwind的w-30和h-30类 */
.w-30 {
    width: 7.5rem; /* 120px */
}

.h-30 {
    height: 7.5rem; /* 120px */
}

/* 文章卡片中的头像 */
.article-card .avatar,
.comment-avatar .avatar,
.author-avatar .avatar,
.dsn-card-avatar img,
.dsn-author-avatar img {
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* 用户中心头像 */
.user-center-avatar,
#user-header-avatar img {
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border: 4px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

.user-center-avatar:hover,
#user-header-avatar:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* 暗色模式下的头像描边 */
.dark .avatar,
.dark img.avatar,
.dark .avatar img,
.dark #avatar-preview img,
.dark .user-avatar,
.dark .profile-avatar,
.dark #user-header-avatar img {
    border: 3px solid rgba(255, 1, 109) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.dark .article-card .avatar,
.dark .comment-avatar .avatar,
.dark .author-avatar .avatar,
.dark .dsn-card-avatar img,
.dark .dsn-author-avatar img {
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.dark .user-center-avatar,
.dark #user-header-avatar img {
    border: 4px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.dark .user-center-avatar:hover,
.dark #user-header-avatar:hover img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
}

/* 头像上传按钮样式 */
.avatar-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.avatar-upload-btn input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* 头像加载动画 */
.avatar-loading {
    animation: avatarPulse 1.5s ease-in-out infinite;
}

@keyframes avatarPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 头像更新动画 */
.avatar-updated {
    animation: avatarBounce 0.6s ease;
}

@keyframes avatarBounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* 响应式头像尺寸 */
@media (max-width: 640px) {
    #avatar-preview .w-30 {
        width: 80px !important;
        height: 80px !important;
    }
    
    .w-30 {
        width: 5rem; /* 80px on mobile */
    }
    
    .h-30 {
        height: 5rem; /* 80px on mobile */
    }
}

.paid-remove-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.375rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paid-remove-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* 付费内容编辑区域 */
.paid-content-area {
    padding: 1rem;
    min-height: 3rem;
    outline: none;
    border: none;
    background: transparent;
    color: #374151;
    line-height: 1.6;
    font-size: 0.875rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.dark .paid-content-area {
    color: #e5e7eb;
}

.paid-content-area:focus {
    background: rgba(245, 158, 11, 0.05);
}

.dark .paid-content-area:focus {
    background: rgba(245, 158, 11, 0.1);
}

/* 付费内容区域占位符 */
.paid-content-area:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
    pointer-events: none;
}

.dark .paid-content-area:empty::before {
    color: #6b7280;
}

/* 付费内容区域禁用某些格式化按钮的影响 */
.paid-content-area * {
    font-family: inherit !important;
}

/* 价格输入框样式 */
.price-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0.25rem !important;
    color: #1f2937 !important;
    font-weight: bold !important;
    font-size: 0.875rem !important;
    padding: 0.25rem 0.5rem !important;
    width: 4rem !important;
    text-align: center !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.price-input:focus {
    background: white !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.price-input:invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* ============================================================================ */
/* 订单页面Ajax加载动画和交互效果 */
/* ============================================================================ */

#orders-list-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#orders-list-container.loading {
    opacity: 0.7;
    transform: translateY(10px);
}

.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.filter-btn:hover::before {
    width: 100px;
    height: 100px;
}

.filter-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.orders-fade-in {
    animation: fadeInUp 0.4s ease-out;
}

/* 订单项悬停效果 */
.order-item {
    transition: all 0.3s ease;
}

.order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 加载动画优化 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮点击反馈 */
.filter-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 平滑的统计卡片更新 */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card.updating {
    opacity: 0.8;
    transform: scale(0.98);
}

/* ============================================================================ */
/* 登录可见和评论可见内容块样式 */
/* ============================================================================ */

/* 登录可见内容块 */
.login-only-block {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.login-only-block:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.login-only-content {
    min-height: 80px;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-only-content:focus,
.login-only-content.focused {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.login-only-content:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
}

.login-only-content img,
.login-only-content video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 8px 0;
}

/* 评论可见内容块 */
.comment-only-block {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.comment-only-block:hover {
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.comment-only-content {
    min-height: 80px;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-only-content:focus,
.comment-only-content.focused {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.comment-only-content:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
}

.comment-only-content img,
.comment-only-content video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 8px 0;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .login-only-content:empty::before,
    .comment-only-content:empty::before {
        color: #6b7280;
    }
    
    .login-only-content:focus,
    .login-only-content.focused {
        background-color: rgba(31, 41, 55, 0.95) !important;
    }
    
    .comment-only-content:focus,
    .comment-only-content.focused {
        background-color: rgba(31, 41, 55, 0.95) !important;
    }
}

/* 编辑状态保护 */
.login-only-content.focused,
.comment-only-content.focused {
    position: relative;
    z-index: 10;
}

.login-only-content.focused::after,
.comment-only-content.focused::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid currentColor;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0.3;
}

/* 确保内容块在编辑时不被误删 */
.login-only-block:has(.login-only-content.focused),
.comment-only-block:has(.comment-only-content.focused) {
    position: relative;
    z-index: 5;
}


/* 提升编辑体验的光标样式 */
.login-only-content[contenteditable="true"],
.comment-only-content[contenteditable="true"] {
    cursor: text;
}

/* 新的可见性内容块样式 - 高级UI设计 */
.dsn-visibility-block {
    position: relative !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: all !important;
    z-index: 10 !important;
    transform: translateZ(0) !important; /* 硬件加速 */
}

.dsn-visibility-block:hover {
    transform: translateY(-2px) translateZ(0) !important;
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2) !important;
}

.dsn-login-block:hover {
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2) !important;
}

.dsn-comment-block:hover {
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.2) !important;
}

.dsn-login-content,
.dsn-comment-content {
    cursor: text !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: all !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    resize: none !important;
    font-family: inherit !important;
}

.dsn-login-content:focus,
.dsn-comment-content:focus {
    transform: translateZ(0) !important;
}

/* 美化滚动条 */
.dsn-login-content::-webkit-scrollbar,
.dsn-comment-content::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

.dsn-login-content::-webkit-scrollbar-track,
.dsn-comment-content::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 3px !important;
}

.dsn-login-content::-webkit-scrollbar-thumb {
    background: #3b82f6 !important;
    border-radius: 3px !important;
}

.dsn-comment-content::-webkit-scrollbar-thumb {
    background: #22c55e !important;
    border-radius: 3px !important;
}

.dsn-login-content::-webkit-scrollbar-thumb:hover {
    background: #2563eb !important;
}

.dsn-comment-content::-webkit-scrollbar-thumb:hover {
    background: #16a34a !important;
}

/* 媒体库自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea, #db2777) !important;
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: #374151 !important;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #f472b6) !important;
    border-color: #4b5563 !important;
}

/* 媒体库智能自适应网格 */
#mediaGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    grid-gap: 20px !important;
    grid-auto-rows: minmax(180px, auto) !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 超智能响应式 - 根据容器宽度完美适配 */
@media (max-width: 639px) {
    #mediaGrid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        grid-auto-rows: minmax(150px, auto) !important;
        grid-gap: 15px !important;
        padding: 15px !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    #mediaGrid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        grid-auto-rows: minmax(160px, auto) !important;
        grid-gap: 18px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #mediaGrid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
        grid-auto-rows: minmax(170px, auto) !important;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    #mediaGrid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
        grid-auto-rows: minmax(190px, auto) !important;
        grid-gap: 22px !important;
    }
}

@media (min-width: 1280px) {
    #mediaGrid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        grid-auto-rows: minmax(200px, auto) !important;
        grid-gap: 24px !important;
        padding: 24px !important;
    }
}

/* 媒体项目完全自适应样式 */
.media-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 150px !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 3px solid #e5e7eb !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* 响应式媒体项目尺寸 */
@media (min-width: 640px) {
    .media-item {
        min-height: 160px !important;
        border-radius: 18px !important;
    }
}

@media (min-width: 768px) {
    .media-item {
        min-height: 170px !important;
        border-radius: 20px !important;
    }
}

@media (min-width: 1024px) {
    .media-item {
        min-height: 190px !important;
        border-radius: 22px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    }
}

@media (min-width: 1280px) {
    .media-item {
        min-height: 200px !important;
        border-radius: 24px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    }
}

/* 移除媒体项目的变换和阴影悬停动画 */

.media-item img {
    /* 移除过渡动画 */
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* 移除图片悬停缩放动画 */

/* 暗黑模式支持 */
.dark .media-item {
    background: #374151 !important;
    border-color: #4b5563 !important;
}

/* 移除暗色模式下的媒体项目悬停动画 */

/* 图片加载失败时的样式 */
.media-item .fallback-preview {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border: 2px dashed #d1d5db !important;
}

.dark .media-item .fallback-preview {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    border-color: #6b7280 !important;
}

.dsn-login-content:empty:before {
    content: attr(data-placeholder) !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    font-style: italic !important;
    opacity: 0.7 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    user-select: none !important;
}

.dsn-comment-content:empty:before {
    content: attr(data-placeholder) !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    font-style: italic !important;
    opacity: 0.7 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    user-select: none !important;
}

/* 暗黑模式支持 */
.dark .dsn-visibility-block {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-color: #475569 !important;
}

.dark .dsn-login-block {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-color: #3b82f6 !important;
}

.dark .dsn-comment-block {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%) !important;
    border-color: #22c55e !important;
}

.dark .dsn-login-content,
.dark .dsn-comment-content {
    
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark .dsn-login-content:empty:before,
.dark .dsn-comment-content:empty:before {
    color: #94a3b8 !important;
    opacity: 0.6 !important;
}

.dark .dsn-login-content:focus,
.dark .dsn-comment-content:focus {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #f1f5f9 !important;
}

.dark .dsn-comment-content:focus {
    border-color: #22c55e !important;
}

/* 防止块在编辑时被意外选中或删除 */
.dsn-login-block[data-type],
.dsn-comment-block[data-type] {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dsn-login-content[contenteditable="true"],
.dsn-comment-content[contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.login-only-content[contenteditable="true"]:empty,
.comment-only-content[contenteditable="true"]:empty {
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-only-block,
    .comment-only-block {
        margin: 12px 0;
        padding: 12px !important;
    }
    
    .login-only-header,
    .comment-only-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    .login-only-content,
    .comment-only-content {
        min-height: 60px;
        font-size: 13px;
    }
}

/* ===== 用户中心布局优化 ===== */
.dsn-user-center {
    min-height: 100vh;
}

.dsn-user-center .container {
    max-width: 100% !important;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    .dsn-user-center .container {
        max-width: 1400px !important;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 用户中心主布局 */
.dsn-user-center .flex {
    gap: 2rem;
}

@media (min-width: 1024px) {
    .dsn-user-center .flex {
        gap: 3rem;
    }
}

/* 侧边栏固定宽度 */
.dsn-user-center aside {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .dsn-user-center aside {
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
    }
}

/* 主内容区域优化 */
.dsn-user-center .dsn-user-content {
    width: 100% !important;
    overflow: hidden;
}

/* 主内容区域容器 */
.dsn-user-center .flex-1 {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
}

@media (min-width: 1024px) {
    .dsn-user-center .flex-1 {
        max-width: calc(100% - 320px) !important;
    }
}

/* 发布页面表单优化 */
.dsn-user-center #publishForm {
    width: 100% !important;
    max-width: none !important;
}

.dsn-user-center #publishForm .w-full {
    width: 100% !important;
}

.dsn-user-center #publishForm > div {
    width: 100% !important;
}

/* 编辑器工具栏响应式 */
.dsn-user-center .editor-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .dsn-user-center .editor-toolbar {
        gap: 0.25rem;
    }
    
    .dsn-user-center .editor-toolbar button {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* 可视化编辑器优化 */
.dsn-user-center #visual_editor {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 表单网格布局优化 */
.dsn-user-center .grid {
    width: 100% !important;
}

.dsn-user-center .grid > * {
    min-width: 0 !important;
}

/* 响应式调整 */
@media (max-width: 1023px) {
    .dsn-user-center .flex-col.lg\\:flex-row {
        flex-direction: column !important;
    }
    
    .dsn-user-center aside {
        order: -1;
        width: 100% !important;
        max-width: none !important;
    }
}

/* 确保内容不溢出 */
.dsn-user-center * {
    box-sizing: border-box;
}

.dsn-user-center .overflow-hidden {
    overflow: hidden;
}

.dsn-user-center .min-w-0 {
    min-width: 0 !important;
}

/* 发布页面容器特别优化 */
.dsn-user-center [data-tab="publish"] .w-full {
    width: 100% !important;
    max-width: 100% !important;
}

/* 输入框和选择框优化 */
.dsn-user-center input[type="text"],
.dsn-user-center input[type="email"], 
.dsn-user-center textarea,
.dsn-user-center select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== 用户中心页面UI优化 ===== */

/* 页面内边距优化 */
.dsn-user-center .dsn-user-content {
    padding: 0 !important;
}

.dsn-user-center .p-6,
.dsn-user-center .p-8,
.dsn-user-center .md\\:p-8 {
    padding: 1.5rem !important;
}

@media (min-width: 768px) {
    .dsn-user-center .p-6,
    .dsn-user-center .p-8,
    .dsn-user-center .md\\:p-8 {
        padding: 2rem !important;
    }
}

/* 页面标题区域优化 */
.dsn-user-center h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

@media (min-width: 768px) {
    .dsn-user-center h2 {
        font-size: 1.875rem !important;
    }
}

.dsn-user-center .mb-8 {
    margin-bottom: 1.5rem !important;
}

.dsn-user-center .mb-6 {
    margin-bottom: 1rem !important;
}

/* 卡片样式优化 */
.dsn-user-center .bg-white,
.dsn-user-center .dark\\:bg-gray-800 {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.dsn-user-center .dark .bg-white {
    background-color: rgba(31, 41, 55, 0.8) !important;
    border-color: rgba(75, 85, 99, 0.3) !important;
}

/* 统计卡片网格优化 */
.dsn-user-center .grid {
    gap: 1rem !important;
}

@media (min-width: 768px) {
    .dsn-user-center .grid {
        gap: 1.5rem !important;
    }
}

/* 文章列表优化 */
.dsn-user-center .space-y-4 > * + * {
    margin-top: 0.75rem !important;
}

.dsn-user-center .space-y-6 > * + * {
    margin-top: 1rem !important;
}

/* 按钮组优化 */
.dsn-user-center .flex.gap-2 {
    gap: 0.5rem !important;
}

.dsn-user-center .flex.gap-3 {
    gap: 0.75rem !important;
}

.dsn-user-center .flex.gap-4 {
    gap: 1rem !important;
}

/* 筛选按钮优化 */
.dsn-user-center .flex-wrap.gap-2 {
    gap: 0.5rem !important;
}

/* 分页按钮优化 */
.dsn-user-center .pagination {
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
}

/* 表单间距优化 */
.dsn-user-center .space-y-6 {
    gap: 1rem !important;
}

.dsn-user-center .space-y-4 {
    gap: 0.75rem !important;
}

/* 编辑器工具栏紧凑化 */
.dsn-user-center .editor-toolbar {
    padding: 0.75rem !important;
    border-radius: 8px 8px 0 0 !important;
}

.dsn-user-center .editor-toolbar button {
    padding: 0.5rem !important;
    border-radius: 6px !important;
}

/* 可视化编辑器优化 */
.dsn-user-center #visual_editor {
    min-height: 300px !important;
    padding: 1rem !important;
    border-radius: 0 0 8px 8px !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
}

/* 统计数字突出显示 */
.dsn-user-center .text-3xl {
    font-size: 2rem !important;
    font-weight: 700 !important;
}

.dsn-user-center .text-2xl {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

/* 图标优化 */
.dsn-user-center .text-lg {
    font-size: 1rem !important;
}

/* 悬停效果优化 */
.dsn-user-center .hover\\:shadow-lg:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
}

.dsn-user-center .transition-all {
    transition: all 0.2s ease !important;
}

/* 渐变按钮优化 */
.dsn-user-center .bg-gradient-to-r {
    background-size: 200% 200% !important;
    transition: background-position 0.3s ease !important;
}

.dsn-user-center .bg-gradient-to-r:hover {
    background-position: right center !important;
}

/* 紧凑型徽章样式 */
.dsn-user-center .px-3.py-1 {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 9999px !important;
}

/* 文章卡片内边距优化 */
.dsn-user-center .p-4 {
    padding: 1rem !important;
}

.dsn-user-center .p-6 {
    padding: 1.25rem !important;
}

/* 响应式文本优化 */
@media (max-width: 640px) {
    .dsn-user-center h2 {
        font-size: 1.25rem !important;
    }
    
    .dsn-user-center .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .dsn-user-center .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .dsn-user-center .p-6,
    .dsn-user-center .p-8 {
        padding: 1rem !important;
    }
    
    .dsn-user-center .mb-8 {
        margin-bottom: 1rem !important;
    }
    
    .dsn-user-center .mb-6 {
        margin-bottom: 0.75rem !important;
    }
}

/* 顶部操作区域优化 */
.dsn-user-center .flex.justify-between {
    align-items: flex-start !important;
    gap: 1rem !important;
}

@media (min-width: 768px) {
    .dsn-user-center .flex.justify-between {
        align-items: center !important;
    }
}

/* ===== 高级媒体上传系统样式 ===== */

/* 媒体上传弹窗 */
#mediaUploadModal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#mediaModalContent {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* 拖拽上传区域 - 性能优化 */
/* dropZone过渡动画已移除（性能优化） */

#dropZone:hover {
    border-color: #8b5cf6;
}

#dropZone.drag-over {
    border-color: #8b5cf6 !important;
    background-color: rgba(139, 92, 246, 0.05) !important;
}

/* 上传进度条动画已移除以提升性能 */

/* 媒体网格 - 固定3列布局 */
#mediaGrid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem 1rem; /* 垂直间距1.5rem，水平间距1rem */
    padding: 1rem 1.5rem 1rem 1rem; /* 右侧留出更多空间给滚动条 */
    width: calc(100% - 16px); /* 减去滚动条宽度 */
    max-width: calc(100% - 16px);
    justify-items: stretch; /* 确保项目填满网格单元格 */
    align-items: stretch;
    box-sizing: border-box;
    grid-auto-rows: auto; /* 确保行高自动调整 */
}

/* 确保媒体网格有滚动条和正确布局 */
#mediaGrid {
    overflow-y: auto !important;
    /* 使用flex-1自动计算高度，移除固定max-height */
}

/* 强制3列网格布局 */
#mediaGrid.grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

/* 防止flex覆盖grid */
#mediaGrid.flex-1 {
    flex: 1 1 0% !important;
    display: grid !important;
}

/* 媒体项目 - 3列布局优化（无动画版本） */
.media-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1 !important; /* 强制正方形 */
    width: 100% !important;
    height: 0 !important; /* 重置高度 */
    padding-bottom: 100% !important; /* 使用padding创建正方形 */
    min-width: 160px !important; /* 增大最小宽度 */
    box-sizing: border-box;
}

/* 媒体内容容器 */
.media-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: inherit !important;
}

/* 媒体内容容器内的所有元素 */
.media-content > * {
    width: 100% !important;
    height: 100% !important;
}

/* 媒体项目中的图片 */
.media-content img {
    object-fit: cover !important;
    border-radius: inherit !important;
}

/* 媒体项目按钮和覆盖层保持原有定位（无动画版本） */
.media-item button,
.media-item .absolute {
    position: absolute !important;
    z-index: 10 !important;
}

/* 确保删除按钮在最上层（移除动画） */
.media-item button {
    z-index: 20 !important;
}

/* 按钮悬停动画已移除以提升性能 */

/* 桌面端更大的媒体项目 */
@media (min-width: 1024px) {
    .media-item {
        min-width: 180px !important;
        min-height: 180px !important;
    }
}

/* 平板设备滚动条调整 */
@media (min-width: 641px) and (max-width: 1023px) {
    #mediaGrid {
        gap: 1.25rem 1rem !important; /* 平板端垂直间距1.25rem，水平间距1rem */
        padding: 1rem 1.25rem 1rem 1rem !important;
        width: calc(100% - 14px) !important;
        max-width: calc(100% - 14px) !important;
    }
    
    #mediaGrid::-webkit-scrollbar {
        width: 10px !important;
    }
}

/* 超大屏幕更大的媒体项目 */
@media (min-width: 1536px) {
    .media-item {
        min-width: 200px !important;
        min-height: 200px !important;
    }
    
    #mediaGrid {
        gap: 2rem 1.25rem !important; /* 超大屏幕垂直间距2rem，水平间距1.25rem */
        padding: 1rem 2rem 1rem 1rem !important; /* 超大屏幕更多右侧空间 */
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
    }
    
    #mediaGrid::-webkit-scrollbar {
        width: 14px !important;
    }
}

/* 所有媒体项目悬停动画已完全移除 */

.media-item img {
    /* 移除图片缩放动画，提升性能 */
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

/* 按钮硬件加速和动画已移除以提升性能 */

/* 媒体项目状态指示器 */
.media-item .status-indicator {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 进度条动画 */
.progress-border circle {
    transition: stroke-dashoffset 0.3s ease;
}

/* 选择指示器动画已移除以提升性能 */

/* 删除按钮 - 无动画版本 */
.media-item .delete-btn {
    /* 完全移除过渡动画 */
    z-index: 30;
}

/* 过滤按钮 */
.filter-btn {
    transition: all 0.2s ease;
}

.filter-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 自定义滚动条 - 增强可见性 */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(0, 0, 0, 0.1);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.6), rgba(139, 92, 246, 0.8));
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 1));
}

/* 媒体网格专用滚动条样式 */
#mediaGrid::-webkit-scrollbar {
    width: 12px;
}

#mediaGrid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin: 8px 2px 8px 0; /* 右侧留出更多空间 */
}

#mediaGrid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #3b82f6);
    border-radius: 6px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    margin-right: 2px; /* 向右偏移 */
}

#mediaGrid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777, #2563eb);
}

/* 滚动条容器调整 */
#mediaGrid {
    padding-right: 8px !important; /* 为滚动条留出更多右侧空间 */
}

/* 简化上传状态指示 - 性能优化 */
.uploading .progress-indicator {
    /* 使用CSS原生动画，性能更佳 */
    animation: spin 1s linear infinite;
}

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

/* 移除复杂的成功和错误动画，使用简单的状态显示 */

/* 媒体预览优化 */
.media-preview {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-preview:hover img,
.media-preview:hover video {
    transform: scale(1.05);
}

/* 视频预览特殊样式 */
.video-preview {
    position: relative;
}

.video-preview::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* 文件大小显示 */
.file-size {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

/* 响应式优化 */
@media (max-width: 640px) {
    #mediaModalContent {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .media-upload-content {
        flex-direction: column;
    }
    
    .upload-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
    }
    
    #mediaGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem 0.75rem !important; /* 移动端垂直间距1rem，水平间距0.75rem */
        padding: 0.75rem 1rem 0.75rem 0.75rem !important; /* 移动端也保持右侧空间 */
        width: calc(100% - 12px) !important; /* 移动端滚动条稍小 */
        max-width: calc(100% - 12px) !important;
    }
    
    /* 移动端滚动条样式 */
    #mediaGrid::-webkit-scrollbar {
        width: 8px !important;
    }
    
    #mediaGrid::-webkit-scrollbar-track {
        margin: 4px 1px 4px 0 !important;
    }
    
    #mediaGrid::-webkit-scrollbar-thumb {
        border: 2px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .media-item {
        aspect-ratio: 1/1 !important;
        width: 100% !important;
        height: 0 !important;
        padding-bottom: 100% !important;
        min-width: 100px !important;
    }
}

/* 暗黑模式优化 */
.dark #dropZone {
    border-color: #6b21a8;
    background-color: #1f2937;
}

.dark #dropZone:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

.dark .media-item {
    background-color: #374151;
    border-color: #4b5563;
}

/* 移除暗色模式下的媒体项目悬停效果 */

.dark .file-size {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* 点赞和收藏按钮样式 */
.like-button,
.bookmark-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 未点赞/未收藏状态 - 默认灰色 */
.like-button:not(.liked),
.bookmark-button:not(.bookmarked) {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}

.dark .like-button:not(.liked),
.dark .bookmark-button:not(.bookmarked) {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: #d1d5db;
}

/* 已点赞状态 - 鲜艳的粉红渐变 */
.like-button.liked {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #ef4444 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4) !important;
    animation: glowPulse 2s ease-in-out infinite;
}

/* 已收藏状态 - 鲜艳的橙黄渐变 */
.bookmark-button.bookmarked {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 50%, #eab308 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4) !important;
    animation: glowPulse 2s ease-in-out infinite;
}

/* 发光脉冲动画 */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(236, 72, 153, 0.6), 0 0 20px rgba(236, 72, 153, 0.3);
    }
}

/* 收藏按钮的发光效果 */
.bookmark-button.bookmarked {
    animation-name: glowPulseOrange;
}

@keyframes glowPulseOrange {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(249, 115, 22, 0.6), 0 0 20px rgba(249, 115, 22, 0.3);
    }
}

/* 悬停效果 */
.like-button:hover,
.bookmark-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 点击波纹效果 */
.like-button::before,
.bookmark-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.like-button:active::before,
.bookmark-button:active::before {
    width: 300px;
    height: 300px;
}

/* 心形和书签飘动动画 */
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-60px) scale(0.5);
        opacity: 0;
    }
}

@keyframes bookmarkFloat {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) scale(1.2) rotate(10deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-60px) scale(0.5) rotate(20deg);
        opacity: 0;
    }
}

/* 脉冲效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.like-button.liked,
.bookmark-button.bookmarked {
    animation: pulse 0.3s ease-in-out;
}

/* 数字跳动效果 */
@keyframes numberBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.like-button span[id*="count"],
.bookmark-button span[id*="count"] {
    display: inline-block;
    transition: all 0.3s ease;
}

.like-button.updating span[id*="count"],
.bookmark-button.updating span[id*="count"] {
    animation: numberBounce 0.5s ease;
}

/* 评论系统彩色边框 - 确保 Tailwind 颜色类生效 */
.dsn-comment-item article.border-purple-500 {
    border-left-color: rgb(168 85 247) !important;
}

.dsn-comment-item article.border-pink-500 {
    border-left-color: rgb(236 72 153) !important;
}

.dsn-comment-item article.border-blue-500 {
    border-left-color: rgb(59 130 246) !important;
}

.dsn-comment-item article.border-green-500 {
    border-left-color: rgb(34 197 94) !important;
}

.dsn-comment-item article.border-yellow-500 {
    border-left-color: rgb(234 179 8) !important;
}

.dsn-comment-item article.border-red-500 {
    border-left-color: rgb(239 68 68) !important;
}

.dsn-comment-item article.border-red-600 {
    border-left-color: rgb(220 38 38) !important;
}

.dsn-comment-item article.border-indigo-500 {
    border-left-color: rgb(99 102 241) !important;
}

.dsn-comment-item article.border-cyan-500 {
    border-left-color: rgb(6 182 212) !important;
}

.dsn-comment-item article.border-orange-500 {
    border-left-color: rgb(249 115 22) !important;
}

.dsn-comment-item article.border-teal-500 {
    border-left-color: rgb(20 184 166) !important;
}

/* 评论互动卡片 - 行数限制 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}