/* === Base Layout === */
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; background:#f4f6f8; color:#222; }
.container { max-width: 760px; margin:48px auto; background: #fff; padding:24px; border-radius:8px; box-shadow: 0 6px 18px rgba(21,33,52,0.08); }
header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
h1 { margin:0; font-size:20px; }
.form { display:flex; flex-direction:column; gap:8px; max-width:420px; }
label { font-size:13px; }
input { padding:10px; border:1px solid #ddd; border-radius:6px; }
button { padding:10px 12px; border:0; background:#2563eb; color:#fff; border-radius:6px; cursor:pointer; }
footer { margin-top:20px; font-size:12px; color:#666; }

/* === Flash Messages === */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* === Dashboard Email Test Card === */
.email-test-card {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.email-test-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #374151;
}
.email-test-card p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}
.email-test-card .hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 12px;
    margin-bottom: 0;
}
.email-test-card .hint a {
    color: #2563eb;
}
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
.btn-success {
    background: #10b981;
    color: white;
}

/* === Posts === */
.post-form {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}
.post-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}
.post-form button {
    margin-top: 12px;
}
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.post-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s;
}
.post-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.post-author {
    font-weight: 600;
    color: #374151;
}
.post-time {
    font-size: 12px;
    color: #9ca3af;
}
.post-content {
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}
.no-more {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* === Nav === */
nav a { color:#2563eb; text-decoration:none; }
nav a:hover { text-decoration:underline; }

/* === Post actions (like / comment / delete) === */
.post-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}
.post-actions button {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 999px;
}
.post-actions button:hover { background: #e5e7eb; }
.like-btn.liked {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}
.delete-btn {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
    margin-left: auto;
}
.post-actions span { font-size: 13px; color: #6b7280; }

/* === Comments === */
.comments {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.comment { font-size: 14px; color: #374151; }
.comment strong { color: #111827; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.comment-form button { padding: 8px 14px; }

/* === Profile === */
.profile-header { margin-bottom: 20px; }
.profile-header .bio { color: #374151; margin: 4px 0; }
.muted { color: #9ca3af; font-size: 13px; }

/* === Test-login helper (login page) === */
.test-login {
    margin-top: 24px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    max-width: 420px;
}
.test-login code {
    background: #eef2ff;
    color: #3730a3;
    padding: 1px 6px;
    border-radius: 4px;
}
