﻿* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Comic Sans MS", "Segoe UI", cursive, sans-serif;
  min-height: 100vh;
  background: url("../img/bg_desktop.png") no-repeat center center fixed;
  background-size: cover;
}

/* Сцена центрирует «доску» в свободной зоне фона */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh 14vw 16vh;   /* отступы под рамку десктопного фона */
}

.board {
  width: 100%;
  max-width: 820px;
  max-height: 72vh;
  overflow-y: auto;
  text-align: center;
  padding: 20px 28px;
  color: #4a3520;
}

.logo {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 4px solid #f5a623;
  box-shadow: 0 4px 0 #c77f00;
  margin-bottom: 10px;
}

h1 { font-size: 1.7rem; color: #5b21b6; margin-bottom: 12px;
     text-shadow: 1px 1px 0 #ffd66e; }
h2 { color: #7c3aed; margin: 10px 0; }
.sub { font-size: 1.05rem; margin: 10px 0 18px; }
.sub.big { font-size: 1.3rem; line-height: 1.6; }
.finish-emoji { font-size: 3rem; }

.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: linear-gradient(#ffc93c, #f5a623);
  color: #5a3a00;
  font-weight: bold; font-size: 1.05rem;
  padding: 12px 26px;
  border: 3px solid #b97800;
  border-radius: 30px;
  box-shadow: 0 5px 0 #b97800;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform .1s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b97800; }
.btn-alt { background: linear-gradient(#8ecdf7, #4aa3e0); color: #063a5e;
           border-color: #2a6d9e; box-shadow: 0 5px 0 #2a6d9e; }
.btn-small { padding: 4px 10px; border-radius: 10px; background: #ffd66e;
             border: 2px solid #b97800; text-decoration: none; cursor: pointer;
             font-family: inherit; }
.btn-danger { background: #ff9d9d; border-color: #b03030; }

.form { display: flex; flex-direction: column; gap: 12px; align-items: stretch;
        max-width: 460px; margin: 0 auto; text-align: left; }
.form label { font-weight: bold; display: flex; flex-direction: column; gap: 4px; }
.input {
  padding: 10px 14px;
  border: 3px solid #f5a623;
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fffdf5;
}
.input:focus { outline: none; border-color: #7c3aed; }
.input-small { width: 110px; }
.opt-line { flex-direction: row !important; align-items: center; gap: 10px; }
.opt-line .input { flex: 1; }

.progress { font-weight: bold; color: #2a6d9e; margin-bottom: 8px; }
.question-text { font-size: 1.35rem; line-height: 1.4; }
.q-image { max-width: 100%; max-height: 240px; border-radius: 14px;
           border: 4px solid #f5a623; margin: 10px 0; }

.options { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.option {
  display: flex; align-items: center; gap: 12px;
  background: #fff7e0;
  border: 3px solid #f5a623;
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background .15s, transform .1s;
}
.option:hover { background: #ffe9b3; transform: scale(1.02); }
.option input { width: 20px; height: 20px; accent-color: #7c3aed; }

.table { width: 100%; border-collapse: collapse; margin: 14px 0; background: #fffdf5;
         border-radius: 12px; overflow: hidden; }
.table th { background: #f5a623; color: #5a3a00; padding: 10px; }
.table td { padding: 8px 10px; border-bottom: 2px dashed #f0d9a8; }
.table tr.top1 td { background: #fff3c4; font-weight: bold; }

.flash { padding: 10px 16px; border-radius: 12px; margin-bottom: 10px; font-weight: bold; }
.flash-success { background: #d9f7d9; border: 2px solid #4caf50; color: #1b5e20; }
.flash-error, .flash-message { background: #ffe0e0; border: 2px solid #e05353; color: #7a1010; }

.logout-btn {
  position: fixed; top: 12px; right: 14px;
  background: #fffdf5; border: 3px solid #b97800; border-radius: 20px;
  padding: 6px 14px; font-weight: bold; color: #5a3a00; text-decoration: none;
  font-family: inherit;
}

/* ===== Мобильные устройства — вертикальный фон ===== */
@media (max-width: 820px) {
  body {
    background: url("../img/bg_mobile.png") no-repeat center center fixed;
    background-size: cover;
  }
  .stage { padding: 20vh 14vw 22vh; }   /* свободная зона мобильного фона */
  .board { max-height: 60vh; padding: 8px; }
  h1 { font-size: 1.3rem; }
  .question-text { font-size: 1.1rem; }
}
.actions { white-space: nowrap; }
.actions form { margin-left: 2px; }