/* styles.css - 现代化卡片系统 2.0（极致丝滑版 - 性能优化）*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-placeholder: #b3b3b3;
    --border-color: #000000;
    --link-color: #2481cc;
    --card-border: #e5e5e5;
    --card-hover-shadow: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
    --progress-bg: #f0f0f0;
    --progress-fill: #333333;
    --skeleton-base: #f0f0f0;
    --skeleton-shine: #fafafa;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: scroll;
}

.page-wrapper {
    min-height: 100vh;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Header */
.header {
    position: fixed;
    top: 90px;
    right: 50%;
    transform: translateX(390px);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--border-color);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
}

.action-btn:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--border-color);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* Mobile Action Buttons */
.mobile-publish-btn,
.mobile-edit-btn {
    display: none;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Editor Container */
.editor-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 50px 120px;
    transform: translateY(20px);
    opacity: 1;
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.editor-row {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
    position: relative;
}

.editor-row.content-row {
    margin-bottom: 0;
}

.editor-label {
    min-width: 100px;
    padding-top: 10px;
    font-size: 16px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-label.visible {
    opacity: 1;
    transform: translateX(0);
}

.editor-input-wrapper {
    flex: 1;
    position: relative;
}

.title-input,
.author-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-input {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.title-input::placeholder {
    color: var(--text-placeholder);
    font-weight: 700;
}

.author-input {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 8px 0;
    letter-spacing: -0.01em;
}

.author-input::placeholder {
    color: var(--text-placeholder);
}

/* Content Editable */
.content-editable {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    min-height: 400px;
    outline: none;
    font-family: Georgia, 'Times New Roman', Times, serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.content-editable p {
    margin: 0 0 1.5em 0;
    line-height: 1.8;
}

.content-editable:empty:before {
    content: attr(data-placeholder);
    color: var(--text-placeholder);
    cursor: text;
}

/* Article View */
.article-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 100px 40px 120px;
    transform: translateY(20px);
    opacity: 1;
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-header {
    margin-bottom: 48px;
}

.article-title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    margin-bottom: 24px;
    animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.025em;
}

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

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--text-secondary);
    animation: fadeIn 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
    letter-spacing: -0.01em;
}

.meta-separator {
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.4;
}

.article-content {
    font-size: 20px;
    line-height: 1.8;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: var(--text-primary);
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.01em;
}

.article-content p {
    margin: 0 0 1.5em 0;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.content-editable h2,
.content-editable h3 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    margin: 2em 0 0.8em 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-content h2,
.content-editable h2 {
    font-size: 32px;
    margin-top: 2.5em;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3,
.content-editable h3 {
    font-size: 24px;
    margin-top: 2em;
}

.article-content blockquote,
.content-editable blockquote {
    border-left: 4px solid #e0e0e0;
    padding-left: 24px;
    margin: 1.8em 0;
    color: var(--text-secondary);
    font-style: italic;
    transition: border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.75;
    font-size: 19px;
}

.article-content blockquote:hover,
.content-editable blockquote:hover {
    border-left-color: var(--text-secondary);
}

.article-content a,
.content-editable a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(36, 129, 204, 0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 1px;
}

.article-content a:hover,
.content-editable a:hover {
    border-bottom-color: var(--link-color);
    color: #1a6aa8;
}

.article-content ul,
.article-content ol,
.content-editable ul,
.content-editable ol {
    margin: 1.8em 0;
    padding-left: 2.2em;
    line-height: 1.8;
}

.article-content li,
.content-editable li {
    margin: 0.8em 0;
    line-height: 1.8;
}

.article-content li p,
.content-editable li p {
    margin: 0.5em 0;
}

/* ============================================
   全新现代化卡片系统 2.0
   ============================================ */

/* 通用卡片容器 */
.media-card {
    margin: 3em 0;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: cardEnter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   图片卡片 - 极致现代化 + 懒加载优化
   ============================================ */
.image-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 
                0 10px 40px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    cursor: zoom-in;
}

.image-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08),
                0 20px 60px rgba(0, 0, 0, 0.04);
    transform: translateY(-6px) scale(1.01);
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

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

/* 图片骨架屏 */
.image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 0%,
        var(--skeleton-shine) 50%,
        var(--skeleton-base) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

.image-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
}

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

.image-card img.loading {
    opacity: 0;
}

.image-card img.loaded {
    animation: imageReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* 图片放大查看指示器 */
.image-zoom-indicator {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.image-card:hover .image-zoom-indicator {
    opacity: 1;
    transform: scale(1);
}

.image-zoom-indicator svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
}

/* 图片标题 - 极简优雅 */
.image-caption {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px 24px;
    font-style: normal;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    min-height: 20px;
}

.image-caption:empty:before {
    content: attr(data-placeholder);
    color: var(--text-placeholder);
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover .image-caption:empty:before {
    opacity: 1;
}

.image-caption::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--text-secondary) 50%, 
        transparent 100%);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-caption:focus::before {
    width: 100%;
}

.image-caption:focus {
    color: var(--text-primary);
}

.image-caption.readonly {
    cursor: default;
    pointer-events: none;
}

/* ============================================
   视频卡片 - 自定义控制界面
   ============================================ */
.video-card {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
                0 10px 40px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.video-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12),
                0 20px 60px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px);
}

