/* Базовые стили */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #f9fbff;
  background: radial-gradient(circle at top, #182a4f 0%, #050816 55%, #020313 100%);
  min-height: 100vh;
}

/* Звёздное небо на фоне */
.star-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(2px 2px at 80% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(2px 2px at 40% 80%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 60% 10%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.4), transparent 60%);
  opacity: 0.9;
  animation: driftStars 60s linear infinite;
}

@keyframes driftStars {
  from { transform: translateY(0); }
  to   { transform: translateY(-200px); }
}

/* Оболочка альбома */
.album-shell {
  max-width: 1200px;
  margin: 24px auto 40px;
  padding: 20px 24px 28px;
  border-radius: 32px;
  background: radial-gradient(circle at top left, #244a7b 0%, #0b1631 50%, #070a16 90%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

/* лёгкое сияние вокруг карточки */
.album-shell::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: radial-gradient(circle at 20% -10%, rgba(112, 210, 255, 0.25), transparent 55%),
              radial-gradient(circle at 90% 110%, rgba(255, 180, 255, 0.22), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

/* Шапка */
.album-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 10px 18px;
}

/* Логотип */
.logo-area {
  position: relative;
  width: 90px;
  height: 90px;
}

.logo-wrap {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #050816;
  border: 1px solid #ffffff33;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 4s ease-in-out infinite;
  position: relative;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
}

/* свечение вокруг логотипа */
.logo-cloud {
  position: absolute;
  inset: -10px;
  border-radius: 32px;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.5), transparent 65%);
  filter: blur(6px);
  opacity: 0.85;
  pointer-events: none;
  animation: cloudFloat 6s ease-in-out infinite alternate;
}

.logo-stars {
  position: absolute;
  inset: -14px;
  pointer-events: none;
}

.logo-stars::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 20%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(2px 2px at 70% 30%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(2px 2px at 40% 80%, rgba(255, 255, 255, 0.6), transparent 55%);
  animation: spinStars 10s linear infinite;
  opacity: 0.85;
}

/* маленькая искра */
.logo-wrap::after {
  content: "✨";
  position: absolute;
  right: 4px;
  top: -4px;
  font-size: 1.1rem;
  animation: sparkle 2.8s ease-in-out infinite;
}

@keyframes logoPulse {
  0%   { transform: scale(1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8); }
  50%  { transform: scale(1.03); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95); }
  100% { transform: scale(1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8); }
}

@keyframes cloudFloat {
  from { transform: translateY(0); opacity: 0.8; }
  to   { transform: translateY(6px); opacity: 0.95; }
}

@keyframes spinStars {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes sparkle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.9; }
  50%      { transform: translateY(-2px) scale(1.15); opacity: 1; }
}

/* Заголовок альбома */
.album-title-block h1 {
  margin: 0 0 4px;
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdfdfd;
}

.album-title-block p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c0d8ff;
}

/* Основной блок */
.album-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 10px 6px 4px;
}

/* Навигация слева */
.album-nav {
  position: relative;
  padding: 18px 14px;
  border-radius: 26px;
  background: linear-gradient(160deg, #0e1a36 0%, #050816 90%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04),
              0 16px 30px rgba(0, 0, 0, 0.7);
}

#pageTabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pageTabs li {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #d0d9ff;
  cursor: pointer;
  background: linear-gradient(90deg, #101b3c 0%, #111827 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.75);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#pageTabs li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: radial-gradient(circle, #7cffe3 0%, #35b8ff 70%);
  opacity: 0.5;
}

#pageTabs li span {
  margin-left: 16px;
}

#pageTabs li:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(148, 227, 255, 0.4),
    0 16px 25px rgba(0, 0, 0, 0.9);
}

#pageTabs li.active {
  background: linear-gradient(90deg, #38bdf8 0%, #a855f7 60%, #ec4899 100%);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7),
    0 18px 35px rgba(15, 23, 42, 0.9);
}

#pageTabs li.active::before {
  background: radial-gradient(circle, #ffffff 0%, #facc15 70%);
  opacity: 1;
}

/* Декор зверята */
.nav-decor {
  position: absolute;
  bottom: 12px;
  left: 14px;
  display: flex;
  gap: 6px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.nav-decor span {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

/* Правая часть – страница */
.album-page {
  border-radius: 28px;
  background: radial-gradient(circle at top, #1b3259 0%, #050816 85%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 16px 30px rgba(0, 0, 0, 0.8);
  padding: 18px 20px 20px;
  overflow: hidden;
}

.page-inner {
  border-radius: 24px;
  background: radial-gradient(circle at top left, #e9f5ff 0%, #fdf5ef 35%, #f3f4ff 90%);
  box-shadow:
    0 22px 40px rgba(15, 23, 42, 0.3),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  padding: 28px 30px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transform-origin: left center;
}

/* 3D-эффект перелистывания */
.page-inner.turning {
  animation: pageTurn 0.6s ease;
}

@keyframes pageTurn {
  0%   { transform: perspective(1200px) rotateY(0deg); }
  50%  { transform: perspective(1200px) rotateY(-12deg); }
  100% { transform: perspective(1200px) rotateY(0deg); }
}

/* Рамка для фото */
.photo-frame {
  width: 100%;
  max-width: 720px;
  border-radius: 34px;
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.6), transparent 55%),
    #fefbf7;
  box-shadow:
    0 26px 45px rgba(15, 23, 42, 0.35),
    inset 0 0 0 1px rgba(148, 163, 184, 0.35);
  display: flex;
  gap: 14px;
  align-items: stretch;
  justify-content: center;
}

.photo-frame.single.big {
  justify-content: center;
}

.photo-frame.double {
  justify-content: space-between;
}

/* Отдельное фото */
.photo-slot {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-slot img {
  width: 100%;
  border-radius: 26px;
  object-fit: cover;
  background-color: #000;
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(148, 163, 184, 0.6);
}

/* Соотношение сторон для одиночного фото – чуть выше */
.photo-frame.single.big .photo-slot img {
  max-height: 520px;
}

/* Для двух фото – более вытянутые карточки */
.photo-frame.double .photo-slot img {
  aspect-ratio: 3 / 4;
}

/* Подпись под фото */
.photo-slot figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

/* Текст страницы */
.page-text {
  max-width: 720px;
  text-align: left;
  color: #111827;
}

.page-text h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: #111827;
}

.page-subtitle {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #4b5563;
}

.page-text p {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Нижняя панель */
.album-footer {
  margin-top: 18px;
  text-align: center;
  color: #d1e4ff;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.5), transparent 70%);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(148, 163, 184, 0.5);
}

.pager-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: radial-gradient(circle at top left, #4b5563 0%, #020617 80%);
  color: #e5e7eb;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pager-btn.primary {
  background: linear-gradient(90deg, #38bdf8 0%, #a855f7 50%, #ec4899 100%);
  color: #ffffff;
}

.pager-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.9);
}

.pager-indicator {
  font-size: 0.9rem;
  color: #e5e7eb;
}

.footer-note {
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 930px) {
  .album-main {
    grid-template-columns: 1fr;
  }

  .album-nav {
    order: -1;
  }
}

@media (max-width: 720px) {
  .album-shell {
    margin: 8px;
    padding: 14px 10px 18px;
  }

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

  .page-inner {
    padding: 20px 16px 18px;
  }

  .photo-frame {
    padding: 12px;
  }

  .photo-frame.double {
    flex-direction: column;
  }
}
