/* ===== classroom.css — режим учителя ===== */

#screen-classroom {
  padding: 56px 12px 100px;
  display: none;
}
#screen-classroom.active { display: block; }

.cr-wrap { max-width: 1100px; margin: 0 auto; }

.cr-header {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cr-title {
  font-size: 22px; font-weight: 900; color: var(--rb-yellow);
}
.cr-task-counter {
  background: var(--rb-purple);
  padding: 6px 12px;
  border-radius: var(--rb-radius);
  font-weight: 700; font-size: 13px;
}

.cr-stage {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}
@media (max-width: 900px) {
  .cr-stage { grid-template-columns: 1fr; }
}

.cr-task-area {
  background: var(--rb-dark-2);
  border: 3px solid var(--rb-dark-3);
  border-radius: var(--rb-radius-l);
  padding: 18px;
  box-shadow: var(--rb-shadow);
}

.cr-side {
  display: flex; flex-direction: column; gap: 12px;
}

.cr-students {
  background: var(--rb-dark-2);
  border: 3px solid var(--rb-dark-3);
  border-radius: var(--rb-radius-l);
  padding: 14px;
  max-height: 60vh;
  overflow-y: auto;
}
.cr-students-title {
  font-weight: 800; margin-bottom: 8px; color: var(--rb-yellow);
  font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.cr-student {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--rb-dark);
  font-size: 13px;
}
.cr-student-name { flex: 1; font-weight: 600; }
.cr-student-score {
  background: var(--rb-dark-3);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  min-width: 38px; text-align: center;
}
.cr-student-score.pos { color: var(--rb-green); }
.cr-student-score.neg { color: var(--rb-red); }
.cr-student-actions {
  display: flex; gap: 3px;
}
.cr-student-actions button {
  width: 26px; height: 26px;
  border-radius: 5px;
  font-size: 13px; font-weight: 900;
  box-shadow: var(--rb-shadow-l);
}
.cr-btn-correct { background: var(--rb-green); color: #fff; }
.cr-btn-correct.on { box-shadow: 0 0 0 3px var(--rb-yellow), var(--rb-shadow-l); }
.cr-btn-wrong { background: var(--rb-red); color: #fff; }
.cr-btn-undo { background: var(--rb-dark-3); color: #fff; }

.cr-leaderboard {
  background: var(--rb-dark-2);
  border: 3px solid var(--rb-yellow);
  border-radius: var(--rb-radius-l);
  padding: 14px;
}
.cr-lb-title {
  font-weight: 800; color: var(--rb-yellow); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  font-size: 14px;
}
.cr-lb-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.cr-lb-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--rb-dark);
  border-radius: 6px;
  font-size: 13px;
}
.cr-lb-rank {
  width: 22px; height: 22px;
  background: var(--rb-purple);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0;
}
.cr-lb-item:nth-child(1) .cr-lb-rank { background: var(--rb-yellow); color: #1a1d29; }
.cr-lb-item:nth-child(2) .cr-lb-rank { background: #C0C0C0; color: #1a1d29; }
.cr-lb-item:nth-child(3) .cr-lb-rank { background: #CD7F32; }
.cr-lb-name { flex: 1; font-weight: 600; }
.cr-lb-score { font-weight: 800; color: var(--rb-yellow); }

.cr-add-student {
  display: flex; gap: 6px; margin-top: 8px;
}
.cr-add-student input {
  flex: 1;
  padding: 6px 10px;
  background: var(--rb-dark);
  border: 2px solid var(--rb-dark-3);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}
.cr-add-student input:focus { outline: none; border-color: var(--rb-yellow); }

.cr-nav {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
  align-items: center;
}
.cr-task-list {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1;
}
.cr-task-pill {
  width: 30px; height: 30px;
  background: var(--rb-dark-3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  cursor: pointer;
}
.cr-task-pill:hover { background: var(--rb-gray); }
.cr-task-pill.current { background: var(--rb-blue); border: 2px solid var(--rb-yellow); }
.cr-task-pill.done { background: var(--rb-green); }

.cr-reveal-toggle {
  background: var(--rb-yellow) !important;
  color: #1a1d29 !important;
  text-shadow: none !important;
}

/* Заблокированные задачи (последовательность) */
.cr-task-pill.locked {
  opacity: .4;
  cursor: not-allowed;
  background: var(--rb-dark);
  font-size: 11px;
}
.cr-task-pill.done {
  background: var(--rb-green);
  color: #fff;
}
.cr-task-pill.done::after {
  content: ' ✓';
}

/* Счётчик ошибок на кнопке */
.cr-btn-wrong {
  position: relative;
}
.wrong-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--rb-yellow);
  color: #1a1d29;
  font-size: 10px;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.cr-btn-undo:disabled {
  opacity: .3;
  cursor: not-allowed;
}

/* ===== Карточки локаций в класс-режиме ===== */
.cr-locations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}












/* ===== Крафт-секция с ценами ===== */
.craft-section {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.craft-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px !important;
  font-size: 13px !important;
  min-height: 48px;
}
.craft-price {
  font-size: 11px;
  font-weight: 600;
  opacity: .85;
}
.craft-info {
  text-align: center;
  font-size: 11px;
  color: var(--rb-gray-l);
  margin-top: 2px;
}
.craft-max {
  text-align: center;
  padding: 8px;
  background: var(--rb-dark);
  border-radius: 6px;
  font-size: 12px;
  color: var(--rb-green);
  font-weight: 700;
}

/* Скролл и отступ для classroom */
#screen-classroom {
  overflow-y: auto;
  padding-bottom: 80px !important;
}
#screen-classroom {
  padding-top: 70px !important;
}

/* ===== Minecraft PNG (transparent background) ===== */
.inv-slot-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.craft-mat-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}
/* Персонажи и боссы (transparent PNG) */
.boss-img, .player-img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}
.start-prof-img, .start-noob-img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}
.map-pin-img {
  mix-blend-mode: normal;
}


