html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
              url('img/dark-background.jpg') no-repeat center center fixed;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #121212;
  color: #FFFFFF;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.wrapper {
  width: 90%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  animation: fadeIn 1s ease;
  position: relative; /* Важно для псевдоэлементов */
}

/* Растягиваем вертикальные рамки через псевдоэлементы */
.wrapper::before,
.wrapper::after {
  content: "";
  position: fixed; /* Фиксируем к экрану */
  top: 0;
  bottom: 0;
  width: 4px; /* толщина линий */
  background-color: #da582b; /* цвет линий */
  z-index: 0; /* под контентом */
}

.wrapper::before {
  left: calc(50% - 500px); /* Левый край */
}

.wrapper::after {
  right: calc(50% - 500px); /* Правый край */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1 {
  text-align: center;
  font-size: 32px;
  color: #FFCC00;
  margin-bottom: 20px;
}

#grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px 0;
}

/* Book Section */
.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

p {
  font-size: 1.2em;
  line-height: 1.6;
  text-align: center;
  margin: 20px 0;
  padding: 0 10px;
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  width: 100%;
}

figure img {
  width: 100%;
  max-width: 500px;
  height: 450px;
  object-fit: cover;
  border-radius: 8px;
  box-sizing: border-box;
}

/* Audio */
audio {
  margin: 20px 0;
  width: 100%;
  max-width: 400px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  width: 90%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px;
  box-sizing: border-box;
  align-items: center;
}

.choice {
  font-size: 1.2em;
  text-decoration: none;
  color: #FFFFFF;
  background-color: rgba(0, 51, 102, 0.7);
  border: 2px solid #FFCC00;
  padding: 12px 20px;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
  width: 300px;
  min-height: 60px;
  text-align: center;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice.one {
  background-color: rgba(0, 51, 102, 0.7);
}

.choice.two {
  background-color: rgba(102, 0, 102, 0.7);
}

.choice:hover {
  background-color: #FFCC00;
  color: #000;
}

.back-arrow {
  color: #5dade2;
  text-decoration: none;
  font-size: 1.1em;
  margin-bottom: 20px;
  display: inline-block;
}

.back-arrow:hover {
  text-decoration: underline;
}

/* About */
.about-button {
  position: absolute;
  top: 20px;
  right: 30px;
  background-color: rgba(0, 102, 51, 0.7); /* темно-зелёный фон */
  color: #fff;
  padding: 8px 14px; /* меньше чем обычные кнопки */
  font-size: 0.9em; /* чуть меньше шрифт */
  border: 2px solid #FFCC00;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
  z-index: 1000; /* чтобы кнопка была поверх всего */
}

.about-button:hover {
  background-color: #FFCC00;
  color: #000;
}

/* Footer */
.footer {
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 0.9em;
}

/* === Responsive (for mobile) === */
@media only screen and (max-width: 800px) {
  #grid-container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .choice {
    font-size: 1em;
    padding: 10px 16px;
    width: 90%;
  }

  figure img {
    height: 200px; 
  }

  .about-button {
    top: 15px;
    right: 20px;
    padding: 6px 12px;
    font-size: 0.8em;
  }

  /* Пересчитываем позиции линий для мобильных */
  .wrapper::before {
    left: 5px;
  }
  
  .wrapper::after {
    right: 5px;
  }
}