/* 全局样式 */
body {
    font-family: 'Inter', 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Quill 富文本内容渲染样式 */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }
.ql-indent-1 { padding-left: 3em; }
.ql-indent-2 { padding-left: 6em; }
.ql-indent-3 { padding-left: 9em; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; }
.prose h1 { font-size: 1.8em; font-weight: bold; margin: 0.8em 0 0.4em; color: #1f2937; }
.prose h2 { font-size: 1.5em; font-weight: bold; margin: 0.8em 0 0.4em; color: #1f2937; }
.prose h3 { font-size: 1.25em; font-weight: bold; margin: 0.6em 0 0.3em; color: #1f2937; }
.prose blockquote { border-left: 4px solid #e5e7eb; padding-left: 1em; color: #6b7280; font-style: italic; margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0.5em 0; }
.prose li { margin: 0.3em 0; }
.prose pre { background: #1f2937; color: #e5e7eb; padding: 1em; border-radius: 8px; overflow-x: auto; margin: 1em 0; }
.prose a { color: #b91c1c; text-decoration: underline; }
.prose p { margin: 0.5em 0; }
.prose strong { font-weight: bold; }
.prose em { font-style: italic; }
.prose u { text-decoration: underline; }
.prose s { text-decoration: line-through; }

/* 导航栏活跃状态 */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: white;
    border-radius: 3px 3px 0 0;
}

/* 区块标题样式 */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, #b91c1c, #dc2626);
    margin-right: 12px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
}

.section-title h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 0.02em;
}

.section-title .more-link {
    font-size: 0.8rem;
    color: #6b7280;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-title .more-link:hover {
    color: #b91c1c;
    transform: translateX(2px);
}

/* 轮播样式 */
.banner-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 10px;
    z-index: 5;
}

@media (min-width: 768px) {
    .banner-indicators {
        display: flex;
    }
}

.banner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-indicator.active {
    background: white;
    width: 24px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

/* 新闻卡片 */
.news-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

/* 作品网格 */
.work-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.work-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card:hover .overlay {
    opacity: 1;
}

/* 摄影师卡片 */
.photographer-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.photographer-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.photographer-card .motto {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.photographer-card:hover .motto {
    opacity: 1;
    transform: translateY(0);
}

/* 灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* 图片加载占位 */
.img-placeholder {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 12px;
}

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

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 500;
}

.category-tag:hover {
    border-color: #b91c1c;
    color: #b91c1c;
    background-color: rgba(185, 28, 28, 0.05);
}

.category-tag.active {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

/* 帖子列表 */
.post-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.post-item:hover {
    background-color: #f8fafc;
    transform: translateX(4px);
}

/* 数据统计动画 */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 管理后台样式 */
.admin-sidebar {
    width: 260px;
    min-height: calc(100vh - 60px);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(59, 130, 246, 0.1);
    color: white;
    border-left-color: #3b82f6;
}

/* 模态框动画 */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-modal-in {
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 玻璃态卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* 高级按钮样式 */
.btn-premium {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: white;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.25);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
}

/* 响应式 */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 1.125rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }

    .banner-container {
        border-radius: 12px;
    }

    /* 移动端页脚紧凑布局 */
    footer .grid {
        gap: 1.5rem;
    }

    /* 移动端模态框全屏适配 */
    .animate-modal-in {
        max-height: 95vh;
    }

    /* 移动端卡片间距 */
    .news-card, .work-card, .photographer-card {
        margin-bottom: 0;
    }

    /* 移动端管理后台侧边栏 */
    .admin-sidebar {
        width: 100%;
    }

    /* 移动端创作者中心 */
    .creator-nav-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    /* 移动端帖子列表 */
    .post-item {
        padding: 0.75rem;
    }

    /* 移动端分类标签横向滚动 */
    .category-tag {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* 超小屏幕（<480px）额外优化 */
@media (max-width: 480px) {
    .section-title h2 {
        font-size: 1rem;
    }

    /* 灯箱移动端全屏 */
    .lightbox #lightbox-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* 作品网格2列 */
    .work-card {
        border-radius: 8px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #b91c1c, #dc2626);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #991b1b, #b91c1c);
}

/* 文字渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, #b91c1c, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 悬浮光效 */
.glow-hover:hover {
    box-shadow: 0 0 30px rgba(185, 28, 28, 0.15);
}

/* 脉冲动画 */
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ==================== 图片水印（已移除CSS水印，改用后端像素级嵌入） ==================== */
/* 水印通过后端 embed_watermark() 函数直接嵌入图片像素，无需前端CSS叠加 */

/* ==================== 图片裁剪模态框样式 ==================== */
#image-crop-modal .cropper-container {
    max-height: 60vh;
}

#image-crop-modal .cropper-view-box,
#image-crop-modal .cropper-face {
    border-radius: 0;
}

#image-crop-modal .cropper-line,
#image-crop-modal .cropper-point {
    background-color: #b91c1c;
}

#image-crop-modal .cropper-dashed {
    border-color: rgba(185, 28, 28, 0.5);
}

#image-crop-modal .cropper-view-box {
    outline: 2px solid #b91c1c;
    outline-color: rgba(185, 28, 28, 0.75);
}

