/* Reset some default styles */
body, h1, h2, h3, p, div, input, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Body styling */
body {
    background-color: #f4f7f8;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Container for editor and posts */
.editor-container, .post-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Headings */
h1, h2, h3 {
    color: #222;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Editor toolbar */
.editor-toolbar {
    margin-bottom: 15px;
}

.editor-toolbar button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 15px;
    margin-right: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.editor-toolbar button:hover {
    background-color: #0056b3;
}

/* Post title input */
#post-title {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 1.3em;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

#post-title:focus {
    border-color: #007bff;
    outline: none;
}

/* Editor content area */
#editor {
    min-height: 350px;
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 6px;
    overflow-y: auto;
    font-size: 1em;
    color: #444;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#editor:empty:before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

/* Save button */
#save-btn {
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 1.1em;
    background-color: #28a745;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

#save-btn:hover {
    background-color: #1e7e34;
}

/* Link back to portfolio */
a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 15px;
}

a:hover {
    text-decoration: underline;
}

/* Blog post container */
.post-container h1 {
    margin-bottom: 10px;
    font-size: 2.2em;
}

.post-container p {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
}

/* Blog post preview on index */
.blog-post-preview {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.blog-post-preview:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.blog-post-preview h3 {
    margin-bottom: 8px;
    font-size: 1.5em;
}

.blog-post-preview p {
    color: #555;
    font-size: 0.95em;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .editor-container, .post-container {
        padding: 20px;
        margin: 15px;
    }

    #editor {
        min-height: 250px;
    }
}
