/* Базовые настройки для точного расчета размеров */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px 10px;
  background-color: #0b1d33;
  /* Атмосферный обойный градиент в стиле Windows 7 */
  background-image: 
    radial-gradient(ellipse at 50% 30%, rgba(56, 131, 219, 0.45) 0%, rgba(10, 32, 61, 0.85) 75%),
    linear-gradient(180deg, #0f2b48 0%, #050d1a 100%);
  background-attachment: fixed;
  color: #1a2a3a;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

/* Основной контейнер — Окно Aero Glass */
.site {
  width: 760px;
  max-width: 100%;
  margin: 0 auto;
  
  /* Эффект матового стекла Aero */
  background: rgba(200, 225, 255, 0.45);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  
  /* Двойная объёмная рамка окна Windows 7 */
  border: 1px solid rgba(255, 255, 255, 0.6);
  outline: 1px solid rgba(15, 45, 80, 0.5);
  border-radius: 8px 8px 5px 5px;
  
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

/* Шапка (Заголовок окна Aero) */
header {
  padding: 20px;
  text-align: center;
  /* Характерный стеклянный градиент с бликом по центру */
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.65) 0%, 
    rgba(210, 235, 255, 0.3) 45%, 
    rgba(140, 190, 240, 0.2) 50%, 
    rgba(180, 215, 255, 0.45) 100%
  );
  border-bottom: 1px solid rgba(100, 150, 200, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.logo {
  color: #0d2840;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  /* Белое свечение Aero под текстом */
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 5px rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.subtitle {
  margin-top: 4px;
  color: #2c4a6f;
  font-size: 11px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Меню — Глянцевые кнопки Aero */
nav {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav a {
  display: inline-block;
  padding: 5px 14px;
  color: #1e395b;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  
  /* Объёмный стеклянный градиент */
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.8) 0%, 
    rgba(230, 242, 255, 0.5) 48%, 
    rgba(190, 220, 250, 0.5) 52%, 
    rgba(220, 238, 255, 0.8) 100%
  );
  border: 1px solid rgba(60, 115, 175, 0.6);
  border-radius: 4px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease-in-out;
}

nav a:hover {
  color: #001a38;
  /* Неоновое голубое свечение при наведении */
  background: linear-gradient(
    180deg, 
    rgba(235, 245, 255, 0.95) 0%, 
    rgba(180, 220, 255, 0.8) 48%, 
    rgba(130, 190, 255, 0.8) 52%, 
    rgba(200, 230, 255, 0.95) 100%
  );
  border-color: #3182ce;
  box-shadow: 
    0 0 8px rgba(66, 153, 225, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Заголовок страницы */
.page-title {
  margin: 20px 20px 12px;
  padding: 8px 12px;
  text-align: center;
  color: #0f2c59;
  font-size: 16px;
  font-weight: 700;
  
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.7) 0%, 
    rgba(215, 233, 252, 0.6) 100%
  );
  border: 1px solid rgba(120, 170, 220, 0.6);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.page-title span {
  color: #1d63b8;
}

.center {
  text-align: center;
}

/* Основной белый клиентский блок Windows (Client Area) */
.content-box {
  margin: 16px 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(100, 145, 190, 0.5);
  border-radius: 4px;
  color: #222222;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.content-box p {
  margin-top: 0;
  margin-bottom: 12px;
  text-indent: 15px;
}

.content-box p:last-child {
  margin-bottom: 0;
}

.content-box b {
  color: #0f4c81;
}

.content-box i {
  color: #4a5568;
}

/* Разделитель */
hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 150, 200, 0.5), transparent);
  margin: 20px 0;
}

/* Статус — Виджет в стиле Vista/7 */
.status {
  width: fit-content;
  margin: 16px auto;
  padding: 5px 16px;
  color: #125225;
  background: linear-gradient(
    180deg, 
    rgba(225, 250, 230, 0.9) 0%, 
    rgba(180, 235, 195, 0.7) 100%
  );
  border: 1px solid #52b774;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 6px rgba(72, 187, 120, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Строительство */
.under-construction {
  margin: 20px auto;
  text-align: center;
  color: #744210;
  background: linear-gradient(180deg, rgba(254, 240, 138, 0.8) 0%, rgba(253, 224, 71, 0.5) 100%);
  border: 1px solid #eab308;
  padding: 6px 12px;
  border-radius: 4px;
  width: fit-content;
  font-weight: 600;
  font-size: 11px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Подвал */
footer {
  padding: 14px;
  text-align: center;
  background: rgba(15, 35, 60, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  color: #1e3a5f;
  font-size: 11px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.footer-small {
  margin-top: 4px;
  color: #3b5998;
}

/* Переключатель языка */
.language {
  margin-top: 10px;
  font-size: 11px;
}

.language a {
  color: #1d528d;
  text-decoration: none;
  font-weight: 600;
  margin: 0 4px;
}

.language a:hover {
  color: #002b5c;
  text-decoration: underline;
}

/* История правок */
.updates {
  margin: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(100, 145, 190, 0.5);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.updates-title {
  padding: 8px 12px;
  text-align: center;
  color: #0f2c59;
  font-weight: 700;
  background: linear-gradient(
    180deg, 
    rgba(240, 248, 255, 0.9) 0%, 
    rgba(205, 225, 245, 0.8) 100%
  );
  border-bottom: 1px solid rgba(120, 165, 210, 0.5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.update {
  padding: 14px;
  font-size: 12px;
  color: #222;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.date {
  color: #1a528e;
  font-weight: 700;
}

.version {
  margin-left: 6px;
  padding: 1px 6px;
  color: #0f3661;
  background: linear-gradient(180deg, #e6f0fa 0%, #c5dcf2 100%);
  border: 1px solid #8cb4db;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.update ul {
  margin-top: 6px;
  margin-bottom: 0;
  padding-left: 20px;
}

.update li {
  margin-bottom: 3px;
}

/* Блог */
.blog-post {
  margin: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(100, 145, 190, 0.5);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.blog-post-title {
  padding: 10px 14px;
  color: #0f2c59;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(
    180deg, 
    rgba(240, 248, 255, 0.9) 0%, 
    rgba(205, 225, 245, 0.8) 100%
  );
  border-bottom: 1px solid rgba(120, 165, 210, 0.5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.blog-post-date {
  padding: 4px 14px;
  color: #556b82;
  font-size: 10px;
  background: rgba(230, 240, 250, 0.5);
  border-bottom: 1px solid rgba(160, 190, 220, 0.4);
}

.blog-post-content {
  padding: 14px;
  color: #222222;
  line-height: 1.6;
}

.blog-post-content p {
  margin-top: 0;
  margin-bottom: 12px;
  text-indent: 15px;
}

.blog-post-content p:last-child {
  margin-bottom: 0;
}
/* Пагинация в стиле Windows 7 Aero Glass */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.page-btn {
  padding: 5px 12px;
  color: #1e395b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  
  /* Объёмный стеклянный градиент Aero */
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.8) 0%, 
    rgba(230, 242, 255, 0.5) 48%, 
    rgba(190, 220, 250, 0.5) 52%, 
    rgba(220, 238, 255, 0.8) 100%
  );
  border: 1px solid rgba(60, 115, 175, 0.6);
  border-radius: 4px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease-in-out;
}

.page-btn:hover {
  color: #001a38;
  /* Голубое свечение Aero при наведении */
  background: linear-gradient(
    180deg, 
    rgba(235, 245, 255, 0.95) 0%, 
    rgba(180, 220, 255, 0.8) 48%, 
    rgba(130, 190, 255, 0.8) 52%, 
    rgba(200, 230, 255, 0.95) 100%
  );
  border-color: #3182ce;
  box-shadow: 
    0 0 8px rgba(66, 153, 225, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Активная (выбранная) страница */
.page-btn.active {
  color: #ffffff;
  background: linear-gradient(
    180deg, 
    #4299e1 0%, 
    #3182ce 50%, 
    #2b6cb0 100%
  );
  border-color: #1a4971;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 8px rgba(49, 130, 206, 0.6);
}
/* Адаптивные картинки для постов блога */
.blog-image {
  display: block;
  max-width: 100%;       /* Картинка никогда не вылезет за пределы блока */
  height: auto;          /* Сохраняет пропорции */
  margin: 12px auto;     /* Выравнивание по центру и отступы сверху/снизу */
  border-radius: 4px;    /* Закругление углов */
  border: 1px solid rgba(100, 145, 190, 0.5); /* Нежная рамка Aero */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Лёгкая тень */
}
/* Сетка для книжной полки */
.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 15px;
  background: #2a1a15; /* Тёмно-коричневый фон деревянной полки */
  padding: 20px;
  border-radius: 8px;
  border: 4px solid #4a2e22;
  box-shadow: inset 0 0 10px #000;
}

/* Обложка книги */
.book-item {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.5);
  display: block;
}

.book-item:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 15px rgba(0,0,0,0.7);
}

/* Модальное окно обзора */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  max-width: 500px;
  margin: 10% auto;
  padding: 20px;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
/* Модальное окно */
.modal {
  display: none; /* Обязательно скрываем по умолчанию */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  max-width: 500px;
  margin: 10% auto;
  padding: 20px;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Сетка для книг */
.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  padding: 15px;
}

.book-item {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.book-item:hover {
  transform: scale(1.05);
}

.book-item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
}