/* =====================================================================
   Модальное окно «Скачать книгу» — общие стили для index.html и book.html
   ===================================================================== */

#dlOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  z-index: 200;
}
#dlOverlay.open { opacity: 1; pointer-events: auto; }

#dlModal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #1f1f1f;
  color: #e8e8e8;
  border-radius: 12px;
  padding: 28px 32px 32px;
  width: 480px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  font-family: system-ui, sans-serif;
}
#dlModal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
#dlModal header {
  display: flex; justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
#dlModal header h3 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ccc;
}
#dlClose {
  background: none; border: none;
  color: #ccc; font-size: 26px;
  cursor: pointer; padding: 0 6px;
  line-height: 1;
}
#dlClose:hover { color: #fff; }

#dlList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 18px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #e8e8e8;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: system-ui, sans-serif;
}
.dl-btn:hover {
  background: #7a5c3e;
  border-color: #7a5c3e;
  color: #fff;
}
.dl-btn:active { transform: scale(0.97); }
.dl-btn .fmt {
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.dl-btn .desc {
  font-size: 11px;
  opacity: 0.7;
  line-height: 1.3;
}
.dl-btn:hover .desc { opacity: 0.95; }

@media (max-width: 600px) {
  #dlList { grid-template-columns: 1fr; }
  #dlModal { padding: 22px 20px 24px; }
}