.video-card video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-card:hover video {
    transform: scale(1.02);
}

/* 视频控制层 */
.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        transparent 100%);
    padding: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.video-card:hover .video-controls-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.video-card:hover .video-play-overlay {
    opacity: 1;
}

.video-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.video-play-overlay svg {
    width: 28px;
    height: 28px;
    fill: #000;
    margin-left: 3px;
}

/* ============================================
   音频卡片 - 专业播放器（已移除波形动画）
   ============================================ */
.audio-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.audio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--text-primary) 0%, 
        var(--text-secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-card.playing::before {
    transform: scaleX(1);
}

.audio-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08),
                0 20px 60px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.12);
}

.audio-content {
    padding: 24px 28px;
}

.audio-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.audio-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.audio-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, 
        rgba(0, 0, 0, 0.1) 0%, 
        transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-card.playing .audio-icon::before {
    width: 100px;
    height: 100px;
}

.audio-card:hover .audio-icon,
.audio-card.playing .audio-icon {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    transform: rotate(-5deg) scale(1.05);
}

.audio-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-card:hover .audio-icon svg,
.audio-card.playing .audio-icon svg {
    stroke: #fff;
}

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

.audio-title {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-wrap: break-word;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.audio-meta {
    font-size: 13px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-meta-dot {
    width: 3px;
    height: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.audio-play-btn {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border: none;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.audio-play-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: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-play-btn:hover::before {
    width: 100%;
    height: 100%;
}

.audio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25),
                0 3px 6px rgba(0, 0, 0, 0.15);
}

.audio-play-btn:active {
    transform: scale(1.05);
}

.audio-play-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.play-icon,
.pause-icon {
    position: absolute;
}

.audio-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.audio-progress-bar {
    position: relative;
    height: 8px;
    background: var(--progress-bg);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-progress-bar:hover {
    height: 10px;
}

.audio-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #333 0%, #1a1a1a 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 100%);
}

/* 波形可视化 - 已禁用 */
.audio-waveform {
    display: none;
}

/* ============================================
   文件卡片 - 现代交互
   ============================================ */
.file-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, 
        var(--text-primary) 0%, 
        var(--text-secondary) 100%);
    transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-card:hover::before {
    height: 100%;
}

.file-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08),
                0 20px 60px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px) translateX(2px);
}

.file-card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
}

.file-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.file-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 70%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-card:hover .file-icon::before {
    opacity: 1;
    transform: translate(25%, 25%);
}

.file-card:hover .file-icon {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    transform: rotate(-8deg) scale(1.1);
}

