/* list.css - 列表页特有样式 */

/* 快速提交 */
.quick-submit {
    background: white;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-submit-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quick-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.quick-input:focus {
    outline: none;
    border-color: #07c160;
}

.quick-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-paste {
    background: #1890ff;
}

.btn-paste:hover {
    background: #1478d4;
}

.btn-clear {
    background: #999;
}

.btn-clear:hover {
    background: #777;
}

.quick-loading {
    display: none;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.quick-results {
    display: none;
    margin-top: 8px;
    display: none;
}

.quick-result {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}

.quick-result.success {
    background: #e7f7ee;
    color: #07c160;
}

.quick-result.error {
    background: #ffebee;
    color: #e53935;
}

.header {
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
}

/* 筛选器 */
.filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.filters .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
}

/* 操作栏 */
.actions {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 10px;
    align-items: center;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.actions .selected-count {
    color: #666;
    font-size: 14px;
    margin-right: auto;
}

.actions .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
}

/* 文章列表 */
.articles {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    counter-reset: article-counter;
}

.article-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.article-number::before {
    content: counter(article-counter);
}

.article-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    counter-increment: article-counter;
    gap: 15px;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    background: #fafafa;
}

.article-checkbox {
    flex-shrink: 0;
    margin-top: 3px;
}

.article-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.article-content {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: #07c160;
}

.article-thoughts {
    margin: 10px 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-left: 4px solid #07c160;
    color: #444;
}

.article-thoughts .thoughts-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.article-thoughts .thoughts-label {
    display: inline-block;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: inherit;
    line-height: 1.65;
}

.article-thoughts .thoughts-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}

.article-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.article-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.article-tags {
    margin-top: 8px;
}

.empty {
    padding: 60px 20px;
    text-align: center;
    color: #888;
}

#copyHtml {
    position: fixed;
    top: -9999px;
    left: -9999px;
}

/* 手机端适配 */
@media (max-width: 768px) {
    body { padding: 10px; }
    .header h1 { font-size: 20px; }
    .quick-submit { padding: 10px 12px; margin-bottom: 10px; }
    .quick-submit-form { flex-direction: column; gap: 8px; }
    .quick-input { width: 100%; font-size: 13px; padding: 8px 10px; }
    .quick-btns { width: 100%; }
    .quick-btns .btn-sm { flex: 1; padding: 8px 10px; text-align: center; }
    .nav { flex-wrap: wrap; gap: 10px; font-size: 14px; }
    .filters { padding: 15px; }
    .filters form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .filters form > .filter-group:first-child {
        grid-column: 1 / -1;
    }
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    .filters .btn {
        padding: 10px 12px;
    }
    .actions {
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }
    .actions .selected-count {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 5px;
    }
    .actions .btn {
        flex: 1;
        min-width: calc(50% - 8px);
        padding: 10px 8px;
        font-size: 13px;
    }
    .article-item {
        padding: 12px;
        gap: 8px;
        position: relative;
        padding-left: 35px;
    }
    .article-number {
        position: absolute;
        left: 8px;
        top: 12px;
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    .article-checkbox {
        position: absolute;
        left: 10px;
        top: 38px;
    }
    .article-checkbox input {
        width: 16px;
        height: 16px;
    }
    .article-content {
        width: 100%;
    }
    .article-title { font-size: 15px; }
    .article-meta { font-size: 12px; }
    .article-summary { font-size: 13px; }
}

@media (max-width: 480px) {
    .actions .btn {
        min-width: calc(50% - 6px);
        padding: 8px 4px;
        font-size: 12px;
    }
}

/* === Comment System === */
.comment-toggle {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.comment-toggle:hover { color: #07c160; }

.comment-section {
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 10px;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    transition: background 0.2s;
}
.comment-item.comment-highlight {
    background: #fffbe6;
    border-radius: 6px;
    padding-left: 6px;
    padding-right: 6px;
}
.comment-nested { margin-left: 32px; }
.comment-item[data-depth="2"] { margin-left: 28px; }
.comment-item[data-depth="3"] { margin-left: 24px; }
.comment-item[data-depth="4"] { margin-left: 20px; }
@media (max-width: 768px) {
    .comment-nested { margin-left: 20px; }
    .comment-item[data-depth="2"] { margin-left: 16px; }
    .comment-item[data-depth="3"] { margin-left: 14px; }
    .comment-item[data-depth="4"] { margin-left: 12px; }
}
.comment-avatar img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; margin-bottom: 2px;
}
.comment-author { font-weight: 600; color: #333; }
.comment-time { color: #999; }
.comment-content { font-size: 13px; color: #444; line-height: 1.5; word-break: break-word; }
.comment-reply-ref {
    display: inline;
    color: #888; font-size: 12px;
    background: #f5f5f5; padding: 1px 4px; border-radius: 3px;
    cursor: pointer;
}
.comment-reply-ref:hover { background: #e8e8e8; }
.comment-expand-text { color: #07c160; cursor: pointer; font-size: 12px; text-decoration: none; }
.comment-actions {
    display: flex; gap: 12px; margin-top: 4px;
}
.comment-actions button {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: #999; padding: 0;
}
.comment-actions button:hover { color: #333; }
.comment-like-btn.liked { color: #07c160; }
.comment-replies { border-left: 2px solid #f0f0f0; padding-left: 8px; margin-top: 4px; }

.comment-form { margin-top: 8px; }
.comment-form textarea {
    width: 100%; padding: 8px 10px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 13px; font-family: inherit;
    resize: vertical; min-height: 40px;
}
.comment-form textarea:focus { outline: none; border-color: #07c160; }
.comment-form-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 6px;
}
.comment-replying-to {
    font-size: 12px; color: #666;
}
.comment-replying-to a { color: #999; text-decoration: none; margin-left: 4px; }
.comment-submit-btn {
    background: #07c160; color: white; border: none;
    padding: 5px 14px; border-radius: 4px; font-size: 13px;
    cursor: pointer;
}
.comment-submit-btn:hover { background: #06ad56; }
.comment-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.comment-login-hint {
    text-align: center; padding: 10px; font-size: 13px; color: #999;
}
.comment-login-hint a { color: #07c160; text-decoration: none; }
.comment-show-more {
    text-align: center; padding: 8px; font-size: 13px;
}
.comment-show-more a { color: #07c160; text-decoration: none; }
.comment-top-wrapper { }
