body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 3px;
  background: linear-gradient(45deg, #c1b8cf, #d9cfe8, #cebee6, #ae9fc4); /* Градиент */
  background-size: 400% 400%; /* Для анимации */
  animation: gradient 10s ease infinite; /* Плавная анимация 15 секунд */
  color: #333;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header {
  text-align: center;
  margin-bottom: 20px;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #007bff;
  font-size: 1.1em;
}

.news-feed {
  max-width: 598px;
  margin: 0 auto;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px 15px 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.news-feed::before, .news-feed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
  z-index: 1;
}

.news-feed::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0));
}

.news-feed::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
}

.post {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 0px solid #888; /* Тонкая тёмно-серая рамка */
  text-align: center;
}

.post p {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-size: 1.2em;
  color: #1a1a1a;
  margin: 10px 0;
  line-height: 1.5;
  word-wrap: break-word;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.post blockquote {
  border-left: 4px solid #ccc;
  padding-left: 10px;
  color: #666;
  margin: 10px 0;
  font-style: italic;
}

.media-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px auto;
  max-width: 500px;
}

.media-item {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

.media-item.full-size {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  z-index: 1000;
  background-color: #000;
  padding: 10px;
}

.error {
  color: #d32f2f;
  padding: 20px;
  text-align: center;
  font-size: 1.1em;
}