* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.hidden {
    display: none !important;
}

.login-view {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 8px;
}

.login-box input {
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.login-box button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.login-box .primary {
    background: #1890ff;
    color: #fff;
}

.login-box .error {
    color: #ff4d4f;
    font-size: 13px;
    text-align: center;
}

.back-link {
    text-align: center;
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}

.admin-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-view header {
    padding: 16px 24px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-view header h1 {
    font-size: 18px;
    font-weight: 600;
}

.admin-view header button {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.admin-view main {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 900px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #fafafa;
    font-weight: 600;
}

tr:hover {
    background: #fafafa;
}

tr.clickable {
    cursor: pointer;
}

.ip {
    font-family: monospace;
    color: #666;
}

.caption {
    max-width: 240px;
}

.reason {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
}

.deleted-tag {
    color: #999;
    font-size: 12px;
    margin-left: 6px;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending { background: #fff2e8; color: #fa8c16; }
.status-badge.public { background: #f6ffed; color: #52c41a; }
.status-badge.private { background: #f0f5ff; color: #1890ff; }
.status-badge.rejected { background: #fff1f0; color: #ff4d4f; }

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
}

.actions .public { background: #52c41a; }
.actions .private { background: #1890ff; }
.actions .reject { background: #ff4d4f; }
.actions .pin { background: #fa8c16; }
.actions .unpin { background: #999999; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 16px;
}

#detailModal .modal-content {
    max-width: 800px;
    width: 100%;
}

#detailMap {
    width: 100%;
    height: 360px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-user {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.detail-score {
    color: #1890ff;
    font-weight: 500;
}

.detail-article {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
}

.modal-body {
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
    background: #fafafa;
}

.detail-actions {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    justify-content: flex-end;
}

.detail-actions button {
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
}

.detail-actions .public { background: #52c41a; }
.detail-actions .reject { background: #ff4d4f; }
.detail-actions .pin { background: #fa8c16; }
.detail-actions .unpin { background: #999999; }

.detail-actions button.hidden {
    display: none;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-actions .secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #d9d9d9;
}

.modal-actions .danger {
    background: #ff4d4f;
    color: #fff;
}

@media (max-width: 768px) {
    .admin-view main {
        padding: 12px;
    }

    .filter-bar {
        gap: 6px;
    }

    .filter {
        padding: 6px 12px;
        font-size: 13px;
    }

    #detailMap {
        height: 260px;
    }
}