/* ==================== 创作者中心导航样式 ==================== */
.creator-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    transition: all 0.2s;
    text-decoration: none;
}

.creator-nav-item:hover {
    background-color: #f3f4f6;
    color: #b91c1c;
}

.creator-nav-item.active {
    background-color: #fef2f2;
    color: #b91c1c;
    font-weight: 600;
}

/* ==================== 富文本编辑器样式 ==================== */
.rich-editor-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.rich-editor-wrapper:focus-within {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.rich-editor-wrapper .ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb;
    padding: 8px 12px !important;
}

.rich-editor-wrapper .ql-toolbar .ql-formats {
    margin-right: 12px;
}

.rich-editor-wrapper .ql-toolbar button {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    transition: all 0.15s;
}

.rich-editor-wrapper .ql-toolbar button:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.rich-editor-wrapper .ql-toolbar button.ql-active {
    background-color: #fef2f2;
    color: #b91c1c;
}

.rich-editor-wrapper .ql-toolbar .ql-stroke {
    stroke: #4b5563;
}

.rich-editor-wrapper .ql-toolbar button:hover .ql-stroke,
.rich-editor-wrapper .ql-toolbar button.ql-active .ql-stroke {
    stroke: #b91c1c;
}

.rich-editor-wrapper .ql-toolbar .ql-fill {
    fill: #4b5563;
}

.rich-editor-wrapper .ql-toolbar button:hover .ql-fill,
.rich-editor-wrapper .ql-toolbar button.ql-active .ql-fill {
    fill: #b91c1c;
}

.rich-editor-wrapper .ql-toolbar .ql-picker {
    border-radius: 6px;
}

.rich-editor-wrapper .ql-toolbar .ql-picker:hover .ql-picker-label {
    color: #b91c1c;
}

.rich-editor-wrapper .ql-container {
    border: none !important;
    font-family: 'Inter', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.rich-editor-wrapper .ql-editor {
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.8;
    color: #1f2937;
}

.rich-editor-wrapper .ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: normal;
    left: 20px;
    right: 20px;
}

.rich-editor-wrapper .ql-editor h1 {
    font-size: 1.75em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #111827;
}

.rich-editor-wrapper .ql-editor h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #111827;
}

.rich-editor-wrapper .ql-editor h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #1f2937;
}

.rich-editor-wrapper .ql-editor blockquote {
    border-left: 4px solid #b91c1c;
    padding-left: 16px;
    margin: 1em 0;
    color: #4b5563;
    background: #fef2f2;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

.rich-editor-wrapper .ql-editor pre.ql-syntax {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    overflow-x: auto;
}

.rich-editor-wrapper .ql-editor img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rich-editor-wrapper .ql-editor a {
    color: #b91c1c;
    text-decoration: underline;
}

.rich-editor-wrapper .ql-editor ul,
.rich-editor-wrapper .ql-editor ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.rich-editor-wrapper .ql-snow .ql-tooltip {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
}

.rich-editor-wrapper .ql-snow .ql-tooltip input[type="text"] {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 4px 8px;
}

.rich-editor-wrapper .ql-snow .ql-tooltip a.ql-action::after,
.rich-editor-wrapper .ql-snow .ql-tooltip a.ql-remove::before {
    color: #b91c1c;
}