.sound-bar {
  position: fixed;
  z-index: 1000;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(930px, calc(100% - 36px));
  min-height: 72px;
  display: grid;
  grid-template-columns: 190px 1fr 160px;
  align-items: center;
  gap: 16px;
  padding: 9px 10px 9px 20px;
  color: #f7f8fb;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 22px;
  background: rgba(9,12,18,.82);
  box-shadow: 0 18px 60px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(22px);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.sound-brand { display:flex; align-items:center; gap:11px; font-size:12px; font-weight:800; letter-spacing:.17em; white-space:nowrap; }
.sound-brand i { width:22px; height:22px; border:2px solid #ff4b4b; border-radius:50%; box-shadow:0 0 16px rgba(255,75,75,.5); }
.sound-options { height:54px; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:4px; border-radius:16px; background:rgba(255,255,255,.045); }
.sound-choice { border:0; border-radius:12px; color:#9299a7; background:transparent; cursor:pointer; }
.sound-choice b,.sound-choice small { display:block; }
.sound-choice b { font-size:14px; }
.sound-choice small { margin-top:2px; font-size:8px; letter-spacing:.16em; opacity:.65; }
.sound-choice.active { color:#fff; background:linear-gradient(145deg,#343a47,#232833); box-shadow:0 5px 17px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.12); }
.engine-picker { position:relative; min-width:0; }
.engine-select-shell { position:relative; width:100%; height:54px; display:grid; grid-template-columns:34px 1fr 20px; align-items:center; gap:8px; padding:0 12px; overflow:hidden; border:1px solid rgba(255,255,255,.11); border-radius:16px; background:linear-gradient(145deg,rgba(55,62,76,.96),rgba(31,36,46,.96)); box-shadow:0 8px 24px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.1); text-align:left; cursor:pointer; }
.engine-select-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; color:#ff6565; background:rgba(255,76,76,.12); font-size:17px; }
.engine-select-copy { min-width:0; pointer-events:none; }
.engine-select-copy small,.engine-select-copy b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.engine-select-copy small { margin-bottom:2px; color:#929bab; font-size:8px; font-weight:800; letter-spacing:.14em; }
.engine-select-copy b { color:#fff; font-size:14px; }
.engine-select-arrow { color:#aab2c0; font-size:20px; pointer-events:none; }
.engine-select-shell:focus-within { border-color:rgba(255,87,87,.65); box-shadow:0 0 0 3px rgba(255,70,70,.12),0 8px 24px rgba(0,0,0,.2); }
.engine-picker.open .engine-select-arrow { transform:rotate(180deg); }
.engine-picker-menu { position:absolute; z-index:1300; top:66px; left:50%; width:min(600px,calc(100vw - 40px)); padding:12px; transform:translateX(-50%); border:1px solid rgba(255,255,255,.14); border-radius:22px; color:#fff; background:rgba(13,17,24,.97); box-shadow:0 26px 80px rgba(0,0,0,.48); backdrop-filter:blur(28px); }
.engine-picker-menu[hidden] { display:none !important; }
.engine-category-tabs { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; padding:4px; border-radius:14px; background:rgba(255,255,255,.05); }
.engine-category { min-width:0; height:39px; border:0; border-radius:11px; color:#8993a3; background:transparent; font-size:11px; font-weight:800; cursor:pointer; }
.engine-category small { margin-left:3px; opacity:.55; }
.engine-category.active { color:#fff; background:linear-gradient(145deg,#3d4553,#29303b); box-shadow:0 5px 15px rgba(0,0,0,.22); }
.engine-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; max-height:330px; margin-top:10px; overflow:auto; }
.engine-card { display:grid; grid-template-columns:42px 1fr 23px; align-items:center; gap:10px; min-height:61px; padding:8px 10px; border:1px solid transparent; border-radius:14px; color:#dce1e9; background:rgba(255,255,255,.045); text-align:left; cursor:pointer; }
.engine-card:hover { border-color:rgba(255,255,255,.14); background:rgba(255,255,255,.075); }
.engine-card>i { display:grid; place-items:center; width:40px; height:40px; border-radius:11px; color:#8d98a9; background:rgba(255,255,255,.06); font-size:10px; font-style:normal; font-weight:900; }
.engine-card span b,.engine-card span small { display:block; }
.engine-card span b { font-size:13px; }.engine-card span small { margin-top:3px; color:#7f8999; font-size:8px; font-weight:800; letter-spacing:.13em; }
.engine-card em { display:none; place-items:center; width:21px; height:21px; border-radius:50%; color:#fff; background:#ed4a4a; font-size:11px; font-style:normal; }
.engine-card.active { border-color:rgba(255,80,80,.34); background:linear-gradient(145deg,rgba(238,68,68,.16),rgba(255,255,255,.055)); }
.engine-card.active>i { color:#fff; background:linear-gradient(145deg,#ee5555,#c92f3d); }.engine-card.active em { display:grid; }
.engine-card.filtered-out { display:none; }
.sound-start { height:52px; border:0; border-radius:15px; color:#fff; background:#e63d3d; font-weight:750; cursor:pointer; box-shadow:0 10px 24px rgba(230,61,61,.25); }
.sound-start i { display:inline-block; width:7px; height:7px; margin-right:8px; border-radius:50%; background:currentColor; }
.sound-start.running { background:#282e39; box-shadow:none; }
.keyboard-drive {
  position:fixed;
  z-index:900;
  left:24px;
  bottom:24px;
  display:grid;
  grid-template-columns:auto auto;
  gap:8px;
  padding:11px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:17px;
  color:#e8ebf1;
  background:rgba(12,16,23,.72);
  box-shadow:0 14px 38px rgba(0,0,0,.2);
  backdrop-filter:blur(18px);
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
}
.keyboard-drive>div { display:flex; align-items:center; gap:7px; padding:5px 8px 5px 5px; border-radius:10px; background:rgba(255,255,255,.05); }
.keyboard-drive kbd { width:29px; height:29px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.18); border-radius:8px; background:linear-gradient(#363d49,#222832); box-shadow:0 3px 0 #11151c; font-size:12px; font-weight:850; }
.keyboard-drive span { font-size:11px; font-weight:700; }
.keyboard-drive small { grid-column:1/-1; padding:1px 4px 0; color:#8e97a6; font-size:9px; letter-spacing:.04em; }
.keyboard-drive kbd.pressed { color:#fff; background:#e33f3f; border-color:#ff7979; box-shadow:0 1px 0 #7f2020,0 0 18px rgba(227,63,63,.42); transform:translateY(2px); }
#keyS.pressed { background:#2886db; border-color:#70b8fa; box-shadow:0 1px 0 #155388,0 0 18px rgba(40,134,219,.42); }
.wind-canvas {
  position:fixed;
  z-index:850;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  opacity:0;
  transition:opacity .25s ease;
  mix-blend-mode:screen;
}
body.keyboard-moving .wind-canvas { opacity:1; }
.speed-meme {
  position:fixed;
  z-index:980;
  left:18px;
  right:auto;
  top:112px;
  width:min(310px,calc(100vw - 36px));
  padding:7px 7px 11px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:20px;
  color:#edf2f8;
  background:rgba(10,14,20,.82);
  box-shadow:0 22px 65px rgba(0,0,0,.36);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-10px) scale(.96);
  transform-origin:top left;
  transition:opacity .55s ease,transform .55s cubic-bezier(.2,.75,.2,1),visibility 0s linear .55s;
  backdrop-filter:blur(20px);
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
}
.speed-meme.visible { opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0) scale(1); transition-delay:0s; }
.speed-meme video { display:block; width:100%; max-height:230px; object-fit:cover; border-radius:14px; background:#000; }
.meme-never-label { display:flex; align-items:center; gap:9px; padding:10px 8px 1px; color:#aeb7c4; font-size:11px; cursor:pointer; }
.meme-never-label input,.meme-setting-row input { width:16px; height:16px; accent-color:#3f91e8; }
.meme-setting-row { margin-bottom:0 !important; }

.hud-speed-value,.hud-speed-unit { transition:color .35s ease,text-shadow .35s ease,filter .35s ease; }
body.speed-over-limit .hud-speed-value {
  color:#ff3636 !important;
  animation:speedLimitPulse .78s ease-in-out infinite alternate;
}
body.speed-over-limit .hud-speed-unit {
  color:#ff7272 !important;
  text-shadow:0 0 12px rgba(255,54,54,.58);
}

.gear-hud {
  position:fixed;
  z-index:85;
  left:50%;
  bottom:28px;
  display:grid;
  grid-template-columns:auto 42px auto;
  align-items:center;
  gap:10px;
  min-width:176px;
  padding:8px 13px;
  transform:translateX(-50%);
  border:1px solid rgba(255,255,255,.13);
  border-radius:15px;
  color:#d9dee7;
  background:rgba(10,13,19,.68);
  box-shadow:0 12px 35px rgba(0,0,0,.24);
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  backdrop-filter:blur(16px);
  pointer-events:none;
}
.gear-caption,.rpm-value { font-size:9px; font-weight:750; letter-spacing:.12em; opacity:.66; }
.gear-hud b { display:grid; place-items:center; height:34px; border-radius:10px; color:#fff; background:rgba(255,255,255,.1); font-size:20px; }
.gear-hud.shifting b { animation:gearFlash .34s ease; color:#ff5b5b; }
@keyframes gearFlash { 50% { transform:scale(.78); opacity:.35; box-shadow:0 0 20px rgba(255,70,70,.7); } }

.geo-prompt {
  position:fixed;
  z-index:2400;
  left:50%;
  top:50%;
  width:min(410px,calc(100% - 32px));
  padding:28px;
  transform:translate(-50%,-50%);
  border:1px solid rgba(255,255,255,.16);
  border-radius:28px;
  color:#f7f9fc;
  background:radial-gradient(circle at 18% 0,rgba(63,145,255,.24),transparent 42%),rgba(10,14,21,.96);
  box-shadow:0 32px 100px rgba(0,0,0,.55);
  text-align:center;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  backdrop-filter:blur(28px);
}
.geo-prompt[hidden] { display:none !important; }
.geo-icon { display:grid; place-items:center; width:62px; height:62px; margin:0 auto 16px; border-radius:20px; color:#fff; background:linear-gradient(145deg,#438eff,#1765e8); box-shadow:0 13px 32px rgba(37,112,236,.35); font-size:34px; }
.geo-copy small { color:#69a7ff; font-size:9px; font-weight:850; letter-spacing:.22em; }
.geo-copy h2 { margin:8px 0 9px; color:#fff; font-size:23px; letter-spacing:-.03em; }
.geo-copy p { margin:0 auto 20px; max-width:330px; color:#adb7c7; font-size:13px; line-height:1.55; }
.geo-prompt button { width:100%; min-height:50px; border:0; border-radius:15px; color:#fff; background:linear-gradient(135deg,#377ff5,#1762db); font-size:14px; font-weight:800; cursor:pointer; }
.geo-prompt .geo-retry { margin-top:8px; color:#cbd3df; background:rgba(255,255,255,.08); }
.geo-prompt.denied .geo-icon { background:linear-gradient(145deg,#ef5a5a,#c72d3d); }
@keyframes speedLimitPulse {
  from { text-shadow:0 0 8px rgba(255,42,42,.42),0 0 22px rgba(255,30,30,.15); filter:brightness(.95); }
  to { text-shadow:0 0 13px rgba(255,68,68,.95),0 0 36px rgba(255,30,30,.48); filter:brightness(1.22); }
}
.controls { display:none !important; }
.hud { top:110px !important; }
.settings-shell { z-index:1100 !important; font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.settings-toggle {
  z-index:1101 !important;
  min-width:112px !important;
  min-height:46px !important;
  padding:0 20px !important;
  border-radius:15px !important;
  font-size:13px !important;
  font-weight:750 !important;
  letter-spacing:.02em;
  box-shadow:0 12px 32px rgba(20,27,38,.16) !important;
  backdrop-filter:blur(18px);
  transition:transform .18s ease,background .18s ease !important;
}
.settings-toggle:hover { transform:translateY(-2px); }
.settings-panel {
  z-index:1100 !important;
  width:min(390px,calc(100vw - 28px)) !important;
  max-height:calc(100vh - 105px) !important;
  padding:20px !important;
  border-radius:24px !important;
  overflow:auto !important;
  scrollbar-width:thin;
  backdrop-filter:blur(28px);
}
.settings-section { padding:0 0 18px !important; margin:0 0 18px !important; border-bottom:1px solid rgba(128,138,153,.18); }
.settings-section:last-of-type { margin-bottom:12px !important; }
.settings-label { margin-bottom:10px !important; font-size:10px !important; font-weight:850 !important; letter-spacing:.15em; text-transform:uppercase; }
.model-quick-pick { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px !important; }
.model-quick-pick button { min-height:42px !important; padding:8px 10px !important; border:1px solid transparent !important; border-radius:12px !important; font-size:12px !important; font-weight:700 !important; transition:.18s ease !important; }
.model-quick-pick button:hover { transform:translateY(-1px); filter:brightness(1.04); }
.color-swatch-row { display:flex !important; gap:10px !important; flex-wrap:wrap; }
.color-swatch-row button { width:38px !important; height:38px !important; border:3px solid rgba(255,255,255,.78) !important; box-shadow:0 3px 10px rgba(0,0,0,.2) !important; transition:transform .18s ease,box-shadow .18s ease !important; }
.color-swatch-row button:hover { transform:scale(1.1); }
.color-swatch-row button.active { transform:scale(1.08); box-shadow:0 0 0 3px #4a8cff,0 5px 14px rgba(0,0,0,.22) !important; }
.color-caption { margin-top:11px !important; text-align:left !important; }
.color-included { font-size:10px !important; letter-spacing:.08em; text-transform:uppercase; }
.color-name { margin-top:2px; font-size:14px !important; font-weight:750 !important; }
.unit-toggle { display:grid !important; grid-auto-flow:column; grid-auto-columns:1fr; gap:6px !important; padding:4px !important; border-radius:13px !important; background:rgba(122,132,147,.12); }
.unit-btn { min-height:37px !important; border:0 !important; border-radius:9px !important; font-size:12px !important; font-weight:750 !important; transition:.18s ease !important; }
.settings-check-row { display:flex !important; align-items:center; gap:9px; margin:0 0 10px !important; font-size:12px !important; }
.settings-check-row input { width:17px; height:17px; accent-color:#3d83f6; }
.support-toggle {
  width:100% !important;
  min-height:58px !important;
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding:10px 15px !important;
  border:0 !important;
  border-radius:14px !important;
  color:#fff !important;
  background:linear-gradient(135deg,#35aee2,#1877d2) !important;
  box-shadow:0 10px 24px rgba(24,119,210,.22);
  cursor:pointer;
}
.support-toggle span { font-size:13px; font-weight:800; }
.support-toggle small { margin-top:2px; font-size:10px; opacity:.78; }

.support-popup {
  position:fixed !important;
  z-index:2000 !important;
  top:50% !important;
  left:50% !important;
  right:auto !important;
  bottom:auto !important;
  width:min(420px,calc(100% - 34px)) !important;
  padding:32px !important;
  transform:translate(-50%,-50%) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:28px !important;
  color:#f6f8fc !important;
  background:radial-gradient(circle at 20% 0,rgba(54,174,226,.2),transparent 42%),rgba(12,16,23,.96) !important;
  box-shadow:0 34px 100px rgba(0,0,0,.5) !important;
  text-align:center;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  backdrop-filter:blur(30px);
}
.support-popup[hidden] { display:none !important; }
.support-close { position:absolute !important; top:13px !important; right:13px !important; width:36px !important; height:36px !important; border:0 !important; border-radius:50% !important; color:#aeb5c1 !important; background:rgba(255,255,255,.07) !important; font-size:25px !important; line-height:1 !important; cursor:pointer; }
.telegram-logo { width:60px; height:60px; display:grid; place-items:center; margin:0 auto 16px; padding-right:4px; border-radius:19px; color:#fff; background:linear-gradient(145deg,#42bcec,#168bd0); box-shadow:0 14px 34px rgba(26,151,216,.32); font-size:28px; transform:rotate(-10deg); }
.support-kicker { color:#43b9eb; font-size:9px; font-weight:850; letter-spacing:.22em; }
.support-popup h2 { margin:8px 0 10px !important; color:#fff !important; font-size:24px !important; letter-spacing:-.03em; }
.support-copy { margin:0 auto 22px !important; max-width:330px; color:#aeb6c4 !important; font-size:13px !important; line-height:1.55 !important; }
.telegram-link { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 17px; border-radius:15px; color:#fff; background:linear-gradient(135deg,#2aaee8,#1879d2); text-decoration:none; box-shadow:0 12px 28px rgba(23,126,210,.25); }
.telegram-link span { font-size:13px; font-weight:750; }.telegram-link b { font-size:12px; opacity:.82; }

body.menu-dark .sound-bar {
  color:#f7f8fb;
  background:rgba(9,12,18,.88);
  border-color:rgba(255,255,255,.13);
}
body.menu-dark .settings-panel {
  color:#f4f6fa;
  background:rgba(16,19,26,.96) !important;
  border-color:rgba(255,255,255,.14) !important;
}
body.menu-dark .settings-toggle {
  color:#f4f6fa !important;
  background:rgba(16,19,26,.9) !important;
  border-color:rgba(255,255,255,.16) !important;
}
body.menu-dark .settings-label,
body.menu-dark .color-included,
body.menu-dark .settings-check-row { color:#c6cbd5 !important; }
body.menu-dark .unit-btn,
body.menu-dark .model-quick-pick button { color:#d8dce5 !important; background:#292e38 !important; }
body.menu-dark .unit-btn.active,
body.menu-dark .model-quick-pick button.active { color:#fff !important; background:#4b5362 !important; }

body:not(.menu-dark) .sound-bar {
  color:#151922;
  background:rgba(246,248,252,.9);
  border-color:rgba(20,25,34,.14);
  box-shadow:0 18px 60px rgba(38,45,58,.18),inset 0 1px #fff;
}
body:not(.menu-dark) .sound-options { background:rgba(25,31,42,.07); }
body:not(.menu-dark) .sound-choice { color:#6c7380; }
body:not(.menu-dark) .sound-choice.active { color:#fff; }
body:not(.menu-dark) .engine-select-shell { border-color:rgba(24,31,42,.14); background:linear-gradient(145deg,#fff,#e9edf3); box-shadow:0 8px 22px rgba(33,42,55,.13),inset 0 1px #fff; }
body:not(.menu-dark) .engine-select-copy b { color:#202631; }
body:not(.menu-dark) .engine-select-copy small,body:not(.menu-dark) .engine-select-arrow { color:#747e8d; }
body:not(.menu-dark) .engine-picker-menu { color:#202631; border-color:rgba(26,34,46,.14); background:rgba(248,250,253,.98); box-shadow:0 26px 70px rgba(30,40,55,.24); }
body:not(.menu-dark) .engine-category-tabs { background:rgba(24,31,42,.06); }
body:not(.menu-dark) .engine-category.active { color:#fff; }
body:not(.menu-dark) .engine-card { color:#222936; background:rgba(24,31,42,.045); }
@media(max-width:620px){.engine-card-grid{grid-template-columns:1fr}.engine-picker-menu{width:calc(100vw - 24px)}.engine-category{font-size:9px}}
body:not(.menu-dark) .settings-panel {
  color:#1c222c;
  background:rgba(248,250,253,.97) !important;
  border-color:rgba(24,31,42,.15) !important;
  box-shadow:0 18px 48px rgba(27,35,48,.2) !important;
}
body:not(.menu-dark) .settings-toggle {
  color:#1d232d !important;
  background:rgba(248,250,253,.94) !important;
  border-color:rgba(24,31,42,.22) !important;
}
body:not(.menu-dark) .settings-label,
body:not(.menu-dark) .color-included,
body:not(.menu-dark) .settings-check-row { color:#4b5360 !important; }
body:not(.menu-dark) .color-name { color:#171c24 !important; }
body:not(.menu-dark) .unit-btn,
body:not(.menu-dark) .model-quick-pick button,
body:not(.menu-dark) .support-toggle { color:#2b323d !important; background:#e4e8ee !important; }
body:not(.menu-dark) .unit-btn.active,
body:not(.menu-dark) .model-quick-pick button.active { color:#fff !important; background:#4b5565 !important; }
@media(max-width:720px){.sound-bar{top:10px;grid-template-columns:1fr 112px;padding:8px}.sound-brand{display:none}.sound-start{height:54px}}
