/* ========= БАЗА ========= */

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

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #3a2330;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 230, 248, 0.7), transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(255, 214, 230, 0.6), transparent 55%),
    linear-gradient(145deg, #2a0f1e 0%, #5d2742 40%, #f5d4df 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

/* Лёгкие "звёздочки" на фоне */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.3) 0, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.18) 0, transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

/* ========= ОБОЛОЧКА АЛЬБОМА ========= */

.album-shell {
  position: relative;
  max-width: 1200px;
  width: 100%;
  min-height: 680px;
  background: radial-gradient(circle at top, #ffeef7 0, #f8dde9 40%, #f3cadc 100%);
  border-radius: 32px;
  padding: 24px 28px 18px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

/* мягкая бумажная фактура */
.album-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 55%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Чтобы содержимое не перекрывалось псевдоэлементом */
.album-shell > * {
  position: relative;
  z-index: 1;
}

/* ========= HEADER ========= */

.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px 18px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    box-shadow: 0 0 35px rgba(255, 90, 255, 0.6);
    animation: pulse-glow 3s infinite ease-in-out;
}
@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px rgba(255, 0, 255, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(255, 100, 255, 0.9); transform: scale(1.04); }
    100% { box-shadow: 0 0 10px rgba(255, 0, 255, 0.5); transform: scale(1); }
}
.logo-star {
    position: absolute;
    color: #ffe4ff;
    font-size: 18px;
    animation: float-stars 5s infinite linear;
}
.star-1 { top: -10px; left: -12px; animation-delay: 0s; }
.star-2 { top: -4px; right: -16px; animation-delay: 1s; }
.star-3 { bottom: -6px; right: -8px; animation-delay: 2s; }

@keyframes float-stars {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-8px) rotate(10deg); opacity: 0.7; }
    100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}


/* лого-плитка */
.logo-wrap {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 10% 0%, #fffbff, #2b1024);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: logoPulse 4s ease-in-out infinite;
}

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

/* Летающие звёзды вокруг логотипа */

.logo-star {
  position: absolute;
  font-size: 18px;
  color: #ffe7ff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(255, 126, 214, 0.8);
  animation: starFloat 6s linear infinite;
}

.star-1 {
  top: -4px;
  right: 6px;
}

.star-2 {
  top: 18px;
  right: -6px;
  animation-delay: 1.2s;
}

.star-3 {
  top: -2px;
  left: 10px;
  animation-delay: 2.4s;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-main {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fef5fb;
  opacity: 0.9;
}

.brand-sub {
  font-size: 0.75rem;
  color: #f9d8ea;
  opacity: 0.8;
}

.album-title-block {
  text-align: right;
}

.album-title-block h1 {
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4c1f34;
}

.album-title-block p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #7f3957;
}

/* ========= MAIN LAYOUT ========= */

.album-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

/* SIDEBAR */

.sidebar {
  padding: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  position: relative;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 50%, #ffebf5, #c76a8f);
  color: #3f1430;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 4px 16px rgba(122, 26, 70, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  opacity: 0.8;
  transform: translateY(0);
  transition:
    opacity 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.nav-item::before {
  content: "❀";
  margin-right: 8px;
  font-size: 0.8rem;
}

.nav-item:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(122, 26, 70, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.nav-item.active {
  opacity: 1;
  background: linear-gradient(90deg, #ff9ac0, #f6c1ff);
  color: #2b0b1f;
}

/* PAGES WRAPPER */

.pages-wrapper {
  background: radial-gradient(circle at top, #fff7fb 0, #fdeaf4 40%, #f7d5e9 100%);
  border-radius: 28px;
  padding: 26px 30px 24px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 18px 40px rgba(134, 49, 79, 0.35);
  position: relative;
  overflow: hidden;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageFade 0.6s ease;
}

.page-inner {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Бейдж вверху страницы */

.page-badge {
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 50%, #fff9ff, #f3a8c9);
  color: #5b1735;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 5px 16px rgba(178, 58, 102, 0.3);
}

/* ФОТО */

.photo-frame {
  background: #fbf3f7;
  border-radius: 30px;
  padding: 10px;
  box-shadow:
    0 14px 30px rgba(128, 44, 80, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  max-width: 100%;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 24px;
}

/* Один большой кадр */

.photo-frame.single.big {
  max-width: 420px;
}

/* Один обычный кадр */

.photo-frame.single {
  max-width: 520px;
}

/* Подпись под фото */

.photo-frame figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #7c3b55;
  text-align: center;
}

/* Две фотографии в ряд */

.photos-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

/* Заголовки и текст */

.page-inner h2 {
  margin-top: 6px;
  font-size: 1.25rem;
  color: #531f34;
}

.page-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #5a283a;
  text-align: center;
  max-width: 620px;
}

/* THANK CARD */

.thank-card {
  max-width: 620px;
  padding: 26px 24px 22px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff7fb, #ffe3f1);
  box-shadow:
    0 14px 32px rgba(106, 18, 58, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  text-align: center;
}

.thank-card h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #5a1633;
}

.thank-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #663147;
  margin-bottom: 10px;
}

.thank-card .signature {
  margin-top: 4px;
  font-style: italic;
  color: #7f3c56;
}

/* ========= FOOTER ========= */

.album-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.pager-btn {
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #3c1325;
  cursor: pointer;
  background: linear-gradient(90deg, #ff9ec0, #f6c1ff);
  box-shadow:
    0 8px 22px rgba(115, 36, 73, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.pager-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 10px 28px rgba(115, 36, 73, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.page-counter {
  font-size: 0.9rem;
  color: #5f2440;
}

.album-meta {
  margin-top: 8px;
  text-align: center;
  font-size: 0.78rem;
  color: #7e3b58;
}

/* ========= АНИМАЦИИ ========= */

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoPulse {
  0%, 100% {
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.55),
      0 0 0 0 rgba(255, 145, 214, 0.0);
    transform: translateY(0) scale(1);
  }
  50% {
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.75),
      0 0 18px 6px rgba(255, 145, 214, 0.6);
    transform: translateY(-1px) scale(1.02);
  }
}

@keyframes starFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(14px, -18px) rotate(30deg);
    opacity: 0;
  }
}

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

@media (max-width: 960px) {
  .album-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .pages-wrapper {
    order: 1;
  }

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

  .album-title-block {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .album-shell {
    padding: 18px 14px 14px;
    border-radius: 20px;
  }

  .album-main {
    gap: 18px;
  }

  .pages-wrapper {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .photos-row {
    grid-template-columns: 1fr;
  }

  .photo-frame.single.big,
  .photo-frame.single {
    max-width: 100%;
  }

  .logo-wrap {
    width: 70px;
    height: 70px;
  }

  .album-title-block h1 {
    font-size: 1.1rem;
  }
}
