/* 编辑器面板深度阴影与悬浮效果 */
.card-panel {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 8px -2px rgba(0, 0, 0, 0.02);
    border: 1px solid #f3f4f6; /* gray-100 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-panel:hover {
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.card-header {
    background-color: #ffffff;
}

/* 解决移除 overflow-hidden 后内部元素遮挡圆角边框的问题 */
.card-panel .card-header {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/* 折叠状态下的圆角处理 */
.card-panel.is-collapsed .card-header {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    border-bottom: none;
}

/* 动态控制 overflow，防止下拉菜单被裁剪 */
.card-panel.has-open-dropdown,
.markdown-toolbar:has(#md-emoji-picker:not(.hidden)),
.editor-content-container:has(#md-emoji-picker:not(.hidden)) {
    overflow: visible !important;
}

/* 编辑器容器高度自适应 */
#editor-sidebar .overflow-hidden {
    display: flex;
    flex-direction: column;
}

#markdown-input {
    min-height: 100px;
}

/* 自定义滚动条隐藏 (但保留功能) */
.custom-scrollbar::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    display: none;
}
.custom-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Markdown 工具栏按钮 */
.md-tool-btn {
    color: #4b5563;
    cursor: pointer;
}
.md-tool-btn:hover {
    background-color: #ffffff;
    color: #ef4444; /* red-500 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 隐藏滚动条但保留功能 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Range Slider 样式美化 (适配红白风格) */
.custom-range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px; /* 线条粗一些 */
    background: #f3f4f6; /* bg-gray-100 */
    border-radius: 10px;
    outline: none;
    transition: background 0.2s;
}

/* Chrome/Safari/Edge/Opera */
.custom-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; /* 红色圆点大一些 */
    height: 20px;
    background: #ef4444; /* text-red-500 */
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.5);
}

/* Firefox */
.custom-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.custom-range-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.5);
}

.custom-range-slider::-moz-range-track {
    background: #f3f4f6;
    height: 8px;
    border-radius: 10px;
}

/* 主题背景色预览样式 */
.theme-option-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

/* 渐显动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn {
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-fadeInScale {
    animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 禁止文本选择 (用于移动端长按) */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 下拉框激活状态 */
.custom-select-container.active .custom-select-options {
    display: block;
}
.custom-select-container.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* 自定义下拉框选项悬停 */
.custom-option.previewing {
    background-color: #fef2f2; /* red-50 */
    color: #ef4444; /* red-500 */
}

/* Emoji 动画与样式 */
.emoji-item {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emoji-item:hover {
    transform: scale(1.4) rotate(5deg);
}