.file-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-card:hover .file-icon svg {
    stroke: #fff;
    transform: scale(1.1);
}

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

.file-name {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-wrap: break-word;
    line-height: 1.4;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.file-card:hover .file-name {
    color: #000;
}

.file-meta {
    font-size: 13px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-meta-dot {
    width: 3px;
    height: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
}

.file-download-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    stroke: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-card:hover .file-download-icon {
    stroke: var(--text-primary);
    transform: translateY(3px) scale(1.1);
}

/* ============================================
   上传卡片 - 流体动画
   ============================================ */
.upload-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 20px 0;
    display: inline-block;
    min-width: 360px;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 2px 4px rgba(0, 0, 0, 0.04);
    animation: uploadCardSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

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

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%);
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upload-card.uploading::before {
    animation: uploadShine 2s infinite;
}

@keyframes uploadShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.upload-card-content {
    display: flex;
    align-items: center;
    gap: 18px;
}

.upload-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

.upload-card.uploading .upload-icon {
    animation: uploadSpin 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes uploadSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.upload-card.success .upload-icon,
.upload-card.error .upload-icon {
    animation: none;
}

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

.upload-filename {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.upload-status {
    font-size: 12px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.upload-progress-bar {
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #333 0%, #1a1a1a 100%);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.upload-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    animation: progressFlow 1.5s infinite;
}

@keyframes progressFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.upload-card.success {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    animation: successPulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.upload-card.success .upload-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.upload-card.success .upload-progress-fill::after {
    animation: none;
}

.upload-card.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    animation: errorShake 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.upload-card.error .upload-progress-fill {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.upload-card.error .upload-progress-fill::after {
    animation: none;
}

/* ============================================
   拖拽覆盖层 - 高级交互
   ============================================ */
.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.94) 100%);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drag-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drag-content {
    text-align: center;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drag-overlay.active .drag-content {
    transform: scale(1);
}

.drag-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    animation: dragFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
}

@keyframes dragFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

.drag-text {
    font-size: 28px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: white;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Link Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 24px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.modal-input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    font-weight: 500;
}

.modal-btn-primary {
    background: var(--text-primary);
    color: white;
}

.modal-btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.modal-btn-secondary:hover {
    background: #e8e8e8;
}

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

/* File Input */
.file-input {
    display: none;
}

/* Selection */
::selection {
    background: rgba(0, 0, 0, 0.1);
}

/* ============================================
   移动端完美适配
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header {
        padding: 16px 20px;
        top: 16px;
        right: 20px;
        transform: none;
    }

    #publishBtn,
    #editModeBtn {
        display: none !important;
    }

    .mobile-publish-btn,
    .mobile-edit-btn {
        display: none;
    }

    .mobile-publish-btn:not(.hidden),
    .mobile-edit-btn:not(.hidden) {
        display: block !important;
    }

    .editor-container,
    .article-container {
        padding: 60px 20px 80px;
    }

    .editor-row {
        flex-direction: column;
        margin-bottom: 16px;
    }

    .editor-label {
        min-width: auto;
        margin-bottom: 8px;
        padding-top: 0;
        font-size: 15px;
    }

    .mobile-publish-btn,
    .mobile-edit-btn {
        margin-top: 32px;
        margin-bottom: 16px;
    }

    .title-input {
        font-size: 28px;
        line-height: 1.25;
    }

    .author-input {
        font-size: 15px;
    }

    .content-editable {
        font-size: 18px;
        line-height: 1.75;
        min-height: 300px;
    }

    .article-title {
        font-size: 30px;
        line-height: 1.25;
        margin-bottom: 16px;
    }

    .article-meta {
        font-size: 14px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .article-content {
        font-size: 18px;
        line-height: 1.75;
    }

    .article-content h2,
    .content-editable h2 {
        font-size: 26px;
    }

    .article-content h3,
    .content-editable h3 {
        font-size: 21px;
    }

    /* 移动端卡片优化 */
    .media-card {
        margin: 2.5em 0;
    }

    .image-card,
    .video-card,
    .audio-card,
    .file-card {
        border-radius: 14px;
    }

    .image-zoom-indicator {
        width: 32px;
        height: 32px;
        bottom: 12px;
        right: 12px;
    }

    .audio-content,
    .file-card-content {
        padding: 20px 22px;
    }

    .audio-icon,
    .file-icon {
        width: 48px;
        height: 48px;
    }

    .audio-icon svg,
    .file-icon svg {
        width: 22px;
        height: 22px;
    }

    .audio-title,
    .file-name {
        font-size: 15px;
    }

    .audio-meta,
    .file-meta {
        font-size: 12px;
    }

    .audio-play-btn {
        width: 48px;
        height: 48px;
    }

    .audio-play-btn svg {
        width: 16px;
        height: 16px;
    }

    .audio-progress-bar {
        height: 10px;
    }

    .file-download-icon {
        width: 24px;
        height: 24px;
    }

    .upload-card {
        min-width: 300px;
        padding: 20px 22px;
    }

    .upload-icon {
        width: 24px;
        height: 24px;
    }

    .upload-filename {
        font-size: 14px;
    }

    .drag-text {
        font-size: 22px;
    }

    .drag-icon {
        width: 70px;
        height: 70px;
    }

    /* 触摸优化 */
    .audio-play-btn,
    .file-card,
    .image-card,
    .video-card {
        -webkit-tap-highlight-color: transparent;
    }

    .image-caption {
        padding: 16px 20px;
        font-size: 13px;
    }

    .video-play-overlay {
        width: 64px;
        height: 64px;
    }

    .video-play-overlay svg {
        width: 24px;
        height: 24px;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        top: 90px;
        transform: translateX(340px);
    }

    .editor-container,
    .article-container {
        padding: 80px 40px 100px;
    }

    .article-content,
    .content-editable {
        font-size: 19px;
        line-height: 1.78;
    }
}

/* 大屏优化 */
@media (min-width: 1440px) {
    .editor-container {
        max-width: 900px;
        padding: 100px 60px 140px;
    }

    .article-container {
        max-width: 800px;
        padding: 120px 50px 140px;
    }

    .header {
        top: 90px;
        transform: translateX(430px);
    }

    .article-content,
    .content-editable {
        font-size: 21px;
        line-height: 1.82;
    }

    .article-content h2,
    .content-editable h2 {
        font-size: 36px;
    }

    .article-content h3,
    .content-editable h3 {
        font-size: 26px;
    }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Media block and card editing improvements */
#content .media-block { position: relative; margin: 14px 0; }
#content .media-block + p { min-height: 1.4em; }
.media-card { position: relative; -webkit-user-select: none; user-select: none; }
.media-card .image-caption { -webkit-user-select: text; user-select: text; }
.media-card-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 6;
}
.media-card-delete-btn:hover { background: rgba(0,0,0,.75); }

/* ============================================
   媒体卡片 & 临时上传卡片视觉统一（2026 refresh）
   ============================================ */
#content .media-block {
    margin: 16px 0;
}

#content .media-block > .media-card,
#content .media-block > .upload-card {
    margin: 0;
}

#content .media-block + p {
    min-height: 1.5em;
}

