body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: #f6f7f8;
  color: #333;
  margin: 0;
}

/* Боковое меню */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #ddd;
  height: 100vh;
  padding: 20px;
  position: sticky;
  top: 0;
}
.sidebar h3 {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: #0097a7;
}
.sidebar .menu-item {
  padding: 10px;
  background: #f1f1f1;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: center;
  font-weight: bold;
  color: #555;
  display: block;
}
.sidebar .menu-item:hover {
  background: #e0f7fa;
  color: #0097a7;
}

.main-wrapper {
  flex: 1;
  display: flex;
}

/* Шапка */
.header {
  width: auto;
  background: linear-gradient(90deg, #0097a7, #00bcd4);
  color: #fff;
  padding: 12px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  display: flex; align-items: center; font-weight: bold; font-size: 1.2em;
}
.logo span {margin-left: 8px;}
.nav a {
  margin-left: 20px;
  color: #fff;
  font-weight: 600;
  transition: opacity 0.2s;
}
.nav a:hover {opacity: 0.8;}

.container {width: 90%; max-width: 900px; margin: 20px auto;}

/* Посты на главной */
.posts {display: flex; flex-direction: column; gap: 20px;}
.post {
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.1s;
}
.post:hover {transform: translateY(-2px);}
.post h2 {margin: 0 0 10px 0; font-size: 1.2em; color:#222;}
.post p {color:#555; margin:0;}
.post img {
  margin-top: 10px;
  max-width: 100%;
  border-radius: 8px;
}

/* Детальная страница поста */
.post-detail {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.post-title {margin: 0; color: #222; font-size: 1.5em;}
.post-meta {font-size: 0.85em; color: #777; margin-top: 6px;}
.post-content {margin-top: 15px; color:#444; line-height:1.6;}
.post-content img {margin-top: 15px; width: 100%; border-radius: 10px;}

/* Лайки */
.votes {margin-top: 20px; display: flex; align-items: center; gap: 8px;}
.vote {font-size: 22px; cursor: pointer; transition: transform 0.1s;}
.vote:hover {transform: scale(1.2);}
.vote.up {color:#0097a7;}
.vote.down {color:#ff5722;}

/* Комментарии */
.comments {margin-top: 30px;}
.comments h2 {margin-bottom: 15px; font-size: 1.2em; color: #333;}
.comment {
  background: #fff;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.comment-meta {font-size: 0.8em; color: #555; margin-bottom: 5px;}

/* Форма добавления комментария */
.comment-form {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-form textarea {
  resize: vertical;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95em;
}
.comment-form button {
  align-self: flex-end;
  background: #0097a7;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.comment-form button:hover {background: #007c8a;}

.nav {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.nav-item {
  text-decoration: none;
}