/* ═══════════════════════════════════════════════════════════════════
   RELIC STYLES — Охота за реликвией
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Секция ──────────────────────────────────────────────────────── */
#tab-relic {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
}

/* ─── Список комнат ──────────────────────────────────────────────── */
#relicRoomsList {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.relic-room-card {
  background: linear-gradient(145deg, rgba(20,10,40,0.92), rgba(10,5,25,0.97));
  border: 1px solid rgba(212,168,81,0.22);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.relic-room-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(124,58,237,0.07), transparent 60%);
  pointer-events: none;
}
.relic-room-card--mine {
  border-color: rgba(212,168,81,0.5);
  box-shadow: 0 0 16px rgba(212,168,81,0.1);
}

.relic-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.relic-room-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #f0e8d0;
}
.relic-room-icon { font-size: 18px; }

.relic-badge--entry {
  font-size: 12px;
  font-weight: 700;
  color: #d4a851;
  background: rgba(212,168,81,0.12);
  border: 1px solid rgba(212,168,81,0.3);
  border-radius: 20px;
  padding: 3px 10px;
}

.relic-room-desc {
  font-size: 12px;
  color: rgba(200,190,220,0.6);
  margin-bottom: 12px;
  line-height: 1.4;
}

.relic-room-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.relic-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 7px 4px;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #e0d8f0;
}
.relic-stat-icon  { font-size: 14px; }
.relic-stat-label { font-size: 10px; color: rgba(200,190,220,0.5); font-weight: 400; }

.relic-prize-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(200,190,220,0.6);
  background: rgba(212,168,81,0.06);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
}
.relic-prize-val { color: #d4a851; font-weight: 600; }

.relic-lobby-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.relic-lobby-players { display: flex; gap: 4px; }
.relic-player-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(212,168,81,0.3);
  transition: background 0.3s;
}
.relic-player-dot.filled {
  background: #d4a851;
  box-shadow: 0 0 6px rgba(212,168,81,0.6);
}
.relic-lobby-count { font-size: 12px; color: #d4a851; font-weight: 600; }
.relic-lobby-timer { font-size: 11px; color: rgba(200,190,220,0.6); margin-left: auto; }

.relic-in-progress {
  font-size: 12px;
  color: rgba(200,190,220,0.5);
  margin-bottom: 10px;
  text-align: center;
}

.relic-join-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.relic-join-btn:active { transform: scale(0.97); }
.relic-join-btn:disabled,
.relic-join-btn--waiting {
  background: rgba(255,255,255,0.07);
  color: rgba(200,190,220,0.5);
  cursor: default;
}

/* ─── Лобби ──────────────────────────────────────────────────────── */
#relicLobbyWrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 24px 20px;
}

