/* ===== screens.css — стартовый экран, карта, финал ===== */

/* ---- Стартовый экран ---- */
#screen-start {
  background-image:
    linear-gradient(180deg, rgba(26,29,41,.85) 0%, rgba(26,29,41,.95) 100%),
    url('../img/minecraft/main-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: clamp(16px, 4vh, 40px) 16px 40px;
  text-align: center;
  overflow-y: auto;
  gap: clamp(8px, 1.5vh, 14px);
}
#screen-start.active { display: flex; }

.start-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.start-prof-img, .start-noob-img {
  width: clamp(60px, 9vw, 104px);
  height: clamp(60px, 9vw, 104px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--rb-yellow);
  box-shadow: 0 0 0 2px rgba(0,0,0,.5);
  animation: floatBob 3s ease-in-out infinite;
}
.start-noob-img { animation-delay: 1.5s; animation-direction: reverse; }
.start-hero-text { text-align: center; }
.start-logo {
  font-size: clamp(26px, 5.2vw, 54px);
  font-weight: 900;
  color: var(--rb-yellow);
  text-shadow: 3px 3px 0 #000, 0 0 20px rgba(255,215,0,.5);
  letter-spacing: -1px;
  line-height: 1.1;
}
.start-sub {
  font-size: clamp(13px, 2.2vw, 19px);
  color: var(--rb-gray-l);
  margin-top: 4px;
  font-weight: 600;
}
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.start-card {
  background: linear-gradient(180deg, rgba(37, 41, 56, .95), rgba(26, 29, 41, .95));
  backdrop-filter: blur(12px);
  border: 3px solid var(--rb-yellow);
  border-radius: var(--rb-radius-l);
  padding: clamp(18px, 3vw, 30px) clamp(16px, 3.5vw, 34px);
  max-width: 700px;
  width: 100%;
  box-shadow: var(--rb-shadow), 0 0 0 4px rgba(255,215,0,.08), inset 0 1px 0 rgba(255,255,255,.08);
}
.start-badge {
  display: inline-block;
  background: linear-gradient(180deg, var(--rb-purple), #6C3483);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  border: 2px solid rgba(255,255,255,.15);
  box-shadow: var(--rb-shadow-l);
}
.start-intro {
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.5;
  color: var(--rb-light);
  margin-bottom: 14px;
}
.grade-label {
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 800;
  color: var(--rb-yellow);
  margin-bottom: 8px;
  text-align: left;
}
.grade-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(4px, 1vw, 8px);
  margin-bottom: 14px;
}
.grade-btn {
  padding: 8px 2px;
  background: linear-gradient(180deg, var(--rb-dark-3), var(--rb-dark-2));
  border: 2px solid transparent;
  border-radius: var(--rb-radius);
  font-weight: 800;
  color: #fff;
  transition: all .12s;
  min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  cursor: pointer;
  box-shadow: var(--rb-shadow-l);
}
.grade-btn .grade-num { font-size: clamp(18px, 2.2vw, 24px); line-height: 1; }
.grade-btn .grade-word { font-size: clamp(10px, 1.2vw, 12px); font-weight: 600; color: var(--rb-gray-l); margin-top: 2px; }
.grade-btn:hover { transform: translateY(-2px); background: linear-gradient(180deg, var(--rb-gray), var(--rb-dark-3)); }
.grade-btn.active {
  background: linear-gradient(180deg, #00C961, var(--rb-green));
  border-color: var(--rb-yellow);
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0,166,81,.4), var(--rb-shadow);
}
.grade-btn.active .grade-word { color: rgba(255,255,255,.9); }

.student-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.student-input {
  flex: 1;
  padding: clamp(12px, 1.6vw, 16px) 16px;
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 600;
  background: var(--rb-dark);
  border: 2px solid var(--rb-dark-3);
  border-radius: var(--rb-radius);
  color: #fff;
  transition: border-color .15s;
  font-family: inherit;
}
.student-input:focus { outline: none; border-color: var(--rb-yellow); }
.student-input::placeholder { color: var(--rb-gray-l); }
.btn-add-student {
  width: clamp(48px, 5vw, 56px);
  height: clamp(48px, 5vw, 56px);
  background: linear-gradient(180deg, #00C961, var(--rb-green));
  border: 2px solid rgba(0,0,0,.2);
  border-radius: var(--rb-radius);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--rb-shadow-l);
  transition: transform .08s;
  flex-shrink: 0;
}
.btn-add-student:active { transform: translateY(2px); box-shadow: none; }

.students-setup {
  min-height: 34px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}
