/* ===== GAME HEADER ===== */
.game-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--teal);
  box-shadow: var(--shadow-md);
}

.game-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: var(--space-md);
}

.game-logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.game-username {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  text-align: center;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-coins-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--yellow);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  cursor: pointer;
  transition: opacity var(--transition);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.game-coins-wrap:hover { opacity: 0.88; }

.coin-icon { font-size: 1.1rem; }

.coin-count {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.1rem;
  color: white;
  min-width: 36px;
  text-align: right;
}

.coin-count.bump { animation: coinBump 0.4s ease; }

@keyframes coinBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.icon-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: background var(--transition);
  white-space: nowrap;
}

.icon-btn:hover { background: rgba(255,255,255,0.25); }


/* ===== BORIS STATS ===== */
.boris-stats-wrap {
  background: rgba(27,177,180,0.9);
  padding: 10px 0;
}

.boris-stats {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.stat-item { flex: 1; display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.stat-emoji { font-size: 1rem; flex-shrink: 0; }
.stat-info  { flex: 1; min-width: 0; }

.stat-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.82);
  display: block;
  margin-bottom: 3px;
}

.stat-bar {
  height: 7px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.6s ease; }
.stat-fill.health { background: #EF5350; }
.stat-fill.mood   { background: var(--yellow); }
.stat-fill.energy { background: #FFFFFF; }

.stat-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  color: white;
  min-width: 28px;
  text-align: right;
}

/* ===== КОМНАТА БОБРА ===== */
.room-section {
  background: #FFFFFF;
  padding: var(--space-lg) 0 var(--space-xl);
}

[data-theme="dark"] .room-section { background: #052222; }

.room-section .container { max-width: 900px; }

.room-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Комната */
.room {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  user-select: none;
  border: 3px solid var(--teal);
  background: var(--teal);
}

/* Стена */
.room-wall {
  position: absolute;
  inset: 0 0 26% 0;
  background: linear-gradient(170deg, #1CC8CB 0%, var(--teal) 50%, #189699 100%);
}

.room-wall-left {
  position: absolute;
  top: 0; left: 0; bottom: 26%;
  width: 3%;
  background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
}

.room-wall-right {
  position: absolute;
  top: 0; right: 0; bottom: 26%;
  width: 3%;
  background: linear-gradient(to left, rgba(0,0,0,0.15), transparent);
}

/* Пол */
.room-floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28%;
  background: linear-gradient(to bottom, #C4956A 0%, #A0724A 70%, #8B5E3C 100%);
}

/* Плинтус */
.room-skirting {
  position: absolute;
  bottom: 26%;
  left: 0; right: 0;
  height: 3px;
  background: #7B4F2E;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Окно — СЛЕВА */
.room-window {
  position: absolute;
  top: 6%;
  left: 6%;
  width: 20%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #B3E5FC, #E1F5FE);
  border-radius: 6px 6px 3px 3px;
  border: 3px solid #5D4037;
  box-shadow: inset 0 0 14px rgba(255,255,255,0.5), 0 3px 10px rgba(0,0,0,0.2);
  overflow: hidden;
}

.window-cross-h {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 3px;
  background: #5D4037;
  transform: translateY(-50%);
}

.window-cross-v {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 3px;
  background: #5D4037;
  transform: translateX(-50%);
}

/* Зелёные шторы */
.window-curtain-left {
  position: absolute;
  top: -5%; left: -5%;
  width: 30%; height: 110%;
  background: linear-gradient(to right, #69B238, #7BC94A);
  border-radius: 0 8px 8px 0;
  opacity: 0.9;
}

.window-curtain-right {
  position: absolute;
  top: -5%; right: -5%;
  width: 30%; height: 110%;
  background: linear-gradient(to left, #69B238, #7BC94A);
  border-radius: 8px 0 0 8px;
  opacity: 0.9;
}

/* Жёлтое кресло (слева под окном) */
.room-armchair {
  position: absolute;
  left: 3%;
  bottom: 26%;
  width: 16%;
  height: 20%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.room-armchair::before {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 55%;
  background: linear-gradient(to bottom, var(--yellow), #E09010);
  border-radius: 6px 6px 4px 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.room-armchair::after {
  content: '';
  position: absolute;
  bottom: 48%; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, #FFD54F, var(--yellow));
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ESG-картины на стене */
.room-painting {
  position: absolute;
  background: white;
  border: 3px solid #5D4037;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  font-size: 1.5em;
}

.room-painting-1 { top: 5%; left: 28%; width: 9%; aspect-ratio: 1; }
.room-painting-2 { top: 5%; left: 40%; width: 9%; aspect-ratio: 1; }
.room-painting-3 { top: 5%; left: 52%; width: 9%; aspect-ratio: 1; }

/* Зелёный ковёр */
.room-carpet {
  position: absolute;
  bottom: 26%;
  left: 25%; right: 25%;
  height: 7%;
  background: var(--green);
  border-radius: 6px;
  opacity: 0.88;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Борис — реальное фото */
.boris-character {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  min-width: 80px;
  cursor: pointer;
  z-index: 10;
  animation: borisIdle 2.8s ease-in-out infinite;
  transition: filter 0.2s;
}

.boris-room-img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.3));
}

[data-theme="dark"] .boris-room-img { mix-blend-mode: normal; }

@keyframes borisIdle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-6px); }
}

.boris-character.wave { animation: borisWave 0.7s ease !important; }

@keyframes borisWave {
  0%   { transform: translateX(-50%) rotate(0deg)  scale(1);    }
  25%  { transform: translateX(-50%) rotate(-8deg) scale(1.08); }
  50%  { transform: translateX(-50%) rotate(8deg)  scale(1.12); }
  75%  { transform: translateX(-50%) rotate(-4deg) scale(1.06); }
  100% { transform: translateX(-50%) rotate(0deg)  scale(1);    }
}

.boris-character.jump { animation: borisJump 0.6s ease !important; }

@keyframes borisJump {
  0%   { transform: translateX(-50%) translateY(0)    scale(1);    }
  40%  { transform: translateX(-50%) translateY(-22px) scale(1.1); }
  70%  { transform: translateX(-50%) translateY(-10px) scale(1.05);}
  100% { transform: translateX(-50%) translateY(0)    scale(1);    }
}

/* Зоны */
.room-zone-btn {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 2px dashed rgba(255,255,255,0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
}

.room-zone-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.7);
}

.zone-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.5em;
  color: rgba(255,255,255,0.88);
  text-align: center;
}

/* Мебель */
.furniture-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7) translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.furniture-item.visible { opacity: 1; transform: scale(1) translateY(0); }

.furniture-bed      { right: 3%;  bottom: 26%; width: 19%; font-size: 2.2em; }
.furniture-desk     { right: 23%; bottom: 28%; width: 13%; }
.furniture-lamp     { right: 35%; bottom: 27%; width: 7%;  font-size: 1.3em; }
.furniture-shelf    { right: 3%;  top: 6%;     width: 13%; font-size: 1.7em; flex-direction: column; gap: 2px; }
.furniture-globe    { right: 10%; top: 8%;     width: 6%;  font-size: 1.2em; }
.furniture-plant    { left: 25%;  bottom: 26%; width: 7%;  font-size: 1.5em; }
.furniture-carpet   { bottom: 26%; left: 30%; right: 30%; height: 3%; background: rgba(105,178,56,0.35); border-radius: 4px; }
.furniture-painting { top: 5%; left: 62%; width: 10%; font-size: 1.5em; background: white; border: 2px solid #5D4037; border-radius: 3px; box-shadow: 2px 2px 6px rgba(0,0,0,0.25); }

.zone-furniture { right: 3%;  bottom: 26%; width: 21%; height: 22%; }

.zone-kitchen   { bottom: 26%; left: 40%; width: 22%; height: 10%; }

.room-empty-hint {
  position: absolute;
  bottom: 58%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.7em;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s;
}

/* ===== DRAGGABLE FURNITURE ===== */
.furniture-img-item {
  position: absolute;
  width: 90px;
  z-index: 5;
  cursor: grab;
  user-select: none;
  transition: opacity 0.2s;
}

.furniture-img-item:active { cursor: grabbing; }

.furniture-img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
  pointer-events: none;
}

.furniture-img-darken {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: darken;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
  pointer-events: none;
}

/* ===== СЕКЦИЯ АКТИВНОСТЕЙ ===== */
.activities-section {
  padding: var(--space-xl) 0;
  background: rgba(27,177,180,0.05);
}

[data-theme="dark"] .activities-section { background: #052222; }

.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.activity-card {
  background: white;
  border: 2px solid var(--green);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-align: center;
}

[data-theme="dark"] .activity-card { background: #083030; }

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.activity-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  mix-blend-mode: multiply;
  display: block;
}

[data-theme="dark"] .activity-img { mix-blend-mode: normal; }

.activity-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(27,177,180,0.1), rgba(105,178,56,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.activity-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--green);
  padding: var(--space-sm) var(--space-md);
}

/* ===== МИНИ-ИГРЫ ===== */
.games-section {
  padding: var(--space-xl) 0;
  background: white;
}

[data-theme="dark"] .games-section { background: #052222; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.game-card {
  background: var(--teal);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  background: var(--green);
}

.game-card-icon { font-size: 2.8rem; margin-bottom: var(--space-sm); display: block; }
.game-card h3   { color: white; font-size: 1rem; margin-bottom: 4px; }
.game-card p    { color: rgba(255,255,255,0.75); font-size: 0.82rem; }

.game-card-reward {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: var(--yellow);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: var(--space-sm);
  border: 1px solid rgba(249,175,25,0.4);
}

/* ===== QR-СЕКЦИЯ ===== */
.qr-section { padding: var(--space-xl) 0; background: rgba(27,177,180,0.05); }

[data-theme="dark"] .qr-section { background: #052222; }

.qr-card {
  background: linear-gradient(135deg, var(--teal) 0%, var(--green) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.qr-card-content h2 { color: white; font-size: 1.6rem; margin-bottom: var(--space-sm); }
.qr-card-content p  { color: rgba(255,255,255,0.85); font-size: 1rem; margin-bottom: var(--space-lg); max-width: 480px; line-height: 1.55; }

.qr-rewards { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-lg); }

.qr-reward-chip {
  background: rgba(255,255,255,0.18);
  color: white;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.3);
}

.qr-icon-wrap {
  font-size: 5rem;
  opacity: 0.9;
  flex-shrink: 0;
  animation: qrPulse 2s ease-in-out infinite;
}

@keyframes qrPulse {
  0%, 100% { transform: scale(1);    opacity: 0.9; }
  50%       { transform: scale(1.1); opacity: 1;   }
}

/* ===== МАГАЗИН ===== */
.shop-section { padding: var(--space-xl) 0; background: white; }

[data-theme="dark"] .shop-section { background: #052222; }

.shop-tabs {
  display: flex;
  gap: 4px;
  background: rgba(27,177,180,0.08);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: var(--space-xl);
  width: fit-content;
}

.shop-tab {
  padding: 10px 22px;
  background: none;
  border: none;
  border-radius: calc(var(--radius-lg) - 4px);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--color-text-light);
  transition: background var(--transition), color var(--transition);
}

.shop-tab.active {
  background: var(--teal);
  color: white;
  box-shadow: var(--shadow-sm);
}

.shop-panel { display: none; }
.shop-panel.active { display: block; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.shop-item {
  background: rgba(27,177,180,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.shop-item.owned { border-color: var(--green); background: rgba(105,178,56,0.08); }

.shop-item.owned::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.shop-item-icon  { font-size: 2.5rem; margin-bottom: var(--space-sm); display: block; }

.shop-item-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
  margin: 0 auto var(--space-sm);
  border-radius: var(--radius-sm);
}
.shop-item-fallback { font-size: 3rem; display: block; text-align: center; margin: 0 auto var(--space-sm); line-height: 1; }
.shop-item-name  { font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; color: var(--color-text); margin-bottom: 4px; }
.shop-item-effect { font-size: 0.75rem; color: var(--color-text-light); margin-bottom: var(--space-sm); min-height: 18px; }
.shop-item-price  { font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem; color: var(--yellow); }
.shop-buy-btn     { width: 100%; margin-top: var(--space-sm); padding: 7px; font-size: 0.82rem; }

/* ===== ESG-БЛОК ===== */
.game-esg-section { padding: var(--space-xl) 0; background: rgba(27,177,180,0.05); }

[data-theme="dark"] .game-esg-section { background: #052222; }

.game-esg-compact { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--space-xl); align-items: start; }

.esg-mini-cols { display: flex; flex-direction: column; gap: var(--space-md); }

.esg-mini-card {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--teal);
  transition: transform var(--transition);
}

[data-theme="dark"] .esg-mini-card { background: #083030; }
.esg-mini-card:hover { transform: translateX(4px); }

.esg-mini-icon { font-size: 2rem; flex-shrink: 0; }
.esg-mini-card h3 { font-size: 0.95rem; color: var(--teal); margin-bottom: 2px; }
.esg-mini-card p  { font-size: 0.82rem; color: var(--color-text-light); }

.esg-facts-list {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--green);
}

[data-theme="dark"] .esg-facts-list { background: #083030; }

.esg-facts-list h3 { color: var(--green); margin-bottom: var(--space-md); font-size: 1rem; }

.fact-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(27,177,180,0.12);
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.fact-row:last-child { border-bottom: none; }
.fact-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-top: 7px; flex-shrink: 0; }

/* ===== ОБМЕН МОНЕТ ===== */
.exchange-section { padding: var(--space-xl) 0; background: var(--teal); }

.exchange-banner {
  background: linear-gradient(135deg, var(--yellow) 0%, #E09010 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-lg);
}

.exchange-banner:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 36px rgba(249,175,25,0.45);
}

.exchange-banner h2 { font-size: 2rem; color: white; margin-bottom: var(--space-sm); }
.exchange-banner p  { color: rgba(255,255,255,0.8); font-size: 1rem; }

/* ===== ИГРОВЫЕ МОДАЛКИ ===== */
.game-modal { max-width: 680px; }
.game-modal h2 { font-size: 1.5rem; color: var(--teal); }

/* Квиз */
.quiz-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); }
.quiz-q-num    { color: var(--color-text-light); font-size: 0.88rem; font-weight: 600; }
.quiz-score    { font-family: var(--font-heading); font-weight: 800; color: var(--yellow); }

.quiz-question {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
  min-height: 60px;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.quiz-option {
  padding: 12px 16px;
  border: 2px solid rgba(27,177,180,0.2);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-text);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  line-height: 1.4;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--teal);
  background: rgba(27,177,180,0.07);
  transform: scale(1.02);
}

.quiz-option.correct { border-color: var(--green); background: rgba(105,178,56,0.1); color: var(--green); font-weight: 600; }
.quiz-option.wrong   { border-color: var(--color-error); background: #FFEBEE; color: var(--color-error); }

.quiz-feedback { text-align: center; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; min-height: 28px; margin-bottom: var(--space-md); }
.quiz-feedback.correct { color: var(--green); }
.quiz-feedback.wrong   { color: var(--color-error); }

.quiz-result { text-align: center; padding: var(--space-lg) 0; }
.quiz-result-icon { font-size: 4rem; margin-bottom: var(--space-md); }
.quiz-result h2 { font-size: 1.6rem; color: var(--green); margin-bottom: var(--space-sm); }
.quiz-result .earned { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 900; color: var(--yellow); margin: var(--space-md) 0; }

/* Кроссворд */
.crossword-grid { display: inline-block; margin: 0 auto var(--space-lg); border-collapse: collapse; }
.crossword-grid table { border-collapse: collapse; }

.cw-cell {
  width: 36px; height: 36px;
  border: 2px solid rgba(27,177,180,0.3);
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  background: white;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  transition: background var(--transition);
}

.cw-cell.black  { background: #1A1A1A; border-color: #1A1A1A; cursor: default; }
.cw-cell.active { background: rgba(249,175,25,0.15); border-color: var(--yellow); }
.cw-cell.in-word { background: rgba(27,177,180,0.08); }
.cw-cell.correct-word { background: rgba(105,178,56,0.12); }
.cw-cell.wrong-word   { background: #FFEBEE; }

.cw-num { position: absolute; top: 1px; left: 2px; font-size: 0.52rem; font-weight: 700; color: var(--color-text-light); line-height: 1; }

.cw-clues { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); font-size: 0.85rem; }
.cw-clues h4 { font-family: var(--font-heading); color: var(--teal); margin-bottom: var(--space-sm); font-size: 0.92rem; }

.clue-item { padding: 3px 0; color: var(--color-text-light); cursor: pointer; transition: color var(--transition); line-height: 1.4; }
.clue-item:hover  { color: var(--teal); }
.clue-item.active { color: var(--teal); font-weight: 600; }

/* Мусор */
.trash-canvas-wrap { position: relative; width: 100%; }

#trashCanvas {
  width: 100%;
  border-radius: var(--radius-md);
  border: 2px solid var(--teal);
  display: block;
  cursor: pointer;
}

.trash-score-display {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* QR-камера */
.qr-video-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
  max-height: 320px;
}

#qrVideo { width: 100%; height: 100%; object-fit: cover; display: block; }

.qr-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.qr-target {
  width: 180px; height: 180px;
  border: 3px solid var(--yellow);
  border-radius: 16px;
  box-shadow: 0 0 0 4000px rgba(0,0,0,0.4);
  animation: qrTarget 1.5s ease-in-out infinite;
}

@keyframes qrTarget {
  0%, 100% { opacity: 1; transform: scale(1);    }
  50%       { opacity: 0.7; transform: scale(1.04); }
}

#qrCanvas { display: none; }

.qr-status { text-align: center; margin-top: var(--space-md); font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; min-height: 24px; }
.qr-status.scanning { color: var(--teal); }
.qr-status.success  { color: var(--green); }
.qr-status.error    { color: var(--color-error); }

/* Обмен монет */
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }

.prize-card {
  background: rgba(27,177,180,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  cursor: pointer;
}

.prize-card:hover     { border-color: var(--yellow); }
.prize-card.selected  { border-color: var(--yellow); background: rgba(249,175,25,0.1); }
.prize-card.cant-afford { opacity: 0.45; cursor: not-allowed; }

.prize-icon { font-size: 2.2rem; margin-bottom: 6px; }
.prize-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; margin-bottom: 4px; }
.prize-cost { font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem; color: var(--yellow); margin-bottom: 10px; }

.prize-img {
  height: 100px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.prize-get-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: var(--teal);
  color: #FFFFFF;
  transition: background 0.2s;
}
.prize-get-btn:hover { background: #159a9d; }

.prize-get-btn--disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}
.prize-get-btn--disabled:hover { background: #ccc; }

.balance-display {
  background: rgba(27,177,180,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--teal);
}

/* Раннер */
#runnerCanvas {
  border-radius: var(--radius-md);
  border: 2px solid var(--teal);
  display: block;
  width: 100%;
  max-width: 340px;
  max-height: 70vh;
  margin: 0 auto;
  height: auto;
}

.runner-hud { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); font-family: var(--font-heading); font-weight: 700; }

