/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

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

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header h1 a:hover {
    color: #ecf0f1;
}

nav {
    text-align: center;
    margin-top: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: #34495e;
}

/* Main Content */
main {
    min-height: calc(100vh - 250px);
}

/* Posts */
.posts-header {
    margin-bottom: 2rem;
}

.posts-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.post {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}

.post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.post-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #555;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.post-content {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content h4 { font-size: 1.1rem; }

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #7f8c8d;
    font-style: italic;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.post-content table th {
    background: #f4f4f4;
    font-weight: 600;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.post-content a {
    color: #3498db;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content hr {
    border: none;
    border-top: 2px solid #ecf0f1;
    margin: 2rem 0;
}

.post-full {
    padding: 2.5rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.no-posts {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 8px;
}

.no-posts p {
    margin-bottom: 1.5rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.post-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.form-help a {
    color: #3498db;
    text-decoration: none;
}

.form-help a:hover {
    text-decoration: underline;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
    min-height: 200px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.post-navigation {
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }
    .post {
        padding: 1.5rem;
    }
    .post-title {
        font-size: 1.4rem;
    }
    .posts-header h2 {
        font-size: 1.5rem;
    }
}