/* ===== Кузница перед боем ===== */
.forge-boss-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(180deg, var(--rb-dark-3), var(--rb-dark-2));
  border: 3px solid var(--rb-red);
  border-radius: var(--rb-radius-l);
  padding: 16px;
  margin-bottom: 16px;
}
.forge-boss-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(226,35,26,.4));
  flex-shrink: 0;
}
.forge-boss-info {
  flex: 1;
}
.forge-section {
  background: linear-gradient(180deg, var(--rb-dark-3), var(--rb-dark-2));
  border: 3px solid var(--rb-yellow);
  border-radius: var(--rb-radius-l);
  padding: 16px;
}
.forge-points {
  text-align: center;
  font-size: 14px;
  margin-bottom: 12px;
}
.forge-inventory {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.forge-mat {
  background: var(--rb-dark);
  border: 2px solid var(--rb-dark-3);
  border-radius: 8px;
  padding: 6px 2px;
  text-align: center;
}
.forge-mat.has {
  border-color: var(--rb-yellow);
}
.forge-mat-count {
  display: block;
  font-weight: 800;
  color: var(--rb-yellow);
  font-size: 16px;
}
.forge-mat-label {
  font-size: 9px;
  color: var(--rb-gray-l);
}
.forge-craft-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 500px) {
  .forge-craft-options { grid-template-columns: 1fr; }
}
.forge-craft-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px !important;
  min-height: 80px;
  text-align: center;
}
.forge-craft-title {
  font-size: 15px;
  font-weight: 800;
}
.forge-craft-detail {
  font-size: 11px;
  opacity: .8;
}
.forge-craft-price {
  font-size: 12px;
  font-weight: 700;
}
.forge-fight-btn {
  width: 100%;
  font-size: 18px !important;
  padding: 16px !important;
  animation: pulse 1.5s infinite;
}

/* Кнопки задач и босса на одном уровне */

/* Карточки локаций — компактные */






/* Кнопки задач и босса — идеально ровные */

/* ===== Кнопки в карточке локации — одинаковые ===== */





/* ===== Карточки локаций — компактные и ровные ===== */
.cr-locations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cr-loc-card {
  background: linear-gradient(180deg, var(--rb-dark-3), var(--rb-dark-2));
  border: 2px solid var(--rb-dark-3);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 160px;
  transition: all .15s;
}
.cr-loc-card:not(.locked):hover {
  border-color: var(--rb-yellow);
  transform: translateY(-2px);
}
.cr-loc-card.locked {
  opacity: .5;
  filter: grayscale(.5);
}
.cr-loc-img-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.cr-loc-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--rb-yellow);
}
.cr-loc-check {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--rb-green);
  color: #fff;
  font-size: 12px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.cr-loc-lock {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
}
.cr-loc-info {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.cr-loc-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--rb-yellow);
}
.cr-loc-sub {
  font-size: 11px;
  color: var(--rb-gray-l);
}





.badge-green {
  display: inline-block;
  padding: 2px 8px;
  background: var(--rb-green);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

/* ===== Единый стиль кнопок в карточке ===== */
.cr-loc-actions {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: auto;
}
.loc-action-btn {
  flex: 1;
  width: 50%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  color: #fff;
  border: 2px solid rgba(0,0,0,.2);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform .08s;
}
.loc-action-btn:active { transform: translateY(2px); box-shadow: none; }
.loc-action-tasks { background: linear-gradient(180deg, #00C961, #00A651); }
.loc-action-boss { background: linear-gradient(180deg, #FF3A30, #E2231A); }