.media-card,
.upload-card {
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06), 0 2px 10px rgba(15, 23, 42, 0.04);
}

.upload-card {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.06), transparent 45%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.upload-card::before {
    opacity: 0.65;
}

.upload-card-content {
    gap: 14px;
    padding: 16px;
    align-items: center;
}

.upload-icon {
    width: 20px;
    height: 20px;
    stroke: #334155;
}

.upload-card .upload-icon {
    width: 18px;
    height: 18px;
}

.upload-card .upload-card-content::before {
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: 0 0 40px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.09));
    position: absolute;
    left: 16px;
    top: 16px;
}

.upload-card .upload-card-content {
    position: relative;
}

.upload-card .upload-icon {
    position: relative;
    z-index: 1;
    margin-left: 11px;
}

.upload-info {
    min-width: 0;
}

.upload-filename {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-status {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-progress-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.upload-progress-fill {
    border-radius: 999px;
    background: linear-gradient(90deg, #111827 0%, #334155 100%);
}

.upload-card.success {
    border-color: rgba(16, 185, 129, 0.35);
    background:
        radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.10), transparent 45%),
        linear-gradient(180deg, #f8fffb, #ffffff);
}

.upload-card.error {
    border-color: rgba(239, 68, 68, 0.35);
    background:
        radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.10), transparent 45%),
        linear-gradient(180deg, #fffafa, #ffffff);
}

/* 删除按钮重设计：更贴合卡片风格 */
.media-card {
    position: relative;
}

.media-card-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 8;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.20);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
    opacity: 0.92;
    padding: 0;
}