.relic-lobby-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}
.relic-lobby-symbol { font-size: 52px; animation: relicPulse 2s ease-in-out infinite; }
.relic-lobby-title  { font-size: 22px; font-weight: 700; color: #d4a851; margin: 0; }
.relic-lobby-sub    { font-size: 13px; color: rgba(200,190,220,0.6); margin: 0; }

.relic-lobby-seats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.relic-lobby-seat {
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1.5px dashed rgba(212,168,81,0.3);
  display: flex; align-items: center; justify-content: center;
  color: rgba(200,190,220,0.3);
  font-size: 13px;
  transition: all 0.3s;
}
.relic-lobby-seat--filled {
  border-style: solid;
  border-color: rgba(212,168,81,0.6);
  background: rgba(212,168,81,0.08);
  font-size: 22px;
  color: #d4a851;
}

.relic-lobby-info {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.relic-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(200,190,220,0.7);
}
.relic-info-row b { color: #d4a851; }

.relic-lobby-wait-anim { display: flex; gap: 8px; }
.relic-wait-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  animation: relicWaitDot 1.4s ease-in-out infinite;
}
.relic-wait-dot:nth-child(2) { animation-delay: 0.2s; background: #d4a851; }
.relic-wait-dot:nth-child(3) { animation-delay: 0.4s; }

.relic-lobby-secs {
  font-size: 12px;
  color: rgba(200,190,220,0.5);
}

/* ─── Игровой экран ──────────────────────────────────────────────── */
#relicGameWrap {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: 0 0 80px;
  min-height: 100%;
}

.relic-game-header {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 10px;
  border-bottom: 1px solid rgba(212,168,81,0.1);
}
.relic-game-back {
  background: none;
  border: none;
  color: rgba(200,190,220,0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.relic-game-stats {
  display: flex;
  gap: 14px;
  flex: 1;
  justify-content: flex-end;
}
.relic-game-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.relic-game-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #d4a851;
}
.relic-game-stat-label {
  font-size: 10px;
  color: rgba(200,190,220,0.5);
}

/* ─── Участники ──────────────────────────────────────────────────── */
#relicParticipants {
  display: flex;
  padding: 10px 14px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
#relicParticipants::-webkit-scrollbar { display: none; }

.relic-participant {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.3s;
  flex-shrink: 0;
}
.relic-participant--me {
  border-color: rgba(212,168,81,0.4);
  background: rgba(212,168,81,0.07);
}
.relic-participant--turn {
  border-color: rgba(124,58,237,0.7);
  background: rgba(124,58,237,0.1);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
  animation: relicPulse 1.5s ease-in-out infinite;
}
.relic-participant--dead {
  opacity: 0.45;
  filter: grayscale(0.7);
}
.relic-participant--winner {
  border-color: #d4a851;
  background: rgba(212,168,81,0.12);
}

.relic-p-avatar-wrap {
  position: relative;
  width: 36px; height: 36px;
}
.relic-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.relic-avatar--letter {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  color: #e0d8f0;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
}
.relic-turn-arrow {
  position: absolute;
  top: -6px; left: -8px;
  font-size: 12px;
  color: #a78bfa;
  animation: relicPulse 0.8s ease-in-out infinite;
}

.relic-p-info { text-align: center; }
.relic-p-name {
  font-size: 10px;
  color: rgba(200,190,220,0.8);
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relic-me-badge {
  font-size: 9px;
  background: rgba(212,168,81,0.2);
  color: #d4a851;
  border-radius: 6px;
  padding: 1px 4px;
}
.relic-p-reward {
  font-size: 9px;
  color: #a78bfa;
  min-height: 13px;
}
.relic-p-cells { font-size: 9px; color: rgba(200,190,220,0.4); }
.relic-p-cells small { font-size: 8px; }

/* ─── Панель хода ────────────────────────────────────────────────── */
#relicTurnInfo {
  padding: 0 14px 8px;
  text-align: center;
}
.relic-turn-badge {
  display: inline-block;
  font-size: 13px;
  color: rgba(200,190,220,0.8);
  background: rgba(255,255,255,0.04);
  border-radius: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.08);
}
.relic-turn-badge--mine {
  color: #d4a851;
  background: rgba(212,168,81,0.1);
  border-color: rgba(212,168,81,0.3);
  font-weight: 600;
  animation: relicPulse 1.5s ease-in-out infinite;
}

/* ─── Таймер хода ────────────────────────────────────────────────── */
.relic-timer-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 10px;
}
.relic-turn-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.relic-turn-fill {
  height: 100%;
  border-radius: 4px;
  background: #7c3aed;
  transition: width 1s linear, background 0.5s;
}
.relic-turn-fill--warn   { background: #d4a851; }
.relic-turn-fill--danger { background: #dc2626; }
#relicTurnSecs {
  font-size: 12px;
  color: rgba(200,190,220,0.6);
  min-width: 28px;
  text-align: right;
}

/* ─── Сетка ──────────────────────────────────────────────────────── */
#relicGrid {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  flex: 1;
}

.relic-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.relic-cell--closed {
  background: linear-gradient(145deg, rgba(30,15,60,0.9), rgba(15,8,35,0.95));
  border: 1px solid rgba(124,58,237,0.2);
  cursor: default;
}
.relic-cell--clickable {
  cursor: pointer;
  border-color: rgba(124,58,237,0.45);
}
.relic-cell--clickable:active { transform: scale(0.92); }
.relic-cell--clickable:hover {
  border-color: rgba(212,168,81,0.5);
  box-shadow: 0 0 12px rgba(212,168,81,0.15);
  background: linear-gradient(145deg, rgba(40,20,80,0.9), rgba(20,10,50,0.95));
}
.relic-cell--open {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: default;
}
.relic-cell--skull {
  background: rgba(220,38,38,0.1);
  border-color: rgba(220,38,38,0.4);
}
.relic-cell--prize {
  background: rgba(212,168,81,0.08);
  border-color: rgba(212,168,81,0.4);
}
.relic-cell--empty {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}
.relic-cell--reveal {
  animation: relicReveal 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.relic-cell--opening { opacity: 0.7; }

.relic-cell-emoji   { font-size: clamp(14px, 4.5vw, 24px); line-height: 1; }
.relic-cell-reward  {
  font-size: clamp(8px, 2.5vw, 11px);
  color: #d4a851;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
}
.relic-cell-hidden  { font-size: clamp(12px, 4vw, 20px); color: rgba(124,58,237,0.4); }
.relic-cell-spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: relicSpin 0.8s linear infinite;
}
.relic-cell-opener {
  position: absolute;
  top: 2px; right: 4px;
  font-size: 8px;
}

