* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  width:100%; height:100%;
  font-family:'Cormorant Garamond', serif;
  color:#fff;
  overflow:hidden;
}

/* ==== ФОН ==== */
body::before {
  content:""; position:fixed; inset:0;
  background:url('images/1.jpg') center/cover no-repeat;
  filter:blur(6px); transform:scale(1.05); z-index:-2;
}
body::after {
  content:""; position:fixed; inset:0;
  background:rgba(0,0,0,0.45); z-index:-1;
}

/* ==== ОБЩИЕ ЭКРАНЫ ==== */
.screen {
  position:fixed; inset:0;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  text-align:center;
  opacity:0; visibility:hidden;
  transition: opacity 1.5s ease, visibility 1.5s ease;
}
.screen.active { opacity:1; visibility:visible; display:flex; }

/* ==== ПЕРВЫЙ ЭКРАН ==== */
.greeting {
  font-size:2.6rem; margin-bottom:3rem;
  text-shadow:0 0 15px rgba(0,0,0,0.6);
  opacity:0; animation:fadeInUp 1.4s ease forwards;
}
.start-btn {
  background: rgba(255,255,255,0.25);
  border:2px solid #fff; color:#fff;
  padding:18px 50px; font-size:1.4rem;
  border-radius:50px; cursor:pointer;
  backdrop-filter: blur(6px);
  opacity:0; animation:fadeIn 1.6s ease 2s forwards;
  transition:background .3s ease;
}
.start-btn:hover { background: rgba(255,255,255,0.4); }
.bottom-text {
  position:absolute; bottom:40px; left:50%;
  transform:translateX(-50%);
  font-size:1.3rem; font-style:italic;
  opacity:0; animation:fadeIn 2s ease 1s forwards;
  white-space:nowrap;
}

/* ==== ВТОРОЙ ЭКРАН ==== */
#screen-2 {
  background: radial-gradient(circle at top left, #ffffff, #f3f6ff);
  flex-direction:column;
}
#circle-video {
  width:320px; height:320px;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 0 40px rgba(42,63,128,0.6);
  opacity:0; animation:fadeIn 1.2s ease .5s forwards;
}
.next-btn {
  background: rgba(42,63,128,0.85);
  border:2px solid #fff; color:#fff;
  padding:14px 46px; font-size:1.2rem;
  border-radius:50px; cursor:pointer; margin-top:40px;
  opacity:0; transition:opacity 1.5s ease, background .3s ease;
}
.next-btn.show { opacity:1; }
.next-btn:hover { background:rgba(42,63,128,1); }

