/* ===== rules.css — ВЕРНУЛИ ТВОЙ КРАСИВЫЙ ТЁМНЫЙ ФОН ===== */
body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: #f5f5f5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;

  /* ← ВЕРНУЛИ ТВОЙ ОРИГИНАЛЬНЫЙ ФОН */
  background: 
    linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)),
    url("../images/bg-pattern.jpg") center/cover fixed;
  background-attachment: fixed;
}

/* Твои старые крутые искры — полностью возвращаем */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,215,0,0.12) 1px, transparent 3px),
    radial-gradient(circle at 80% 20%, rgba(255,215,0,0.15) 1.5px, transparent 4px),
    radial-gradient(circle at 50% 50%, rgba(255,215,0,0.08) 1px, transparent 3px);
  background-size: 150px 150px, 200px 200px, 180px 180px;
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle, rgba(255,215,0,0.18) 1px, transparent 3px),
    radial-gradient(circle, rgba(255,215,0,0.22) 1.2px, transparent 3px);
  background-size: 100px 100px, 140px 140px;
  opacity: 0.3;
  animation: spark 15s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(1deg); }
}
@keyframes spark {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 300px 600px, -300px -300px; }
}

/* ===== НОВАЯ ЕДИНАЯ ШАПКА (адаптивная) ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 18px 20px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,215,0,0.25);
  z-index: 1000;
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 20px;
  padding: 0 10px;
}
.logo h1 {
  font-size: 26px;
  color: #ffd700;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255,215,0,0.4);
}
.nav-buttons { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.nav-btn {
  color: #f5f5f5;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 22px;
  border: 1.5px solid rgba(255,215,0,0.3);
  border-radius: 50px;
  transition: .3s;
}
.nav-btn:hover, .nav-btn.active {
  background: rgba(255,215,0,0.15);
  border-color: #ffd700;
  color: #fff;
  box-shadow: 0 0 20px rgba(255,215,0,0.4);
}
@media (max-width: 950px) {
  .nav-btn { padding: 8px 16px; font-size: 15px; }
  .logo h1 { font-size: 23px; }
}
@media (max-width: 700px) {
  .header-content { flex-direction: column; text-align: center; }
  .nav-buttons { order: -1; margin-bottom: 8px; }
}

/* Заголовок страницы */
.page-title {
  text-align: center;
  padding: 140px 20px 50px;
}
.page-title h2 {
  font-size: 48px;
  color: #f8e08e;
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
}
.page-title p {
  font-size: 22px;
  color: #d1c79a;
  max-width: 800px;
  margin: 20px auto 0;
}

/* PDF-рамка — оставляем твою красивую */
.pdf-container {
  display: flex;
  justify-content: center;
  padding: 20px 20px 100px;
}
.book-frame {
  width: 88vw;
  height: 82vh;
  max-width: 980px;
  max-height: 740px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 
    0 0 40px rgba(255, 215, 0, 0.22),
    0 0 80px rgba(255, 215, 0, 0.12),
    inset 0 0 30px rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(8px);
}
.book-frame:hover {
  transform: scale(1.015);
  box-shadow: 0 0 55px rgba(255, 215, 0, 0.35), 0 0 100px rgba(255, 215, 0, 0.18);
}
.book-view { width: 100%; height: 100%; border: none; }

/* Футер */
footer {
  text-align: center;
  padding: 40px 20px;
  background: rgba(10,10,10,0.92);
  border-top: 1px solid rgba(255,215,0,0.25);
  backdrop-filter: blur(10px);
}
.back-btn {
  color: #f8e08e;
  font-size: 18px;
  text-decoration: none;
  font-weight: 600;
}
.back-btn:hover { color: #fff; }

@media (max-width: 768px) {
  .book-frame { height: 68vh; }
  .page-title h2 { font-size: 38px; }
}