/* ─── Финал ──────────────────────────────────────────────────────── */
#relicFinaleOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5,2,15,0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
#relicFinaleOverlay.relic-finale--visible {
  display: flex;
  opacity: 1;
}

.relic-finale-card {
  background: linear-gradient(155deg, rgba(20,10,45,0.98), rgba(10,5,25,0.99));
  border: 1px solid rgba(212,168,81,0.3);
  border-radius: 20px;
  padding: 28px 20px 24px;
  max-width: 360px;
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 0 40px rgba(124,58,237,0.2);
  max-height: 85vh;
  overflow-y: auto;
}

#relicFinaleTitle {
  font-size: 26px;
  font-weight: 700;
  color: #f0e8d0;
  text-align: center;
  margin: 0;
}
#relicFinaleSubtitle {
  font-size: 13px;
  color: rgba(200,190,220,0.6);
  text-align: center;
  margin: 0;
}
#relicFinaleReward {
  font-size: 28px;
  font-weight: 800;
  color: #d4a851;
  text-shadow: 0 0 20px rgba(212,168,81,0.5);
}
.relic-finale-reward--win {
  animation: relicPulse 1.5s ease-in-out 3;
}

#relicFinalePlayers {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.relic-finale-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.relic-finale-player--me {
  background: rgba(212,168,81,0.08);
  border: 1px solid rgba(212,168,81,0.25);
}
.relic-finale-icon  { font-size: 18px; }
.relic-finale-name  { flex: 1; color: rgba(200,190,220,0.85); }
.relic-finale-payout { font-weight: 700; color: #d4a851; }

.relic-finale-close {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.relic-finale-close:active { opacity: 0.8; }

/* ─── Общие состояния ────────────────────────────────────────────── */
.relic-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: rgba(200,190,220,0.5);
  font-size: 14px;
}
.relic-spin {
  width: 18px; height: 18px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: relicSpin 0.9s linear infinite;
}
.relic-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(200,190,220,0.4);
  font-size: 14px;
  line-height: 1.6;
}
.relic-back-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(200,190,220,0.6);
  font-size: 13px;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.relic-back-btn:hover { border-color: rgba(212,168,81,0.4); color: #d4a851; }

/* ═══════════════════════════════════════════════════════════════════
   DUNGEON CSS — Подземелье
   DD-CSS теги соответствуют DD-JS тегам из relic.js
   ═══════════════════════════════════════════════════════════════════ */

/* ─── [DD-CSS-1] Бейдж «Подземелье» на карточке комнаты ─────────── */
.relic-dungeon-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

/* ─── [DD-CSS-2] Ячейка-дверь в основной сетке ──────────────────── */
.relic-cell--door {
  background: linear-gradient(145deg, rgba(88,28,135,0.25), rgba(46,16,101,0.35));
  border-color: rgba(167,139,250,0.55) !important;
  box-shadow: 0 0 10px rgba(167,139,250,0.15);
  animation: relicDoorPulse 2s ease-in-out infinite;
}
.relic-cell-door-label {
  font-size: clamp(7px, 2vw, 9px);
  color: #a78bfa;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ─── [DD-CSS-3] Баннер «Подземелье открыто» ────────────────────── */
.relic-dungeon-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(88,28,135,0.5), rgba(46,16,101,0.6));
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 14px 0;
  animation: relicDoorPulse 2s ease-in-out infinite;
}
.relic-dungeon-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.relic-dungeon-banner > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.relic-dungeon-banner b    { font-size: 13px; color: #c4b5fd; }
.relic-dungeon-banner small { font-size: 11px; color: rgba(196,181,253,0.6); }
.relic-dungeon-banner-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.relic-dungeon-banner-btn:active { transform: scale(0.95); opacity: 0.85; }

/* ─── [DD-CSS-4] Оверлей подземелья ─────────────────────────────── */
#relicDungeonOverlay,
.relic-dungeon-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(3,1,12,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
#relicDungeonOverlay.relic-dungeon-overlay--visible,
.relic-dungeon-overlay.relic-dungeon-overlay--visible {
  display: flex;
  opacity: 1;
}

/* ─── [DD-CSS-5] Внутренний контейнер подземелья ────────────────── */
.relic-dungeon-inner {
  background: linear-gradient(165deg, rgba(18,8,42,0.99), rgba(8,4,22,1));
  border: 1px solid rgba(167,139,250,0.22);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 0 0 24px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -8px 40px rgba(124,58,237,0.2);
}

/* ─── [DD-CSS-6] Шапка оверлея подземелья ───────────────────────── */
.relic-dungeon-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(18,8,42,1) 80%, transparent);
  border-bottom: 1px solid rgba(167,139,250,0.1);
}
.relic-dungeon-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #c4b5fd;
  margin: 0;
}
.relic-dungeon-close {
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 8px;
  color: rgba(200,190,220,0.6);
  font-size: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.relic-dungeon-close:hover { background: rgba(255,255,255,0.12); color: #c4b5fd; }

/* ─── [DD-CSS-7] Статистика подземелья ──────────────────────────── */
.relic-dungeon-stats {
  display: flex;
  gap: 14px;
  padding: 10px 16px;
  font-size: 12px;
  color: rgba(200,190,220,0.6);
  border-bottom: 1px solid rgba(167,139,250,0.08);
}
.relic-dungeon-stats b { color: #a78bfa; }

/* ─── [DD-CSS-8] Список участников подземелья ───────────────────── */
.relic-dungeon-participants {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px;
}
.relic-dp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(200,190,220,0.7);
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s;
}
.relic-dp--turn {
  background: rgba(124,58,237,0.12);
  color: #c4b5fd;
  font-weight: 600;
}
.relic-dp--dead { opacity: 0.4; filter: grayscale(0.6); }

/* ─── [DD-CSS-9] Сетка подземелья ───────────────────────────────── */
.relic-dgrid {
  display: grid;
  gap: 5px;
  padding: 10px 16px;
}
.relic-dcell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  overflow: hidden;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.relic-dcell span:first-child {
  font-size: clamp(12px, 3.8vw, 20px);
  line-height: 1;
}
.relic-dcell small {
  font-size: clamp(7px, 2vw, 9px);
  color: #d4a851;
  font-weight: 700;
  white-space: nowrap;
}
.relic-dcell--closed {
  background: linear-gradient(145deg, rgba(40,15,90,0.85), rgba(20,8,50,0.9));
  border: 1px solid rgba(167,139,250,0.18);
  cursor: default;
}
.relic-dcell--clickable {
  cursor: pointer;
  border-color: rgba(167,139,250,0.4);
}
.relic-dcell--clickable:hover {
  border-color: rgba(196,181,253,0.65);
  box-shadow: 0 0 10px rgba(167,139,250,0.2);
  background: linear-gradient(145deg, rgba(60,20,120,0.85), rgba(35,12,80,0.9));
}
.relic-dcell--clickable:active { transform: scale(0.9); }
.relic-dcell--opening { opacity: 0.6; }
.relic-dcell--open {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: default;
}
.relic-dcell--skull {
  background: rgba(220,38,38,0.1);
  border-color: rgba(220,38,38,0.35);
}
.relic-dcell--prize {
  background: rgba(167,139,250,0.1);
  border-color: rgba(167,139,250,0.4);
}

/* ─── [DD-CSS-10] Финал подземелья (внутри оверлея) ─────────────── */
.relic-dungeon-finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-top: 1px solid rgba(167,139,250,0.12);
  margin-top: 8px;
}
.relic-dungeon-finale-icon  { font-size: 36px; }
.relic-dungeon-finale-title {
  font-size: 16px;
  font-weight: 700;
  color: #c4b5fd;
  text-align: center;
}
.relic-dungeon-finale-reward {
  font-size: 22px;
  font-weight: 800;
  color: #d4a851;
  text-shadow: 0 0 16px rgba(212,168,81,0.4);
}

/* ─── [DD-CSS-11] Кнопка «Вернуться на поле» ────────────────────── */
.relic-btn {
  padding: 11px 24px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.relic-btn:active { transform: scale(0.96); opacity: 0.85; }
.relic-btn--primary {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
   АНИМАЦИИ
   ═══════════════════════════════════════════════════════════════════ */

@keyframes relicPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes relicSpin {
  to { transform: rotate(360deg); }
}

@keyframes relicWaitDot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40%           { transform: scale(1.2); opacity: 1; }
}

@keyframes relicReveal {
  0%   { transform: scale(0.7) rotateY(90deg); opacity: 0; }
  100% { transform: scale(1)   rotateY(0deg);  opacity: 1; }
}

/* [DD] Пульсация ячейки-двери и баннера */
@keyframes relicDoorPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(167,139,250,0.2);
    border-color: rgba(167,139,250,0.45);
  }
  50% {
    box-shadow: 0 0 18px rgba(167,139,250,0.45);
    border-color: rgba(167,139,250,0.75);
  }
}
