*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f0f2f5;color:#111827}
a{color:#2563eb;text-decoration:none}
.topbar{position:sticky;top:0;z-index:10;background:#1877f2;color:#fff;display:flex;align-items:center;gap:16px;padding:12px 24px;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.brand{font-size:24px;font-weight:800;color:#fff}
.search{flex:1;max-width:440px}
.search input{width:100%;padding:10px 14px;border:0;border-radius:999px}
.topbar nav{margin-left:auto;display:flex;gap:10px;align-items:center}
.topbar nav a{color:#fff;font-weight:700;padding:8px 10px;border-radius:8px}
.topbar nav a:hover{background:rgba(255,255,255,.18)}
.container{max-width:1120px;margin:22px auto;padding:0 16px}
.grid{display:grid;grid-template-columns:260px 1fr 300px;gap:18px}
.card{background:#fff;border-radius:14px;padding:16px;box-shadow:0 1px 4px rgba(0,0,0,.12);margin-bottom:16px}
textarea,input{font-family:inherit}
textarea{width:100%;min-height:95px;resize:vertical;border:1px solid #ddd;border-radius:12px;padding:12px}
input[type=text],input[type=email],input[type=password]{width:100%;border:1px solid #ddd;border-radius:10px;padding:12px;margin:7px 0}
button,.btn{display:inline-block;border:0;border-radius:10px;background:#1877f2;color:#fff;padding:10px 14px;font-weight:700;cursor:pointer}
.btn.gray,button.gray{background:#e5e7eb;color:#111827}
.btn.red,button.red{background:#dc2626;color:#fff}
.muted{color:#6b7280;font-size:14px}
.avatar{width:48px;height:48px;border-radius:50%;background:#1877f2;color:white;display:grid;place-items:center;font-weight:800;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;justify-content:space-between;align-items:center;gap:12px}
.post-body{white-space:pre-wrap;line-height:1.55;margin:14px 0}
.post-img{width:100%;max-height:520px;object-fit:cover;border-radius:14px;margin-top:10px;background:#eee}
.actions{display:flex;justify-content:space-between;border-top:1px solid #eee;border-bottom:1px solid #eee;padding:9px 0;margin-top:8px}
.comment{background:#f3f4f6;padding:10px 12px;border-radius:12px;margin-top:8px}
.comment-form{display:flex;gap:8px;margin-top:10px}
.comment-form input{margin:0;border-radius:999px}
.alert{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:12px;margin-bottom:16px}
.sidebar a{display:block;padding:10px;border-radius:10px;color:#111827;font-weight:700}
.sidebar a:hover{background:#f3f4f6}
.auth{max-width:430px;margin:60px auto}
.cover{height:160px;background:linear-gradient(135deg,#1877f2,#60a5fa);border-radius:16px;margin-bottom:-35px}
.profile-head{display:flex;align-items:end;gap:14px;margin-bottom:20px}
.profile-head .avatar{width:96px;height:96px;border:4px solid #fff}
.footer{text-align:center;color:#6b7280;padding:26px}
.small-form{display:inline}
@media(max-width:900px){.grid{grid-template-columns:1fr}.rightbar,.leftbar{display:none}.topbar{flex-wrap:wrap}.search{order:3;max-width:none;width:100%}}
