:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f9fafb;
    --card: #ffffff;
    --border: #e5e7eb;
    --danger: #dc2626;
    --success: #16a34a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-header .logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.site-header nav a {
    margin-left: 18px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}
.site-header nav a:hover { color: var(--primary); }

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 24px 0;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

/* Post list */
.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
}
.post-card h2 {
    margin-top: 0;
}
.post-card h2 a {
    color: var(--text);
    text-decoration: none;
}
.post-card h2 a:hover { color: var(--primary); }
.post-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.post-excerpt { color: var(--text); }
.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.post-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

/* Single post */
.post-full h1 { margin-bottom: 4px; }
.post-content { margin-top: 24px; white-space: pre-wrap; }

/* Forms */
.form-wrap {
    max-width: 420px;
    margin: 60px auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px;
}
.form-wrap h2 { margin-top: 0; }
.muted { color: var(--muted); font-size: 0.9rem; }

form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
form input[type=text],
form input[type=password],
form input[type=file],
form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
form textarea { min-height: 220px; resize: vertical; }

button, .btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
button:hover, .btn:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

/* Admin layout */
.admin-header {
    background: #111827;
    color: #fff;
    padding: 14px 0;
}
.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
}
.admin-header a:hover { color: var(--primary); }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    margin-top: 20px;
}
.admin-table th, .admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.admin-table th { background: #f3f4f6; }
.admin-actions a { margin-right: 10px; font-weight: 600; text-decoration: none; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}