/* ==== ВИКТОРИНА ==== */
.quiz-screen {
  background: radial-gradient(circle at bottom right, #ffffff, #f3f6ff);
  justify-content:center;
}
.quiz-container {
  width:90%; max-width:460px;
  background:rgba(42,63,128,0.9);
  padding:40px 28px;
  border-radius:18px;
  box-shadow:0 0 25px rgba(0,0,0,0.3);
  color:#fff;
  opacity:0; transition:opacity 1s ease;
}
.quiz-container.fade-in { opacity:1; }
.quiz-container.fade-out { opacity:0; }

.progress {
  font-size:1.2rem;
  color:#fff;
  border:1.5px solid rgba(255,255,255,0.7);
  padding:6px 14px;
  border-radius:30px;
  display:inline-block;
  position: relative;
  top: -25px; /* поднято выше */
}
.progress-bar-container {
  width:100%; height:6px;
  background:rgba(255,255,255,0.25);
  border-radius:3px; overflow:hidden; margin-bottom:25px;
}
.progress-bar {
  width:0%; height:100%;
  background:linear-gradient(90deg, #8be5ff, #3b9fff);
  border-radius:3px; transition:width 0.5s ease;
}

#question {
  font-size:1.7rem; margin-bottom:20px;
  text-shadow:0 0 10px rgba(0,0,0,0.3);
}
.answers {
  display:flex; flex-direction:column; align-items:center; gap:14px;
}
.answer-btn {
  width:90%; padding:12px; font-size:1.2rem;
  border-radius:10px;
  border:2px solid rgba(255,255,255,0.3);
  background:rgba(255,255,255,0.12);
  color:#fff; cursor:pointer;
  transition:all .25s ease;
}
.answer-btn:hover {
  background:rgba(255,255,255,0.25);
  transform:scale(1.02);
}
.answer-btn.correct {
  background:rgba(100,255,100,0.3);
}

/* ==== МОДАЛКА ==== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  pointer-events: none;
}
.quiz-screen .modal.show {
  display: flex;
  pointer-events: auto;
}
.modal-content {
  background: rgba(42,63,128,0.95);
  color: #fff;
  padding: 20px 24px;
  border-radius: 14px;
  max-width: 320px;
  width: 85%;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.3);
  font-size: 1.1rem;
  transform: scale(0.95);
  opacity: 0;
  animation: fadeModal 0.4s ease forwards;
}
#modal-btn {
  margin-top: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 10px 26px;
  border-radius: 50px;
  color: #fff;
  cursor: pointer;
  transition: background .3s ease;
}
#modal-btn:hover {
  background: rgba(255,255,255,0.4);
}
@keyframes fadeModal {
  to { opacity: 1; transform: scale(1); }
}

/* ==== КОНЕЦ ВИКТОРИНЫ ==== */
.quiz-finish {
  display:none; flex-direction:column;
  justify-content:center; align-items:center;
  text-align:center; opacity:0;
  transition:opacity 1.5s ease;
  background: radial-gradient(circle at bottom right, #ffffff, #f3f6ff);
}
.quiz-finish.active { display:flex; opacity:1; cursor:pointer; }
.quiz-finish-content {
  background:rgba(42,63,128,0.9);
  padding:24px 26px;
  border-radius:18px;
  max-width:380px;
  line-height:1.4;
  color:#fff;
  box-shadow:0 0 20px rgba(0,0,0,0.25);
  text-align:center;
}
.quiz-finish-content h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.quiz-line1 {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 2px; /* чуть уменьшили */
}

.quiz-line2 {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 18px; /* добавили больше отступа перед "Коснись экрана" */
}

.quiz-finish-content p {
  font-size: 1rem;
  margin-top: 10px;
  opacity: 0.9;
}

/* ==== ФИНАЛЬНЫЙ ЭКРАН ==== */
.final-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity 1.5s ease;
  background: url('images/1.jpg') center/cover no-repeat;
}
.final-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}
.final-screen.active { opacity: 1; }

.final-message {
  position: relative;
  z-index: 1;
  max-width: 320px;
  padding: 20px;
}
.final-message h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-shadow: 0 0 15px rgba(0,0,0,0.4);
}
.final-message p {
  font-size: 1.2rem;
  line-height: 1.5;
  opacity: 0.95;
  text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.restart-btn {
  margin-top: 24px;
  padding: 12px 40px;
  border-radius: 50px;
  border: 2px solid #fff;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  transition: background .3s ease;
  position: relative;
  z-index: 1;
}
.restart-btn:hover { background: rgba(255,255,255,0.3); }

/* ==== ПЯТЫЙ ЭКРАН ==== */
#screen-5 {
  position:fixed; inset:0;
  display:flex; justify-content:center; align-items:center;
  background:url('images/1.jpg') center/cover no-repeat;
  opacity:0; transition:opacity 1.5s ease;
}
#screen-5.active { opacity:1; }
#screen-5::after {
  content:""; position:absolute; inset:0;
  background:rgba(0,0,0,0.45); z-index:-1;
}
#final-video {
  width:90%; max-width:420px;
  border-radius:14px;
  box-shadow:0 0 30px rgba(255,255,255,0.3);
  position:relative; z-index:1;
}

/* ==== АНИМАЦИИ ==== */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(40px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