.students-empty {
  color: var(--rb-gray-l);
  font-size: 13px;
  font-style: italic;
  padding: 5px 0;
  width: 100%;
  text-align: center;
}
.student-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, var(--rb-blue), var(--rb-blue-d));
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 16px;
  padding: 5px 8px 5px 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--rb-shadow-l);
  animation: toastIn .25s;
}
.student-chip-name { color: #fff; }
.student-chip-remove {
  width: 18px;
  height: 18px;
  background: rgba(0,0,0,.3);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.student-chip-remove:hover { background: var(--rb-red); }

.score-rules {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}
.score-rules .plus { color: var(--rb-green); }
.score-rules .minus { color: var(--rb-red); }

.btn-start-lesson {
  display: block;
  width: 100%;
  padding: clamp(14px, 2vh, 19px);
  background: linear-gradient(180deg, #FFE040, var(--rb-yellow));
  color: #1a1d29;
  border: 3px solid rgba(0,0,0,.2);
  border-radius: var(--rb-radius);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--rb-shadow), inset 0 -4px 0 rgba(0,0,0,.2);
  transition: transform .08s;
  position: relative;
  overflow: hidden;
}
.btn-start-lesson::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transition: left .6s;
}
.btn-start-lesson:hover::before { left: 100%; }
.btn-start-lesson:hover { filter: brightness(1.05); }
.btn-start-lesson:active { transform: translateY(3px); box-shadow: var(--rb-shadow-l), inset 0 -2px 0 rgba(0,0,0,.2); }

.start-links {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.link-btn {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(45, 49, 66, .8);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: var(--rb-radius);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all .12s;
}
.link-btn:hover { background: var(--rb-dark-3); transform: translateY(-1px); }

.start-footer-text {
  margin-top: 12px;
  font-size: 13px;
  color: var(--rb-gray-l);
  text-align: center;
  max-width: 700px;
  line-height: 1.45;
}

/* Аватар-пикер */
.avatar-picker {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rb-dark);
  border: 2px solid transparent;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}
.avatar-btn:hover { background: var(--rb-dark-3); transform: scale(1.1); }
.avatar-btn.selected {
  border-color: var(--rb-yellow);
  background: var(--rb-dark-3);
  box-shadow: 0 0 8px rgba(255,215,0,.4);
}

.start-secondary-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.start-secondary-row .btn { flex: 1; min-height: 48px; font-size: 15px; }

/* ---- Карта ---- */
#screen-map {
  padding: 56px 8px 80px;
  display: none;
}
#screen-map.active { display: block; }

.map-wrap {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border: 4px solid var(--rb-dark-3);
  border-radius: var(--rb-radius-l);
  overflow: hidden;
  box-shadow: var(--rb-shadow);
  background: #0d1117;
}
.map-img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}
.map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  transition: transform .2s;
  z-index: 5;
}
.map-pin:hover { transform: translate(-50%, -100%) scale(1.1); }
.map-pin-img-wrap {
  position: relative;
  width: clamp(60px, 8vw, 80px);
  height: clamp(60px, 8vw, 80px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--rb-yellow);
  box-shadow: 0 6px 16px rgba(0,0,0,.6), 0 0 0 2px rgba(0,0,0,.3);
  transition: all .2s;
  animation: pinPulse 3s ease-in-out infinite;
}
@keyframes pinPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(0,0,0,.6), 0 0 0 2px rgba(0,0,0,.3); }
  50% { box-shadow: 0 6px 16px rgba(0,0,0,.6), 0 0 0 4px rgba(255,215,0,.4); }
}
.map-pin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.map-pin:hover .map-pin-img-wrap {
  border-color: var(--rb-cyan);
  transform: scale(1.1);
}
.map-pin-check {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--rb-green);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.map-pin-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.8));
}
.map-pin.locked .map-pin-img-wrap {
  filter: grayscale(.8) brightness(.5);
  border-color: var(--rb-gray-l);
  animation: none;
}
.map-pin.locked:hover { transform: translate(-50%, -100%) scale(1); cursor: not-allowed; }
.map-pin.bonus .map-pin-img-wrap {
  border-color: var(--rb-purple);
  animation: pinPulse 2s ease-in-out infinite, bonusGlow 2s ease-in-out infinite;
}
@keyframes bonusGlow {
  0%, 100% { box-shadow: 0 6px 16px rgba(142,68,173,.6), 0 0 20px rgba(142,68,173,.4); }
  50% { box-shadow: 0 6px 16px rgba(142,68,173,.8), 0 0 30px rgba(255,215,0,.6); }
}
.map-pin-label {
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
  white-space: nowrap;
  border: 1px solid rgba(255,215,0,.3);
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}

