/* ===== Quill 编辑器圆角 ===== */
.ql-container {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}
.ql-toolbar {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* ===== 自定义音乐播放器 ===== */
.music-player-container .music-player {
    transition: all 0.2s;
}
.music-player-container .music-player:hover {
    background: #f0f0f0;
}

/* 进度条可点击区域扩大 */
.progress-bar {
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 0;
    right: 0;
}

/* ===== 移动端图片网格高度优化 ===== */
@media (max-width: 640px) {
    .grid-cols-3 img {
        height: 8rem;
    }
}

/* ===== 灯箱关闭按钮 ===== */
.lightbox-close {
    line-height: 1;
    user-select: none;
}

/* ===== 评论表情选取器 ===== */
.comment-emoji-picker {
    max-width: calc(100vw - 20px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ===== 删除按钮 ===== */
.delete-btn,
.delete-comment-btn {
    background: transparent !important;
    border: none;
    cursor: pointer;
}
.delete-comment-btn {
    font-size: 0.7rem;
}

/* ===== 点赞/评论按钮统一微调 ===== */
.like-btn,
.comment-toggle-btn {
    user-select: none;
    white-space: nowrap;
}

/* ===== 白天模式背景色 ===== */
body {
    background-color: #7dbdfe !important;
}

/* ===== 夜间模式优化 ===== */
.dark body {
    background-color: #263856 !important;
    color: #e5e7eb;
}

.dark .bg-white,
.dark .bg-white.rounded-xl {
    background-color: #253247 !important; /* 卡片颜色稍亮 */
}
.dark .shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4) !important;
}
.dark .top-bar {
    background-color: #253247;
}

.dark .text-gray-800 {
    color: #f3f4f6 !important;
}
.dark .text-gray-700 {
    color: #d1d5db !important;
}
.dark .text-gray-600 {
    color: #9ca3af !important;
}
.dark .text-gray-500 {
    color: #9ca3af !important;
}
.dark .text-gray-400 {
    color: #6b7280 !important;
}
.dark .text-gray-300 {
    color: #6b7280 !important;
}

.dark .border-t,
.dark .border {
    border-color: #374151 !important;
}
.dark .border-gray-100 {
    border-color: #374151 !important;
}

.dark .bg-gray-50 {
    background-color: #1a2333 !important;
}
.dark .bg-gray-100 {
    background-color: #1a2333 !important;
}
.dark .bg-gray-200 {
    background-color: #1a2333 !important;
}

.dark input,
.dark textarea,
.dark select {
    background-color: #334155;
    color: #e5e7eb;
    border-color: #475569;
}
.dark input::placeholder,
.dark textarea::placeholder {
    color: #9ca3af;
}

.dark table {
    color: #e5e7eb;
}
.dark .hover\:bg-gray-50:hover {
    background-color: #334155 !important;
}

.dark .bg-blue-100 {
    background-color: #1e3a8a !important;
}
.dark .text-blue-600 {
    color: #93c5fd !important;
}

.dark .bg-blue-500 {
    background-color: #2563eb !important;
}
.dark .bg-blue-500:hover {
    background-color: #1d4ed8 !important;
}

.dark .hover\:bg-red-50:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
}
.dark .hover\:bg-blue-50:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.dark .bg-blue-500.text-white {
    background-color: #2563eb !important;
}
/* 置顶标签 – 永远在右上角，不随主题变化 */
.top-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25rem;
    padding: 2px 10px;
    border-bottom-left-radius: 0.375rem;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.05em;
}
.dark .top-badge {
    background: #2563eb !important;
    color: #f8fafc !important;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}