/* ===== ОБЩЕЕ ОФОРМЛЕНИЕ САЙТА ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #2d1345;
  background: radial-gradient(circle at 10% 0%, #ffe0ff 0, #f3c6ff 25%, #d58cff 55%, #b069ff 85%, #7d4cff 100%);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* чтобы альбом по центру, но с отступами */
.album-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== ШАПКА ===== */
.album-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Плашка с логотипом */
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff 0%, #f9eafe 35%, #7c3aed 100%);
  box-shadow: 0 10px 25px rgba(45, 19, 69, 0.35);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.brand-pill::before {
  /* легкий шиммер */
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.75), transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.35), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
  animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-10%) translateY(-5%);
  }
  50% {
    transform: translateX(10%) translateY(5%);
  }
  100% {
    transform: translateX(-10%) translateY(-5%);
  }
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(119, 51, 255, 0.5);
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #26113f;
  font-weight: 600;
}

/* Переключатель языка */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.lang-label {
  font-size: 13px;
  color: #fdf6ff;
}

.lang-btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: #fdf6ff;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lang-btn.active {
  background: linear-gradient(135deg, #ff8af5, #c94dff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(116, 36, 146, 0.6);
}

/* ===== ГЛАВНЫЙ БЛОК АЛЬБОМА ===== */

.album-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 10px 0 6px;
}

/* Кнопки перелистывания */
.nav-btn {
  border: none;
  background: rgba(255, 255, 255, 0.35);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: center;
  margin: 0 4px;
  box-shadow: 0 6px 16px rgba(80, 23, 130, 0.45);
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-btn span {
  font-size: 22px;
  color: #5a258f;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(80, 23, 130, 0.7);
  background: rgba(255, 255, 255, 0.9);
}

/* Сама страница альбома */
.page {
  position: relative;
  flex: 1;
  max-width: 880px;
  margin: 0 6px;
  border-radius: 36px;
  padding: 18px;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 236, 255, 0.45), transparent 60%),
    linear-gradient(145deg, #f7daff 0%, #f3c3ff 45%, #f8dfff 75%, #f2c4ff 100%);
  box-shadow:
    0 22px 45px rgba(52, 10, 99, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

/* легкое свечение для обложки */
.page-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(255, 178, 255, 0.65), transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.9;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* внутри – сама "страница", чуть меньшая, чтобы был отступ */
.page-inner {
  position: relative;
  z-index: 1;
  border-radius: 30px;
  padding: 20px;
  background: linear-gradient(145deg, #fff7ff 0%, #fcecff 50%, #ffeefe 100%);
  box-shadow:
    0 18px 40px rgba(78, 21, 126, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 16px 32px rgba(255, 255, 255, 0.55);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 28px;
}

/* для внутренних страниц уменьшаем свечение */
.page:not(.page--cover) .page-glow {
  opacity: 0.4;
}

/* ===== Фото ===== */

.page-image {
  border-radius: 26px;
  padding: 12px;
  background: radial-gradient(circle at 10% 0, #ffffff 0, #f4eaff 40%, #f7e2ff 70%, #f0cffc 100%);
  box-shadow:
    0 18px 36px rgba(65, 21, 112, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-image img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  display: block;
  object-fit: cover;
  box-shadow:
    0 14px 30px rgba(33, 11, 66, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.95);
  /* убираем "туман": никаких фильтров! */
  filter: none;
}

/* ===== Текст страницы ===== */

.page-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding-inline: 6px;
}

.page-tag {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b55add;
  margin: 0 0 4px;
}

.page-sheet {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c98ae7;
  margin: 0 0 4px;
}

.page-title {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.25;
  color: #3a1458;
}

.page-meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: #a36fbe;
}

.page-desc {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.6;
  color: #392041;
}

.page-note {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #b471d0;
  font-style: italic;
}

/* ===== АНИМАЦИЯ ПЕРЕЛИСТЫВАНИЯ ===== */

.page {
  transform-origin: 0 50%;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.page.turn-right {
  animation: pageTurnRight 0.6s ease forwards;
}

.page.turn-left {
  animation: pageTurnLeft 0.6s ease forwards;
}

@keyframes pageTurnRight {
  0% {
    transform: perspective(1600px) rotateY(0deg) translateX(0);
  }
  45% {
    transform: perspective(1600px) rotateY(-18deg) translateX(-12px);
    box-shadow: 0 26px 55px rgba(38, 9, 77, 0.85);
  }
  100% {
    transform: perspective(1600px) rotateY(0deg) translateX(0);
    box-shadow: 0 22px 45px rgba(52, 10, 99, 0.65);
  }
}

@keyframes pageTurnLeft {
  0% {
    transform: perspective(1600px) rotateY(0deg) translateX(0);
  }
  45% {
    transform: perspective(1600px) rotateY(18deg) translateX(12px);
    box-shadow: 0 26px 55px rgba(38, 9, 77, 0.85);
  }
  100% {
    transform: perspective(1600px) rotateY(0deg) translateX(0);
    box-shadow: 0 22px 45px rgba(52, 10, 99, 0.65);
  }
}

/* ===== НИЗ ===== */

.album-footer {
  text-align: center;
  font-size: 12px;
  color: #f7e9ff;
  text-shadow: 0 1px 3px rgba(25, 4, 52, 0.75);
}

/* ===== АДАПТИВ ===== */

@media (max-width: 900px) {
  .page-inner {
    grid-template-columns: 1fr;
  }

  .page-image {
    order: -1;
  }
}

@media (max-width: 640px) {
  .album-wrapper {
    padding-inline: 8px;
  }

  .album-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page {
    border-radius: 30px;
    padding: 12px;
  }

  .page-inner {
    border-radius: 24px;
    padding: 14px;
  }

  .page-title {
    font-size: 22px;
  }

  .page-desc,
  .page-note {
    font-size: 14px;
  }

  .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }

  .nav-btn-left {
    left: 4px;
  }

  .nav-btn-right {
    right: 4px;
  }
}