.map-fairy {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 6;
  pointer-events: none;
  transition: left 1.5s ease-in-out, top 1.5s ease-in-out;
  animation: floatBob 3s ease-in-out infinite;
}
.map-fairy-img {
  width: clamp(40px, 6vw, 56px);
  height: auto;
  filter: drop-shadow(0 0 12px rgba(0,206,209,.6)) drop-shadow(0 4px 8px rgba(0,0,0,.6));
}

.map-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.map-chips {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex; gap: 8px; flex-wrap: wrap;
  z-index: 10;
  pointer-events: auto;
}
.map-chip {
  background: rgba(37, 41, 56, .9);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--rb-radius);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.map-chip-blocks {
  display: flex; gap: 3px;
}
.map-chip-blocks span {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,.3);
  opacity: .35;
}
.map-chip-blocks span.got { opacity: 1; box-shadow: 0 0 6px currentColor; }

.map-legend {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(37, 41, 56, .9);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--rb-radius);
  padding: 8px 12px;
  font-size: 11px;
  z-index: 10;
  max-width: 220px;
}
.map-legend-title { font-weight: 800; margin-bottom: 4px; color: var(--rb-yellow); }
.map-legend-row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }

/* ---- Экран уровня ---- */
#screen-level {
  padding: 56px 12px 100px;
  display: none;
}
#screen-level.active { display: block; }

.level-wrap {
  max-width: 900px;
  margin: 0 auto;
}
.level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.level-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--rb-yellow);
}
.level-header-img {
  width: 56px;
  height: 56px;
  border-radius: var(--rb-radius);
  object-fit: cover;
  border: 2px solid var(--rb-yellow);
  box-shadow: var(--rb-shadow-l);
  flex-shrink: 0;
}
.level-progress {
  display: flex; align-items: center; gap: 6px;
  background: var(--rb-dark-3);
  padding: 6px 12px;
  border-radius: var(--rb-radius);
  font-size: 13px;
  font-weight: 700;
}
.level-progress-bar {
  width: 100px; height: 8px;
  background: var(--rb-dark);
  border-radius: 4px;
  overflow: hidden;
}
.level-progress-fill {
  height: 100%;
  background: var(--rb-green);
  transition: width .3s;
}

.task-card {
  background: linear-gradient(180deg, var(--rb-dark-3), var(--rb-dark-2));
  border: 3px solid var(--rb-dark-3);
  border-radius: var(--rb-radius-l);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--rb-shadow), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}
.task-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rb-red), var(--rb-yellow), var(--rb-green), var(--rb-blue), var(--rb-purple));
  opacity: .6;
}
.task-meta {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.task-num {
  background: var(--rb-purple);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}
.task-icon {
  font-size: 20px;
}
.task-type {
  font-size: 11px;
  color: var(--rb-gray-l);
  font-weight: 600;
}
.task-question {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
}
.task-question p { margin-bottom: 6px; }

.task-host {
  min-height: 120px;
  margin: 8px 0 14px;
}

.task-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.task-feedback {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--rb-radius);
  font-weight: 600;
  display: none;
}
.task-feedback.show { display: block; animation: toastIn .3s; }
.task-feedback.correct {
  background: rgba(0,166,81,.18);
  border-left: 4px solid var(--rb-green);
  color: #7ee3a8;
}
.task-feedback.wrong {
  background: rgba(226,35,26,.18);
  border-left: 4px solid var(--rb-red);
  color: #ff9b96;
}

.task-hint {
  background: rgba(0,102,204,.15);
  border-left: 4px solid var(--rb-blue);
  padding: 10px 14px;
  border-radius: var(--rb-radius);
  margin-top: 10px;
  display: none;
  font-size: 14px;
  line-height: 1.45;
}
.task-hint.show { display: block; animation: toastIn .3s; }
.task-hint b { color: var(--rb-cyan); }

.level-complete {
  text-align: center;
  padding: 24px;
}
.level-complete-icon { font-size: 64px; margin-bottom: 12px; animation: bounce 1s; }
.level-complete-title {
  font-size: 26px; font-weight: 900; color: var(--rb-yellow);
  margin-bottom: 6px;
}
.level-complete-stars { font-size: 32px; margin: 10px 0; }
.level-complete-score { font-size: 18px; margin-bottom: 16px; }
.level-complete-score b { color: var(--rb-yellow); }

