/* Меню «Бешеных горок» (700 x 372) — вид из кабины. Сверху лобовое стекло: в нём едет твоя машина по твоей трассе,
   на зеркале заднего вида — название. Снизу приборная панель: тахометр «Поехали», датчики мощи и дальности, клавиши. */
.dm { --dash: #17191f; --dash2: #262a33; --chrome: #c9d1dc; --amber: #ffb21a; --lcd: #9dffb0; --red: #ff3b2f;
  position: absolute; inset: 0; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-weight: 800; color: #fff; }
.dm button { font: inherit; color: inherit; padding: 0; border: 0; background: none; }
.dm button * { pointer-events: none; }
.dm-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
/* стекло: тёмные стойки по краям и блик */
.dm-glass { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .13) 38%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(90deg, #0d0e12 0, #0d0e12 8px, rgba(13, 14, 18, 0) 34px, rgba(13, 14, 18, 0) calc(100% - 34px), #0d0e12 calc(100% - 8px));
  box-shadow: inset 0 26px 30px -18px rgba(0, 0, 0, .7); }
/* верх: профиль, зеркало, счётчики */
.dm-top { position: absolute; left: 14px; right: 14px; top: 8px; height: 50px; display: flex; align-items: flex-start; justify-content: space-between; }
.dm-me { width: 200px; text-align: left; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px !important; border-radius: 26px; background: rgba(14, 16, 21, .78) !important; border: 2px solid rgba(255, 255, 255, .14) !important; }
.dm-me:active { transform: scale(.97); }
.dm-ava { position: relative; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#ff7a3a, #d4280f); border: 2px solid var(--amber); font-size: 19px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.dm-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-mev { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-mev span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-mev small { font-size: 10px; color: #b8c2d0; font-weight: 700; } .dm-mev em { font-style: normal; color: var(--amber); font-weight: 900; }
.dm-xp { display: block; height: 5px; border-radius: 3px; background: #000; overflow: hidden; }
.dm-xp b { display: block; height: 100%; background: linear-gradient(90deg, #ffd23a, var(--amber)); transform-origin: 0 50%; transform: scaleX(0); }
.dm-cnts { width: 200px; display: flex; gap: 6px; justify-content: flex-end; }
.dm-cnt { position: relative; height: 36px; padding: 0 10px 0 6px !important; display: flex; align-items: center; gap: 5px; border-radius: 10px;
  background: rgba(14, 16, 21, .78) !important; border: 2px solid rgba(255, 255, 255, .14) !important; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--lcd) !important;
  text-shadow: 0 0 6px rgba(120, 255, 150, .55); }
.dm-cnt:active { transform: translateY(2px); }
.sbadge { position: absolute; right: -6px; top: -7px; width: 18px; height: 18px; border-radius: 9px; background: var(--red); border: 2px solid #fff; color: #fff; font-style: normal;
  font-size: 11px; display: none; align-items: center; justify-content: center; text-shadow: none; }
/* навигатор: куда едем */
.dm-nav { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; white-space: nowrap; padding: 4px 12px; border-radius: 14px;
  background: rgba(14, 16, 21, .72); font-size: 13px; }
.dm-nav span { color: #8fa0b5; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.dm-nav b { color: #fff; } .dm-nav i { font-style: normal; color: #9fe3ff; font-size: 11px; }
.dm-nav em { font-style: normal; display: none; padding: 1px 7px; border-radius: 8px; background: linear-gradient(#ff7ac8, #c41a7a); font-size: 11px; }
.dm-nav em.on { display: inline-block; }
/* служебные кнопки — как кнопки на руле, слева столбиком */
.dm-side { position: absolute; left: 16px; top: 92px; display: flex; flex-direction: column; gap: 7px; }
.dm-sb { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(14, 16, 21, .8) !important;
  border: 2px solid rgba(255, 255, 255, .2) !important; color: #fff; }
.dm-sb.off { opacity: .45; } .dm-sb:active { transform: scale(.92); }
/* приборная панель */
.dm-dash { position: absolute; left: 0; right: 0; bottom: 0; height: 112px; padding: 0 14px 10px; display: flex; align-items: flex-end; justify-content: space-between;
  background: radial-gradient(120% 140% at 50% 140%, var(--dash2) 0, var(--dash) 60%);
  border-top: 3px solid #0a0b0e; box-shadow: 0 -2px 0 rgba(255, 255, 255, .08), 0 -12px 24px rgba(0, 0, 0, .45); border-radius: 40% 40% 0 0 / 22px 22px 0 0; }
.dm-dash::before { content: ""; position: absolute; inset: 8px 14px 6px; border-radius: 14px; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 3px, rgba(0, 0, 0, 0) 3px 6px); }
.dm-keys { position: relative; display: flex; gap: 8px; }
.dm-key { position: relative; width: 72px; height: 68px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: linear-gradient(#3a3f4a, #20232a) !important; border: 2px solid #0a0b0e !important; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 4px 0 #0a0b0e;
  font-size: 11px; color: #e8eef5; }
.dm-key::after { content: ""; position: absolute; left: 14px; right: 14px; top: 5px; height: 4px; border-radius: 2px; background: var(--led); box-shadow: 0 0 8px var(--led); }
.dm-key svg { margin-top: 6px; }
.dm-key:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 1px 0 #0a0b0e; }
.k-gar { --led: #ff8a3a; } .k-shop { --led: #ff5ab4; } .k-q { --led: #ffe14a; } .k-chest { --led: #6a7080; }
.k-chest.ready { --led: #ffd23a; animation: dmpulse 1s ease-in-out infinite; }
#m-chest-t { font-variant-numeric: tabular-nums; }
.dm-key em { position: absolute; right: -6px; top: -7px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; display: none; align-items: center; justify-content: center;
  background: var(--red); border: 2px solid #fff; color: #fff; font-style: normal; font-size: 11px; }
/* круглые датчики */
.dm-gauge { position: relative; width: 86px; height: 86px; margin-bottom: 4px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #2c313b, #0d0f13 75%) !important; border: 3px solid var(--chrome) !important; box-shadow: 0 0 0 2px #0a0b0e, 0 6px 10px rgba(0, 0, 0, .5); }
.dm-gauge > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(135deg); }
.g-bg, .g-arc { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 160 999; }
.g-bg { stroke: rgba(255, 255, 255, .12); }
.g-arc { stroke-dasharray: 0 999; transition: stroke-dasharray .6s; }
.g-pr { stroke: var(--amber); filter: drop-shadow(0 0 3px var(--amber)); }
.g-fuel { stroke: #4fd8ff; stroke-dasharray: 120 999; filter: drop-shadow(0 0 3px #4fd8ff); }
.dm-gauge b { font-size: 22px; line-height: 1; color: var(--amber); font-variant-numeric: tabular-nums; text-shadow: 0 0 8px rgba(255, 178, 26, .6); }
.dm-gauge small { font-size: 8px; letter-spacing: 1px; color: #8fa0b5; margin-top: 2px; }
.dm-gauge i { font-style: normal; font-size: 9px; color: #e8eef5; margin-top: 1px; }
.dm-gauge .g-ic { color: #4fd8ff; }
.dm-gauge:active, .dm-tacho:active { transform: scale(.96); }
/* тахометр — главная кнопка */
.dm-tacho { position: relative; width: 156px; height: 156px; margin-bottom: 2px; border-radius: 50%; box-shadow: 0 0 0 3px #0a0b0e, 0 0 26px rgba(126, 232, 54, .4), 0 10px 16px rgba(0, 0, 0, .55); }
.dm-tacho svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-rim { stroke: #0a0b0e; stroke-width: 2; }
.t-face { fill: #0f1116; }
.t-tick { stroke: #e8eef5; stroke-width: 3; stroke-linecap: round; } .t-tick.s { stroke-width: 1.5; opacity: .6; } .t-tick.r { stroke: var(--red); }
.t-num { fill: #b8c2d0; font-size: 10px; font-weight: 800; text-anchor: middle; }
.t-needle path { fill: var(--red); }
.t-needle { transform-origin: 75px 75px; transform: rotate(-120deg); animation: dmidle 2.4s ease-in-out infinite; }
.dm-tacho:active .t-needle { animation: none; transform: rotate(100deg); transition: transform .15s; }
.t-hub { fill: #2a2f3a; stroke: var(--chrome); stroke-width: 2; }
.t-go { position: absolute; left: 0; right: 0; bottom: 30px; line-height: 0; text-align: center; }
.t-car { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 9px; color: #8fa0b5; letter-spacing: .5px; }
@keyframes dmidle { 0%, 100% { transform: rotate(-112deg); } 45% { transform: rotate(-100deg); } 55% { transform: rotate(-106deg); } }
@keyframes dmpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
/* «Онлайн» под спидометром (тахометр приподнят, чтобы плашка встала под ним с отступом) — как в «Битве фермеров»: мигающая зелёная точка и число игроков */
.dm-online { position: absolute; left: 50%; bottom: 7px; z-index: 2; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 12px; pointer-events: none;
  background: rgba(14, 16, 21, .82); border: 2px solid rgba(126, 232, 54, .55); font-size: 12px; color: #d8ffcc; white-space: nowrap; box-shadow: 0 0 10px rgba(126, 232, 54, .25); }
.dm-online i { width: 9px; height: 9px; border-radius: 50%; background: #7ee836; box-shadow: 0 0 8px #7ee836; animation: dmblink 1.1s ease-in-out infinite; }
.dm-online b { color: #7ee836; font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes dmblink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.dm-tacho { margin-bottom: 30px !important; }
/* название — нарисованные буквы на «холмах» (ui.js drawTitle), без плашки */
.dm-title { width: 296px; height: 87px; margin-top: -6px; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
/* плашка трассы: в одну строку, длинное название сокращается многоточием, ничего не вылезает */
.dm-nav { top: 98px; max-width: 420px; padding: 4px 6px 4px 10px; border: 2px solid rgba(255, 255, 255, .14); }
.dm-nav b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dm-nav span, .dm-nav i, .dm-nav em { flex-shrink: 0; }
/* «Улучшаем вместе» — справа под счётчиками */
.dm-ideas { position: absolute; right: 14px; top: 52px; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px !important; border-radius: 12px;
  background: linear-gradient(#2fd6c0, #138a7c) !important; border: 2px solid #0a0b0e !important; box-shadow: 0 3px 0 #0a0b0e, 0 0 12px rgba(47, 214, 192, .35); font-size: 11px; line-height: 1.1; text-align: left; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.dm-ideas:active { transform: translateY(2px); }
/* кнопки на панели должны читаться как кнопки (Иван): объёмная тень снизу, проседание при нажатии, свечение, ярлыки со стрелкой */
.dm-gauge { margin-bottom: 16px !important; box-shadow: 0 0 0 2px #0a0b0e, 0 5px 0 #05060a, 0 8px 12px rgba(0, 0, 0, .55) !important; transition: transform .08s, box-shadow .08s; }
.dm-gauge:active { transform: translateY(4px) !important; box-shadow: 0 0 0 2px #0a0b0e, 0 1px 0 #05060a, 0 3px 6px rgba(0, 0, 0, .5) !important; }
.dm-gauge i { font-size: 10px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-gauge .g-ic { margin-top: -4px; filter: drop-shadow(0 0 4px rgba(79, 216, 255, .7)); }
.g-chip { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); padding: 3px 9px; border-radius: 10px; border: 2px solid #0a0b0e; white-space: nowrap;
  font-size: 11px; font-weight: 900; line-height: 1.1; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); box-shadow: 0 2px 0 #05060a; animation: chipglow 2.2s ease-in-out infinite; }
.c-pr { background: linear-gradient(#ffc24a, #e07a00); } .c-adv { background: linear-gradient(#5ae0ff, #1877d8); }
@keyframes chipglow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
.dm-tacho { box-shadow: 0 0 0 3px #0a0b0e, 0 7px 0 #05060a, 0 12px 18px rgba(0, 0, 0, .55) !important; transition: transform .08s; }
.dm-tacho::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none; border: 6px solid rgba(160, 255, 120, .9); box-shadow: 0 0 14px rgba(126, 232, 54, .8), inset 0 0 10px rgba(126, 232, 54, .6); animation: tachopulse 1.6s ease-out infinite; }   /* светло-зелёный обод (Иван) */
@keyframes tachopulse { 0% { transform: scale(.96); opacity: .95; } 100% { transform: scale(1.12); opacity: 0; } }
.dm-tacho:active { transform: translateY(5px) !important; }
.t-go svg { position: static !important; width: 104px !important; height: auto !important; display: inline-block; }
#dm-cupv { font-size: 18px; margin-top: -2px; } .dm-gauge.g2 .g-ic { color: #ffd23a; filter: drop-shadow(0 0 4px rgba(255, 210, 58, .7)); margin-top: 0; }
.g-fuel { stroke-dasharray: 0 999; transition: stroke-dasharray .6s; }
