/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Indie+Flower&display=swap');

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Header styling */
header {
    background-color: #4a90e2;
    color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
    text-align: center; /* Center the content inside header */
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
}

header h1 {
    font-size: 2.5em;
    margin-top: 10px;
}

header img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Center the logo */
    margin-bottom: 10px;
}

/* Navigation styling */
nav {
    background: #35495e;
    color: #fff;
    padding: 15px;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center; /* Center navigation links */
}

nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 600;
}

nav a:hover {
    text-decoration: underline;
}

/* Welcome message styling */
#welcome-message {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

#welcome-message h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

#welcome-message p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Posts styling */
h2 {
    margin-bottom: 15px;
}

.post {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 5px solid #4a90e2;
}

.post p {
    font-size: 1.1em;
    margin-bottom: 10px;
    font-family: 'Indie Flower', cursive; /* Diary-like font */
}

.post .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.post .post-footer div {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.post .date {
    color: #777;
    font-size: 0.9em;
}

.post a {
    color: #4a90e2;
    text-decoration: none;
    margin-left: 15px;
}

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

/* Like button styling */
.like-button {
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 15px;
}

.like-button:hover {
    text-decoration: underline;
}

.like-count {
    font-size: 0.9em;
    color: #777;
}

/* Form styling */
form {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

button,
input[type="submit"] {
    background: #4a90e2;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #357ab8;
}

/* Footer styling */
footer {
    background: #35495e;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}

/* Admin and Login Page Styling */
.admin-container {
    width: 80%;
    max-width: 500px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

.admin-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.admin-container form label {
    font-weight: 600;
}

.admin-container form input[type="text"],
.admin-container form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.admin-container form input[type="submit"] {
    width: 100%;
    padding: 10px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.admin-container form input[type="submit"]:hover {
    background: #357ab8;
}

/* Responsive styling */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    nav a {
        margin: 0 10px;
    }

    .post .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .post .post-footer div {
        margin-top: 10px;
    }

    .post a {
        margin-left: 0;
        margin-top: 5px;
    }
}