.runner-mobile-btns {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.75rem;
}

.runner-btn {
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.6rem;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: transform 0.1s, opacity 0.1s;
}

.runner-btn:active { transform: scale(0.92); opacity: 0.8; }

.runner-question {
  background: var(--teal);
  color: white;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  margin-bottom: var(--space-sm);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Онбординг */
.onboarding-overlay { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
.onboarding-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); pointer-events: all; }

.onboarding-tip {
  position: absolute;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  z-index: 1;
  border-top: 4px solid var(--yellow);
}

.onboarding-tip h3 { color: var(--teal); margin-bottom: var(--space-sm); }
.onboarding-tip p  { color: var(--color-text-light); font-size: 0.9rem; margin-bottom: var(--space-md); }
.onboarding-footer { display: flex; justify-content: space-between; align-items: center; }
.onboard-dots { display: flex; gap: 6px; }
.onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.15); }
.onboard-dot.on { background: var(--teal); }

/* ===== WHITE TEXT ON TEAL ELEMENTS ===== */
.game-header,
.game-header *:not(.modal-close) {
  color: #FFFFFF;
}
.game-card,
.game-card h3,
.game-card p {
  color: #FFFFFF;
}
.shop-tab.active  { color: #FFFFFF; }
.runner-question  { color: #FFFFFF; }
.exchange-section { color: #FFFFFF; }
.boris-stats-wrap .stat-name,
.boris-stats-wrap .stat-val { color: #FFFFFF; }


/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .activities-grid { grid-template-columns: repeat(2, 1fr); }
  .game-esg-compact { grid-template-columns: 1fr; }
  .prize-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .game-username { font-size: 1rem; }
  .qr-card { flex-direction: column; text-align: center; padding: var(--space-xl) var(--space-lg); }
  .qr-icon-wrap { order: -1; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
  .activities-grid { grid-template-columns: repeat(2, 1fr); }
  .boris-stats { flex-direction: column; gap: var(--space-sm); }
  .room { aspect-ratio: 4/3; }
  .quiz-options { grid-template-columns: 1fr; }
  .cw-clues { grid-template-columns: 1fr; }
  .prize-grid { grid-template-columns: 1fr 1fr; }
  .exchange-banner h2 { font-size: 1.4rem; }
  .esg-reminder-grid { grid-template-columns: 1fr; }
}

/* ===== BEAVER IMAGE (background removal) ===== */
.beaver-img {
  mix-blend-mode: multiply;
  filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.15));
  background: transparent !important;
}

/* ===== ACTIVITY BEAVER IMAGE ===== */
.activity-beaver-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto var(--space-sm);
}

/* ===== НОЧНОЙ РЕЖИМ (Сон) ===== */
body.night-mode {
  filter: brightness(0.4) saturate(0.6) hue-rotate(200deg);
  transition: filter 0.5s;
}
body.night-mode #sleep-overlay {
  filter: none !important;
}

