/* ========== Reset + Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif; color: #1a1a1a; background: #fff; line-height: 1.6; }
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== Header ========== */
.site-header { background: #fff; border-bottom: 2px solid #1a1a1a; padding: 12px 0; }
.site-header .container { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 22px; font-weight: 800; color: #1a1a1a; }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: 16px; flex: 1; }
.main-nav a { font-size: 14px; color: #555; font-weight: 500; }
.main-nav a:hover { color: #1a1a1a; text-decoration: none; }
.header-right { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.header-right button { background: none; border: none; cursor: pointer; font-size: 13px; color: #1a73e8; }

/* ========== Main ========== */
main { min-height: 60vh; padding: 30px 0; }

/* ========== Footer ========== */
.site-footer { background: #f5f5f5; border-top: 1px solid #ddd; padding: 24px 0; margin-top: 40px; text-align: center; }
.footer-links { margin-bottom: 12px; font-size: 13px; }
.footer-links a { color: #555; margin: 0 4px; }
.copyright { font-size: 12px; color: #999; line-height: 1.8; }

/* ========== Error Pages ========== */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 72px; color: #ddd; margin-bottom: 16px; }
.error-page p { font-size: 18px; color: #666; margin-bottom: 24px; }

/* ========== Pagination ========== */
.pagination { display: flex; justify-content: center; gap: 4px; margin: 30px 0; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.pagination .current { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* ========== Forms ========== */
.auth-page { max-width: 480px; margin: 0 auto; }
.auth-page h2 { margin-bottom: 24px; font-size: 24px; }
.auth-form { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #1a73e8;
}
.radio-inline { display: inline-block; margin-right: 16px; font-weight: normal; cursor: pointer; }
.radio-inline input { width: auto; margin-right: 4px; }
.required { color: #e53e3e; }
.auth-links { text-align: center; font-size: 13px; }
.auth-links a { margin: 0 8px; }

/* ========== Buttons ========== */
.btn {
    display: inline-block; padding: 10px 20px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; font-weight: 600; cursor: pointer; text-align: center;
    background: #fff; color: #333; text-decoration: none; transition: all 0.2s;
}
.btn:hover { background: #f5f5f5; text-decoration: none; }
.btn-primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.btn-primary:hover { background: #1557b0; }
.btn-full { display: block; width: 100%; }

/* ========== Alerts ========== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; line-height: 1.6; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ========== Article List ========== */
.article-list { list-style: none; }
.article-list li { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.article-list li a { font-weight: 500; color: #1a1a1a; }
.article-list .meta { display: block; font-size: 12px; color: #999; margin-top: 4px; }
.article-list .reject-reason { color: #e53e3e; }
.empty-msg { text-align: center; padding: 40px 0; color: #999; }

/* ========== Stat Cards ========== */
.stat-cards { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
    flex: 1; min-width: 100px; padding: 20px; text-align: center;
    border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa;
}
.stat-card .num { display: block; font-size: 28px; font-weight: 800; color: #1a73e8; }
.stat-card .label { font-size: 12px; color: #666; }

/* ========== Profile Card ========== */
.profile-card { max-width: 480px; }
.profile-card h3 { margin-bottom: 12px; }
.profile-card p { font-size: 14px; color: #555; margin-bottom: 6px; }
.profile-card .btn { margin-top: 16px; margin-right: 8px; }

/* ========== Journalist Nav ========== */
.journalist-nav { font-size: 13px; color: #999; }
.journalist-page h3 { margin: 24px 0 12px; font-size: 16px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.journalist-page hr { border: none; border-top: 1px solid #eee; margin: 24px 0; }

/* ========== Article Detail ========== */
.article-detail { max-width: 780px; margin: 0 auto; }
.article-meta-top { font-size: 13px; color: #999; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; }
.article-category { background: #1a73e8; color: #fff; padding: 2px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; }
.article-category:hover { text-decoration: none; opacity: 0.9; }
.article-title { font-size: 28px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.article-subtitle { font-size: 16px; color: #555; line-height: 1.6; margin-bottom: 16px; }
.article-writer { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 24px; font-size: 14px; }
.writer-name { font-weight: 600; }
.article-stats { color: #999; font-size: 13px; }
.article-thumbnail { margin-bottom: 24px; }
.article-thumbnail img { width: 100%; border-radius: 4px; }
.article-content { font-size: 16px; line-height: 1.9; word-break: keep-all; margin-bottom: 30px; }
.article-content img { max-width: 100%; height: auto; margin: 16px 0; }
.article-content p { margin-bottom: 16px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag { display: inline-block; padding: 4px 12px; background: #f0f0f0; border-radius: 20px; font-size: 13px; color: #555; }
.tag:hover { background: #e0e0e0; text-decoration: none; }
.article-actions { display: flex; gap: 8px; margin-bottom: 24px; padding: 16px 0; border-top: 1px solid #eee; }
.btn-like.active, .btn-scrap.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.article-nav { display: flex; justify-content: space-between; padding: 16px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 30px; font-size: 14px; }
.article-nav .prev, .article-nav .next { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== Article List/Grid ========== */
.article-list-page h2 { margin-bottom: 20px; font-size: 22px; }
.search-form { display: flex; gap: 8px; margin-bottom: 24px; }
.search-input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.article-grid { display: grid; gap: 20px; }
.article-card { border-bottom: 1px solid #f0f0f0; padding-bottom: 16px; }
.article-card-link { display: flex; gap: 16px; color: #1a1a1a; }
.article-card-link:hover { text-decoration: none; }
.article-card-link:hover .article-card-title { color: #1a73e8; }
.article-card-thumb { flex-shrink: 0; width: 180px; height: 120px; overflow: hidden; border-radius: 4px; }
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { flex: 1; min-width: 0; }
.article-card-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.article-card-desc { font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 8px; }

/* ========== Comment Section ========== */
.comment-section { max-width: 780px; margin: 0 auto 40px; }
.comment-section h3 { font-size: 18px; margin-bottom: 16px; border-bottom: 2px solid #1a1a1a; padding-bottom: 8px; }
.comment-form { margin-bottom: 24px; }
.comment-guest-fields { display: flex; gap: 8px; margin-bottom: 8px; }
.comment-guest-fields input { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.comment-form textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; resize: vertical; margin-bottom: 8px; font-family: inherit; }
.comment-form .btn { float: right; }
.comment-list { clear: both; }
.comment-item { padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.comment-header strong { color: #333; }
.comment-header time { color: #999; }
.comment-delete { background: none; border: none; color: #e53e3e; font-size: 12px; cursor: pointer; margin-left: auto; }
.comment-body { font-size: 14px; line-height: 1.6; color: #444; }

/* ========== Related Articles ========== */
.related-articles { max-width: 780px; margin: 0 auto 40px; }
.related-articles h3 { font-size: 18px; margin-bottom: 12px; }

/* ========== Data Table ========== */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: #f8f8f8; padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid #ddd; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.data-table a { font-weight: 500; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-error { background: #fef2f2; color: #991b1b; }
.badge-success { background: #f0fdf4; color: #166534; }

/* ========== Article Form ========== */
.article-form .form-group { margin-bottom: 20px; }
.article-form textarea { min-height: 300px; }
.form-actions { display: flex; gap: 8px; align-items: center; padding-top: 16px; border-top: 1px solid #eee; }
.image-list { display: flex; flex-wrap: wrap; gap: 12px; }
.image-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid #eee; border-radius: 6px; font-size: 13px; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .site-header .container { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; white-space: nowrap; padding: 8px 0; }
    .header-right { margin-left: auto; }
}
