:root {
  --rust: #a7793e;
  --dark-rust: #6b4131;
  --warm-brown: #887972;
  --tan: #e1c289;
  --muted-yellow: #d4b56a;
  --olive-green: #856045;
  --light-beige: #f5efe6;
  --soft-green: #9a906e;
  --shadow: rgba(0, 0, 0, 0.2);
  --overlay: rgba(167, 121, 62, 0.1);
}

body {
  font-family:"Verdana","Helvetica","Arial",sans-serif;
  background-color: var(--light-beige);
  background-image: linear-gradient(rgba(167, 121, 62, 0.2), rgba(133, 96, 69, 0.3)), url('bg.jpg');
  background-attachment: fixed;
  color: var(--dark-rust);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--overlay) 0%,
    rgba(133, 96, 69, 0.15) 100%
  );
  z-index: -1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(to right, var(--rust), var(--warm-brown));
  color: white;
  padding: 20px 20px;
  text-align: center;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px var(--shadow);
  position: relative;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--muted-yellow), var(--olive-green));
}

nav {
  background: rgba(245, 239, 230, 0.95);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
}

nav a {
  color: var(--rust);
  text-decoration: none;
  zmargin: 0 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--rust), var(--muted-yellow));
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--dark-rust);
}

nav a:hover::after {
  width: 100%;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 239, 230, 0.95);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.nav-button {
  color: var(--rust);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 10px 20px;
  margin: 0 15px;
  border-radius: 6px;
  min-width: 50px;
  text-align: center;
}

.nav-button.active {
  background: linear-gradient(to right, var(--rust), var(--warm-brown));
  color: white;
  box-shadow: 0 2px 8px rgba(167, 121, 62, 0.3);
}

.nav-button.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--muted-yellow), var(--olive-green));
}

.nav-button.inactive {
  color: var(--soft-green);
  background: rgba(154, 144, 110, 0.3);
  cursor: not-allowed;
  box-shadow: none;
}

.nav-button:hover:not(.inactive) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(167, 121, 62, 0.2);
}

.nav-button.prev { text-align: center; }
.nav-button.next { text-align: center; }

main {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  position: relative;
  overflow: hidden;
}

.main a {
  color: var(--rust);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.main a:hover {
  color: var(--warm-brown);
  text-decoration: underline;
  transition: all 0.3s ease;
  transform: translateY(-2px);
}

.main a:visited {
  color: var(--soft-green);
}

.main a:active {
  color: var(--dark-rust);
  opacity: 0.8;
}

.main .text-justify {
  text-align: justify;
  zline-height: 1.6;
  margin-bottom: 15px;
}

.main .text-small-right {
  font-size: 0.85rem;
  text-align: right;
  white-space: nowrap;
  display: block;
  margin-top: 5px;
  color: var(--tan);
}

.main .text-quote {
  background: rgba(220, 220, 220, 0.15); /* Полупрозрачный серый фон (как в Telegram) */
  border-left: 3px solid var(--rust); /* Цветная полоса слева (подберите под палитру) */
  padding: 12px 16px; /* Отступы внутри блока */
  margin: 15px 0; /* Отступы снаружи блока */
  font-style: italic; /* Курсивный шрифт */
  color: var(--dark-text); /* Цвет текста */
  line-height: 1.5; /* Межстрочный интервал */
  border-radius: 0 4px 4px 0; /* Скругление углов справа */
  position: relative;
}

.main .text-quote::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 26px;
  color: var(--rust);
  position: absolute;
  left: -24px;
  top: 12px;
}

@media (max-width: 768px) {
  .main .text-quote {
    padding: 8px 12px;
    margin: 10px 0;
  }
}

@media (max-width: 768px) {
  .main a:hover {
    transform: none;
  }
}

.spoiler {
  background: rgba(0, 0, 0, 0.7);
  color: transparent;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}

.spoiler:hover {
  background: rgba(0, 0, 0, 0.6);
}

.spoiler.revealed {
  color: var(--dark-rust);
  background: var(--light-beige);
}

.logo-container {
  text-align: center;
  padding: 15px 0;
  width: 100%;
}

.logo-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .logo-image {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .logo-image {
    max-width: 80%;
    padding: 10px 0;
  }
}

.image-preview {
  text-align: center;
  margin: 20px 0;
  width: 99%;
}

.thumbnail {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px var(--shadow);
  height: auto;
  display: block;
  margin: 0 auto;
  border: 2px solid var(--tan);
  max-height: 400px;
  object-fit: cover;
}

.thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px var(--shadow);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(107, 65, 49, 0.9);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close:hover {
  color: var(--muted-yellow);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

footer {
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  background: linear-gradient(to right, var(--dark-rust), var(--rust));
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, var(--dark-rust), var(--rust));
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 30px;
}

.copyright {
	text-align: left;
  flex: 1;
}

.social-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  position: relative;
}

.social-btn:hover {
  transform: translateY(-2px);
}

.social-btn.telegram {
  background-color: rgba(36, 175, 219, 0.8);
}
.social-btn.telegram:hover {
  background-color: rgba(64, 196, 235, 0.9);
}

.social-btn.vkontakte {
  background-color: rgba(0, 120, 223, 0.8);
}
.social-btn.vkontakte:hover {
  background-color: rgba(0, 140, 245, 0.9);
}

.social-btn.max {
  background: linear-gradient(45deg, #4A90E2 0%, #6A5ACD 50%, #9B59D6 100%);
}
.social-btn.max:hover {
  background: linear-gradient(45deg, #5A9FD2 0%, #7A6ADD 50%, #AB69E6 100% );
}

.social-icon {
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}