.media-card-delete-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
}

.media-card-delete-btn:hover {
    background: rgba(220, 38, 38, 0.92);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 20px rgba(127, 29, 29, 0.28);
}

.media-card-delete-btn:active {
    transform: scale(0.96);
}

.image-card .media-card-delete-btn {
    top: 12px;
    right: 12px;
}

.video-card .media-card-delete-btn {
    top: 12px;
    right: 12px;
}

.audio-card .media-card-delete-btn,
.file-card .media-card-delete-btn {
    top: 10px;
    right: 10px;
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.88);
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.audio-card .media-card-delete-btn:hover,
.file-card .media-card-delete-btn:hover {
    color: #fff;
    background: rgba(220, 38, 38, 0.95);
    border-color: rgba(220, 38, 38, 0.2);
}

/* 移动端适配：上传卡片与媒体卡片统一紧凑布局 */
@media (max-width: 768px) {
    #content .media-block {
        margin: 12px 0;
    }

    .media-card,
    .upload-card {
        border-radius: 14px;
    }

    .upload-card-content {
        padding: 12px;
        gap: 12px;
        align-items: flex-start;
    }

    .upload-card .upload-card-content::before {
        left: 12px;
        top: 12px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .upload-card .upload-icon {
        width: 16px;
        height: 16px;
        margin-left: 9px;
        margin-top: 9px;
    }

    .upload-filename {
        font-size: 13px;
        line-height: 1.35;
        margin-bottom: 4px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .upload-status {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .upload-progress-bar {
        height: 6px;
    }

    .media-card-delete-btn {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        top: 8px;
        right: 8px;
    }

    .media-card-delete-btn svg {
        width: 15px;
        height: 15px;
    }
}

/* ============================================
   UI polish v4: 临时卡片尺寸统一 / 删除按钮自然化 / 空行修复配套
   ============================================ */
#content .media-block > .upload-card {
    box-sizing: border-box;
}

/* 上传临时卡片按媒体类型匹配最终卡片的体量 */
.upload-card.upload-audio,
.upload-card.upload-file {
    border-radius: 16px;
}

.upload-card.upload-audio .upload-card-content,
.upload-card.upload-file .upload-card-content {
    padding: 20px 22px;
    gap: 16px;
    align-items: flex-start;
}

.upload-card.upload-audio .upload-card-content::before,
.upload-card.upload-file .upload-card-content::before {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    left: 18px;
    top: 18px;
}

.upload-card.upload-audio .upload-icon,
.upload-card.upload-file .upload-icon {
    margin-left: 15px;
    margin-top: 15px;
}

.upload-card.upload-image,
.upload-card.upload-video {
    min-height: 220px;
    display: flex;
    align-items: center;
}

.upload-card.upload-image .upload-card-content,
.upload-card.upload-video .upload-card-content {
    width: 100%;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 14px;
}

.upload-card.upload-image .upload-card-content::before,
.upload-card.upload-video .upload-card-content::before {
    width: 44px;
    height: 44px;
    left: 20px;
    top: 20px;
}

.upload-card.upload-image .upload-info,
.upload-card.upload-video .upload-info {
    max-width: min(520px, 100%);
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 12px;
    padding: 10px 12px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* 删除按钮更自然：轻量、圆形、悬停时才强调 */
.media-card-delete-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.82);
    color: rgba(15,23,42,0.78);
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
    top: 10px;
    right: 10px;
    opacity: 0;
    transform: translateY(-2px) scale(0.96);
    transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.media-card:hover .media-card-delete-btn,
.media-card:focus-within .media-card-delete-btn,
.media-card-delete-btn:focus-visible {
    opacity: 0.96;
    transform: translateY(0) scale(1);
}

.media-card-delete-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.media-card-delete-btn:hover {
    background: rgba(255,255,255,0.96);
    border-color: rgba(15, 23, 42, 0.12);
    color: rgba(220, 38, 38, 0.92);
    box-shadow: 0 6px 14px rgba(15,23,42,0.12);
}

.image-card .media-card-delete-btn,
.video-card .media-card-delete-btn {
    background: rgba(15,23,42,0.34);
    border-color: rgba(255,255,255,0.34);
    color: rgba(255,255,255,0.95);
    box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}

.image-card .media-card-delete-btn:hover,
.video-card .media-card-delete-btn:hover {
    background: rgba(15,23,42,0.54);
    border-color: rgba(255,255,255,0.52);
    color: #fff;
}

@media (hover: none) {
    .media-card-delete-btn {
        opacity: 0.94;
        transform: none;
    }
}

@media (max-width: 768px) {
    .upload-card.upload-image,
    .upload-card.upload-video {
        min-height: 170px;
    }

    .upload-card.upload-image .upload-card-content,
    .upload-card.upload-video .upload-card-content {
        min-height: 170px;
        padding: 12px;
    }

    .upload-card.upload-image .upload-info,
    .upload-card.upload-video .upload-info {
        padding: 8px 10px;
        border-radius: 10px;
    }

    .upload-card.upload-audio .upload-card-content,
    .upload-card.upload-file .upload-card-content {
        padding: 14px 14px 12px;
        gap: 12px;
    }

    .upload-card.upload-audio .upload-card-content::before,
    .upload-card.upload-file .upload-card-content::before {
        width: 36px;
        height: 36px;
        left: 12px;
        top: 12px;
        border-radius: 10px;
    }

    .upload-card.upload-audio .upload-icon,
    .upload-card.upload-file .upload-icon {
        margin-left: 10px;
        margin-top: 10px;
    }

    .media-card-delete-btn {
        width: 30px;
        height: 30px;
        top: 7px;
        right: 7px;
    }
}


/* ============================================
   UI polish v5: 删除按钮参照下载按钮风格（极简图标）
   ============================================ */
.media-card-delete-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text-secondary);
    opacity: 0.78;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.media-card-delete-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.media-card:hover .media-card-delete-btn,
.media-card:focus-within .media-card-delete-btn,
.media-card-delete-btn:focus-visible {
    opacity: 0.96;
    transform: translateY(2px) scale(1.04);
}

.media-card-delete-btn:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--text-primary);
}

.media-card-delete-btn:active {
    transform: translateY(1px) scale(0.96);
}

/* 图片/视频卡片上保持可见性，但仍是“无底图标”风格 */
.image-card .media-card-delete-btn,
.video-card .media-card-delete-btn {
    color: rgba(255,255,255,0.92);
    opacity: 0.88;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

.image-card .media-card-delete-btn:hover,
.video-card .media-card-delete-btn:hover {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}

.audio-card .media-card-delete-btn,
.file-card .media-card-delete-btn {
    color: var(--text-secondary);
    filter: none;
}

@media (hover: none) {
    .media-card-delete-btn {
        opacity: 0.92;
        transform: none;
    }
}

@media (max-width: 768px) {
    .media-card-delete-btn {
        width: 26px;
        height: 26px;
        top: 8px;
        right: 8px;
    }
    .media-card-delete-btn svg {
        width: 20px;
        height: 20px;
    }
}