/* ---- Финал ---- */
#screen-final {
  padding: 56px 16px 100px;
  display: none;
  text-align: center;
}
#screen-final.active { display: block; }
.final-trophy {
  font-size: clamp(80px, 18vw, 140px);
  margin: 20px 0;
  animation: bounce 2s infinite;
  filter: drop-shadow(0 8px 16px rgba(255,215,0,.5));
}
.final-title {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  color: var(--rb-yellow);
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 8px;
}
.final-sub {
  font-size: 16px;
  color: var(--rb-gray-l);
  margin-bottom: 20px;
}
.final-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--rb-dark-2);
  border: 3px solid var(--rb-yellow);
  border-radius: var(--rb-radius-l);
  padding: 22px;
  box-shadow: var(--rb-shadow);
  text-align: left;
}
.final-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rb-dark-3);
}
.final-row:last-child { border-bottom: none; }
.final-row-label { color: var(--rb-gray-l); font-size: 14px; }
.final-row-value { font-weight: 800; font-size: 18px; color: var(--rb-yellow); }

.final-blocks {
  display: flex; justify-content: center; gap: 8px;
  margin: 16px 0;
  font-size: 40px;
}
.final-blocks span {
  animation: floatBob 2s infinite;
}
.final-blocks span:nth-child(2) { animation-delay: .2s; }
.final-blocks span:nth-child(3) { animation-delay: .4s; }
.final-blocks span:nth-child(4) { animation-delay: .6s; }
.final-blocks span:nth-child(5) { animation-delay: .8s; }

/* ---- Мастерская ---- */
#screen-workshop {
  padding: 56px 12px 100px;
  display: none;
}
#screen-workshop.active { display: block; }
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}
.workshop-card {
  background: var(--rb-dark-2);
  border: 3px solid var(--rb-dark-3);
  border-radius: var(--rb-radius-l);
  padding: 14px;
  cursor: pointer;
  transition: transform .12s, border-color .12s;
}
.workshop-card:hover {
  transform: translateY(-3px);
  border-color: var(--rb-yellow);
}
.workshop-card-icon { font-size: 32px; margin-bottom: 6px; }
.workshop-card-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.workshop-card-desc { font-size: 12px; color: var(--rb-gray-l); line-height: 1.4; }

/* ===== §3.5.4 Каталог анимаций V4 (обязательные) ===== */
@keyframes scoreBump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--rb-yellow); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes trophyGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255,215,0,.5)) drop-shadow(0 8px 16px rgba(0,0,0,.5)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 30px rgba(255,215,0,.9)) drop-shadow(0 8px 16px rgba(0,0,0,.5)); transform: scale(1.05); }
}
@keyframes magicDrift {
  0% { transform: translate(0, 0); opacity: 0.4; }
  50% { transform: translate(20px, -15px); opacity: 1; }
  100% { transform: translate(-15px, 10px); opacity: 0.4; }
}
@keyframes walkBob {
  0%, 100% { transform: translate(-50%, -100%) translateY(0); }
  25% { transform: translate(-50%, -100%) translateY(-3px) rotate(-2deg); }
  75% { transform: translate(-50%, -100%) translateY(-3px) rotate(2deg); }
}
@keyframes segPop {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(1.1); }
  100% { transform: scaleX(1); }
}
@keyframes levelIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Применение анимаций */
.level-progress-fill { animation: segPop .4s ease-out; }
.task-card { animation: levelIn .4s ease-out; }
.level-complete { animation: bounceIn .5s ease-out; }
.final-trophy { animation: trophyGlow 2s ease-in-out infinite; }
.modal { animation: modalSlideIn .3s ease-out; }
.map-fairy { animation: walkBob 1.5s ease-in-out infinite, floatBob 3s ease-in-out infinite; }

/* Звёзды-декор (twinkle) */
.star-decor {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--rb-yellow);
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

/* Фоновые иллюстрации для экранов (§3.5.3) */
#screen-level {
  background-image:
    linear-gradient(180deg, rgba(26,29,41,.88) 0%, rgba(26,29,41,.92) 100%),
    url('../img/loc1-islands.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
#screen-final {
  background-image:
    linear-gradient(180deg, rgba(255,215,0,.15) 0%, rgba(26,29,41,.95) 60%),
    url('../img/loc4-tower.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
#screen-workshop {
  background-image:
    linear-gradient(180deg, rgba(26,29,41,.9) 0%, rgba(26,29,41,.95) 100%),
    url('../img/loc5-bunker.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* scoreBump на чипе очков */
.hud-score.bump { animation: scoreBump .4s ease-out; }
