:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #233044;
    background: #f2f5fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f2f5fa;
}

img {
    max-width: 100%;
}

body > image,
body > img:first-child,
.site-logo {
    display: block;
    width: 500px;
    height: 70px;
    object-fit: contain;
}

body > image,
body > img:first-child {
    margin: 24px auto 0;
}

.site-shell {
    width: min(100% - 32px, 1000px);
    margin: 24px auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(35, 48, 68, 0.08);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 10px 14px;
    color: #3156a3;
    text-decoration: none;
    border-radius: 8px;
}

.site-nav a:hover {
    background: #edf2ff;
}

.feed-container {
    max-width: 680px;
    margin: 32px auto;
}

.feed-container h1 {
    margin: 0 0 20px;
    font-size: 25px;
}

.post-composer,
.post-card,
.profile-card,
.loginform {
    padding: 22px;
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(35, 48, 68, 0.06);
}

.post-composer {
    margin-bottom: 20px;
}

.post-composer h2,
.profile-card h3 {
    margin-top: 0;
}

textarea,
input[type="text"],
input[type="password"],
input[type="file"] {
    max-width: 100%;
    padding: 10px;
    font: inherit;
    border: 1px solid #cbd4e1;
    border-radius: 8px;
}

.post-composer textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 12px;
    resize: vertical;
}

.post-composer input[type="file"] {
    display: block;
    margin: 8px 0 14px;
}

input[type="submit"],
button {
    padding: 10px 16px;
    color: #fff;
    font: inherit;
    background: #4268c5;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

input[type="submit"]:hover,
button:hover {
    background: #3153a6;
}

.post-card {
    margin-bottom: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
}

.post-avatar {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 50%;
}

.post-content {
    margin: 16px 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

.post-image {
    display: block;
    max-width: 100%;
    max-height: 520px;
    margin: 12px 0;
    border-radius: 10px;
    object-fit: contain;
}

.like-form {
    display: inline-block;
    margin: 8px 0;
}

.post-meta {
    color: #758197;
    font-size: 13px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.profile-card img {
    width: 50px;
    height: 50px;
    margin: 6px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
}

.profile-card form {
    margin: 12px 0;
}

.loginform {
    width: min(420px, calc(100% - 32px));
    min-height: 0;
    margin: 40px auto;
    padding: 28px;
    float: none;
}

.loginform input[type="text"],
.loginform input[type="password"] {
    width: 100%;
    margin: 6px 0 14px;
}

.loginform input[type="submit"] {
    margin-top: 8px;
}

@media (max-width: 600px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .feed-container {
        margin: 22px auto;
    }

    .post-composer,
    .post-card,
    .profile-card {
        padding: 16px;
    }
}
