.article-card {
    padding: 2rem;
    border-radius: 8px;
    font-size: 14px;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

.pinned {
    max-height: 180px;
    overflow-y: auto;
    width: 100%;
    font-size: 16px;
    background-color: whitesmoke;
}

.pinned a {
    color: #232323;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 98%;
    display: inline-block;
}

.single-line-ellipsis {
    align-items: center;
    white-space: nowrap;
    border-bottom: 1px solid #f5f5f5;
    padding: 10px 22px;
    display: flex;
}

.pinned a:hover {
    color: #1890ff;
}

.meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.meta img { 
    max-width: 100%;
    height: auto;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    color: #232323
}

.article-time {
    font-size: 13px;
    color: #999;
}

.editor-container {
    padding: 10px;
    outline: none;
    background: #fff;
    border: 1px solid #ddd;
    min-height: 360px;
    max-height: 380px;
    overflow-y: auto;
    outline: none;
    background: #fff;
    border-radius: 0 0 4px 4px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px 4px 0 0;
}

.tool-btn {
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
    font-size: 14px;
}

.tool-btn:hover {
    background: #e0e0e0;
}

.article-header {
    display: flex;
    flex-direction: column;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tags-container {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.tag-featured {
    background-color: #ff4d4f;
    color: white;
}

.tag-official {
    background-color: #eea921;
    color: white;
}

.tag-original {
    background-color: #B8860B;
    color: white;
}

.tag-pinned {
    background-color: #000000;
    color: white;
}

.tag-strategy {
    background-color: #722ed1;
    color: white;
}

.article-item {
    border-bottom: 1px solid #f5f5f5;
    padding: 1.5rem 1.8rem;
}

.article-title {
    padding: 1rem 0;
    font-size: 2.2rem;
    font-weight: 500;
    color: #00396f;
    flex: 1;
    gap: 1rem;
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
}

.article-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #1890ff;
}

#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
    text-align: center;
    padding-top: 20%;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.form-row {
    display: flex;
    align-items: center;
}

.form-label {
    width: 100px;
    font-size: 16px;
    color: #606266;
    text-align: left;
    padding-right: 15px;
    box-sizing: border-box;
    flex-shrink: 0;
}

#postTitle {
    flex-grow: 1;
    font-size: 16px;
    font-weight: normal;
    padding: 8px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#postTitle:focus {
    border-color: #409EFF;
}

.tool-btn {
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
}

.tool-btn:hover {
    background: #f0f0f0;
}

.editor-container:empty:before {
    content: attr(placeholder);
    color: #aaa;
    display: block;
}
@media (max-width: 768px) {
    .content {
        overflow-x: auto !important;
    }

    .content table {
        min-width: 600px;
        width: auto;
        border-collapse: collapse;
    }
    .content th,
    .content td {
        white-space: nowrap;
        padding: 8px 12px;
    }
}

/* ========== 颜色面板容器 ========== */
.color-btn-wrapper {
    position: relative;    
    display: inline-block;  
}

.color-panel {
    position: absolute;
    right: 0;  
    top: 100%;   
    margin-top: 4px;  
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1100;   
    width: 230px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.color-preset {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.15s, border-color 0.15s;
}

.color-preset:hover {
    border-color: #666;
    transform: scale(1.1);
}


.color-preset.selected {
    border: 2px solid #333;
    transform: scale(1.1);
}

.color-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}


#customColorBtn {
    font-size: 13px;
    padding: 4px 8px;
    line-height: 1;
}


.selected-color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 1px solid #aaa;
    border-radius: 3px;
    background-color: #000000; 
    flex-shrink: 0;
}


#hiddenColorInput {
    display: none;
}

.color-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

.color-actions .btn {
    padding: 4px 14px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #f8f8f8;
    transition: background 0.2s;
}

.color-actions #applyColorBtn {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

.color-actions #applyColorBtn:hover {
    background: #2980b9;
}

.color-actions #cancelColorBtn:hover {
    background: #eee;
}

#sourceEditor {
    width: 100%;
    min-height: 500px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    background-color: #f8f9fa;
    color: #2c3e50;
}

.tool-btn.disabled-mode {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.content table {
    display: block;
    width: 100%;
    min-width: 600px;
}

.search-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}
.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.search-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.search-btn:hover {
    background-color: #2563eb;
}
.search-stats {
    margin-top: 15px;
    color: #64748b;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
    font-size: 16px;
}