/* 需要添加在 static/css 目录下 */
/* 功能：文章发布和管理页面的样式 */

.article-editor {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.article-editor h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.editor-toolbar {
    background-color: #f8f9fc;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-toolbar button {
    background-color: white;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.editor-toolbar button:hover {
    background-color: #e9ecef;
}

.editor-content {
    width: 100%;
    min-height: 400px;
    border: 1px solid #e3e6f0;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    background-color: white;
    resize: vertical;
}

.editor-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.editor-controls button {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.publish-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.publish-btn:hover {
    background-color: #3a56c4;
}

.draft-btn {
    background-color: #f8f9fc;
    color: var(--gray-color);
    border: 1px solid #e3e6f0;
}

.draft-btn:hover {
    background-color: #e9ecef;
}

/* 文章预览样式 */
.article-preview {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-top: 30px;
}

.article-preview h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.preview-content {
    line-height: 1.6;
    color: var(--gray-color);
}

/* 文章列表样式 */
.article-list {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.article-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.article-card h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.article-actions button {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.edit-article-btn {
    background-color: var(--warning-color);
    color: white;
    border: none;
}

.edit-article-btn:hover {
    background-color: #f5c341;
}

.delete-article-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
}

.delete-article-btn:hover {
    background-color: #e23528;
}
/* 需要添加在 static/css 目录下 */
/* 功能：文章发布和管理页面的样式 */

.article-editor {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    margin-bottom: 20px;
}

.article-editor h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.editor-toolbar {
    background-color: #f8f9fc;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-toolbar button {
    background-color: white;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.editor-toolbar button:hover {
    background-color: #e9ecef;
}

.editor-content {
    width: 100%;
    min-height: 400px;
    border: 1px solid #e3e6f0;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    background-color: white;
    resize: vertical;
}

.article-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.draft-btn {
    background-color: #f8f9fc;
    color: var(--gray-color);
    border: 1px solid #e3e6f0;
}

.draft-btn:hover {
    background-color: #e9ecef;
}

.publish-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.publish-btn:hover {
    background-color: #3a56c4;
}

/* Markdown编辑器样式覆盖 */
.easymde-container {
    border: none;
}

.easymde-textarea {
    min-height: 400px !important;
}

.easymde-toolbar {
    background-color: #f8f9fc;
    border-radius: 5px 5px 0 0 !important;
}

.easymde-toolbar button {
    background: none !important;
    border: none !important;
    padding: 8px 12px !important;
    margin: 0 2px !important;
}

.easymde-preview {
    background-color: white;
    padding: 15px;
    border-radius: 0 0 5px 5px;
    border: 1px solid #e3e6f0;
    border-top: none;
}

/* 1. 修复标签堆叠问题 */
.tag-input-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* 允许换行，但后面会限制 badge 的布局 */
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.08); /* 如果你背景是白的，这里要调深 */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    min-height: 50px;
}

#selected-tags {
    display: flex;
    flex-wrap: wrap; /* 确保标签横向排列 */
    gap: 6px;
}

.tag-badge {
    display: inline-flex !important; /* 强制横向显示 */
    align-items: center;
    white-space: nowrap; /* 禁止标签内的文字换行 */
    background: linear-gradient(135deg, #6a87c4 0%, #202e72 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    gap: 6px;
}

/* 2. 修复推荐标签看不见的问题 */
.preset-tags-container {
    margin-top: 15px;
    padding: 10px;
}

.preset-label {
    color: #666; /* 改成深色，确保白色背景可见 */
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: block;
}

.preset-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-chip {
    /* 这里的颜色改为有颜色的背景，或者深色文字 */
    background: rgba(102, 126, 234, 0.1); 
    color: #667eea; 
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-chip:hover {
    background: #667eea;
    color: white; /* 悬停时变蓝底白字 */
    transform: translateY(-2px);
}

/* 3. 修复底部通知栏样式 */
.notification-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.notification {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(-10px);
}

.notification.error {
    background: #6947ff;
}
