/* General Body & Layout */
body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    margin: 0;
    background-color: #f7f9fc;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Header */
.header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 3px solid #eee;
}

.site-title h1 {
    margin: 0;
    font-size: 2.5em;
    color: #007bff;
}

.site-title {
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 18px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}
.btn-primary { background-color: #007bff; }
.btn-primary:hover { background-color: #0056b3; }
.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; }
.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Post Table (index.html) */
.post-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}

.post-table th, .post-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.post-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: center;
}

.post-table td.post-id { text-align: center; color: #666; width: 8%; }
.post-table td.post-title a { text-decoration: none; color: #333; font-weight: 500; }
.post-table td.post-title a:hover { text-decoration: underline; }
.post-table td.post-date { text-align: center; color: #666; width: 15%; }
.post-table td.post-actions { text-align: center; width: 18%; }
.post-table td .btn { padding: 5px 10px; font-size: 0.9em; }

/* Search */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
#search-input { width: 50%; padding: 10px; border: 1px solid #ddd; border-radius: 5px 0 0 5px; }
#search-button { padding: 10px 15px; border: 1px solid #007bff; background-color: #007bff; color: white; border-radius: 0 5px 5px 0; cursor: pointer; }

/* Pagination */
.pagination { text-align: center; margin-top: 30px; }
.pagination button { margin: 0 5px; padding: 8px 12px; border: 1px solid #ddd; background-color: white; cursor: pointer; border-radius: 4px; }
.pagination button.active { background-color: #007bff; color: white; border-color: #007bff; }
.pagination button:disabled { cursor: not-allowed; opacity: 0.6; }

/* Form (write/edit) */
.form-container h2 { text-align: center; margin-bottom: 20px; }
.form-container .form-group { margin-bottom: 15px; }
.form-container label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-container input[type="text"], .form-container textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}
.form-container textarea { height: 250px; resize: vertical; }
.form-actions { text-align: right; margin-top: 20px; }
.form-actions .btn { margin-left: 10px; }

/* Post View (view.html) */
.post-view-header {
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}
.post-view-title { font-size: 2.2em; margin: 0; }
.post-view-meta { color: #666; margin-top: 10px; }
.post-view-content { line-height: 1.7; font-size: 1.1em; min-height: 200px; padding: 20px 0; }
.post-view-actions { text-align: right; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.post-view-actions .btn { margin-left: 10px; }