/* ===== ESG REMINDER ===== */
.esg-reminder {
  background: #FFFFFF;
  border: 2px solid #69B238;
  border-radius: 16px;
  padding: 24px;
  margin: 0 auto;
  max-width: 900px;
}
.esg-reminder h3 {
  color: #69B238;
  font-family: Nunito, sans-serif;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 16px;
}
.esg-reminder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.reminder-card {
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
}
.reminder-card strong {
  color: #1BB1B4;
  display: block;
  margin-bottom: 8px;
}
.reminder-card p {
  color: #333;
  font-size: 0.9rem;
  margin: 0;
}

/* ===== GAME LEARN SECTION ===== */
.game-learn-section { background: #F0FAF4; padding: var(--space-lg) 0; }

.learn-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.learn-card {
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.learn-card--green  { background: #E8F5E9; border-left: 4px solid var(--green); }
.learn-card--teal   { background: #E0F7FA; border-left: 4px solid var(--teal); }
.learn-card--yellow { background: #FFF9C4; border-left: 4px solid var(--yellow); }

.learn-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.learn-card h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: #1A1A1A;
}

.learn-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.learn-card ul li {
  font-size: 0.88rem;
  color: #333;
  padding-left: 1rem;
  position: relative;
}

.learn-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

.esg-vocab {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.esg-vocab h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--teal);
  margin-bottom: var(--space-md);
}

.vocab-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.vocab-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: 0.5rem var(--space-md);
  background: #F8FFFE;
  border-radius: var(--radius-md);
}

.vocab-word {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  color: var(--teal);
  min-width: 120px;
  flex-shrink: 0;
}

.vocab-def {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

@media (max-width: 640px) {
  .learn-cards-grid { grid-template-columns: 1fr; }
}

/* ===== ТЕСТ «КАКОЙ ТЫ БОБЁР?» ===== */
.personality-option {
  background: #FFFFFF;
  border: 2px solid #1BB1B4;
  border-radius: 14px;
  padding: 14px 18px;
  text-align: left;
  font-family: Nunito, sans-serif;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}
.personality-option:hover { background: #E0F7FA; }
