/* ========================================================================= */
/* TAUKE VPE 80-1P — MAIN STYLESHEET (100% SELF-HOSTED FONTS + STUDIO + SIM) */
/* Host Path: public_html/assets/css/main.css                                */
/* ========================================================================= */

/* Local Self-Hosted Technical Display Variable Fonts (Zero Google Fonts) */
@font-face {
  font-family: 'Orbitron';
  src: url('../fonts/orbitron-vf.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-vf.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Local Self-Hosted Vazirmatn Variable Font (Modern Browsers — Single File) */
@supports (font-variation-settings: normal) {
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-vf.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }
}

/* Local Self-Hosted Vazirmatn Static Fallback (Legacy Browsers Only) */
@supports not (font-variation-settings: normal) {
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-extralight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-extrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
  }
}

:root {
  --ink: #1d1731;
  --ink-muted: #57506a;
  --accent: #574293;
  --accent-soft: #624c9d;
  --dot: #9768de;
  --line: rgba(29, 23, 49, 0.11);
  --border: #e5deee;
  --border-strong: #dcd1e9;
  --surface: #f0ebf6;
  --bg: #f8f6fa;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
  font-feature-settings: "ss01";
  text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #6f49bd;
  outline-offset: 4px;
}

.tabular { font-variant-numeric: tabular-nums; }
.text-pretty { text-wrap: pretty; }

/* Force Latin (English) digits for model codes & 3D badges inside Vazirmatn */
.en-digits,
.font-mono,
.font-spec,
.font-oled {
  font-feature-settings: "ss01" 0;
}
.en-digits {
  unicode-bidi: isolate;
}

/* Modern Industrial-Luxury Persian Headline Treatment */
.hero-editorial-title {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  letter-spacing: -0.025em;
  font-feature-settings: "kern" 1, "liga" 1, "ss01" 1;
}
.hero-title-accent {
  background: linear-gradient(255deg, #2b2042 0%, #5b4399 52%, #8660cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Layer 0: GPU-Composited Pure CSS Studio Backdrop (Replaces 2nd WebGL Context) */
.studio-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f6fc 0%, #efecf8 52%, #e7e4f4 100%);
}
.backdrop-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(78px);
  will-change: transform;
  opacity: 0.62;
}
.backdrop-blob.blob-a {
  width: 58vmax;
  height: 58vmax;
  top: -18vmax;
  right: -12vmax;
  background: radial-gradient(circle, rgba(188, 202, 255, 0.85) 0%, rgba(188, 202, 255, 0) 70%);
  animation: studioDriftA 22s ease-in-out infinite alternate;
}
.backdrop-blob.blob-b {
  width: 54vmax;
  height: 54vmax;
  bottom: -20vmax;
  left: -14vmax;
  background: radial-gradient(circle, rgba(255, 204, 232, 0.72) 0%, rgba(255, 204, 232, 0) 70%);
  animation: studioDriftB 26s ease-in-out infinite alternate;
}
.backdrop-blob.blob-c {
  width: 36vmax;
  height: 36vmax;
  top: -8vmax;
  left: -6vmax;
  opacity: 0.42;
  background: radial-gradient(circle, rgba(255, 204, 232, 0.65) 0%, rgba(188, 202, 255, 0) 72%);
  animation: studioDriftA 30s ease-in-out infinite alternate-reverse;
}
@keyframes studioDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4vw, 3vh, 0) scale(1.06); }
}
@keyframes studioDriftB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, -3vh, 0) scale(1.08); }
}

/* Dynamic Aura Following the 3D Stage Anchor */
.backdrop-aura {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  margin-top: -260px;
  border-radius: 9999px;
  background:
    radial-gradient(circle at 38% 38%, rgba(255, 255, 255, 0.62) 0%, transparent 45%),
    radial-gradient(circle at 60% 45%, rgba(188, 202, 255, 0.70) 0%, rgba(255, 204, 232, 0.48) 46%, transparent 72%);
  filter: blur(42px);
  opacity: 0.78;
  will-change: transform, opacity;
  transition: opacity 0.35s ease;
}
.backdrop-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  margin-left: -160px;
  margin-top: -160px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 36px rgba(151, 104, 222, 0.25);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.backdrop-pulse.is-pulsing {
  animation: auraRingPulse 1.25s var(--ease) forwards;
}
@keyframes auraRingPulse {
  0%   { opacity: 0.48; transform: translate3d(var(--px, 50vw), var(--py, 50vh), 0) scale(0.45); }
  100% { opacity: 0;    transform: translate3d(var(--px, 50vw), var(--py, 50vh), 0) scale(2.4); }
}

.studio-grain,
.studio-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.studio-grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.studio-vignette {
  background: radial-gradient(130% 95% at 50% 42%, transparent 56%, rgba(64, 70, 110, 0.14) 100%);
}

/* Layer 15: Single Fixed Full-Viewport Transparent WebGL Canvas */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 15;
  pointer-events: none;
  touch-action: pan-y;
}

/* Clean loading... overlay inside 3D anchor stages */
.model-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
body.has-3d-model .model-loading-overlay {
  opacity: 0;
  visibility: hidden;
}
.model-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px -18px rgba(43, 32, 66, 0.24);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #574293;
}
.model-loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 2px solid rgba(151, 104, 222, 0.24);
  border-top-color: #574293;
  animation: modelSpin 0.85s linear infinite;
}
@keyframes modelSpin {
  to { transform: rotate(360deg); }
}

/* Floating Header */
#nav {
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
@media (min-width: 1024px) {
  #nav.is-scrolled {
    background: linear-gradient(180deg, rgba(245, 242, 252, 0.24) 0%, rgba(235, 229, 248, 0.12) 100%);
    backdrop-filter: blur(18px) saturate(1.45);
    -webkit-backdrop-filter: blur(18px) saturate(1.45);
    border-bottom-color: rgba(255, 255, 255, 0.48);
    box-shadow: 0 10px 30px -22px rgba(43, 32, 66, 0.18), inset 0 -1px 0 rgba(98, 76, 157, 0.08);
  }
}

.studio-eyebrow-dot {
  background: #9768de;
  box-shadow: 0 0 0 0 rgba(151, 104, 222, 0.55);
  animation: studioPulse 2.4s var(--ease) infinite;
}
@keyframes studioPulse {
  0% { box-shadow: 0 0 0 0 rgba(151, 104, 222, 0.52); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

.scroll-cue-line {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 1px;
  background: rgba(98, 76, 157, 0.24);
  overflow: hidden;
}
.scroll-cue-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(87, 66, 147, 0.68);
  transform: translateX(100%);
  animation: scrollCueSlide 2.6s var(--ease) infinite;
}
@keyframes scrollCueSlide {
  0% { transform: translateX(100%); }
  60%, 100% { transform: translateX(-100%); }
}

#hero-3d-hint {
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s var(--ease);
}
body.no-3d-model #hero-3d-hint,
body.hero-exploded-focus #hero-3d-hint {
  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
}

.pearl-pill {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px -16px rgba(43, 32, 66, 0.22);
}

.onyx-pill {
  background: #2b2042;
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 10px 28px -12px rgba(43, 32, 66, 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s ease;
}
.onyx-pill:hover {
  background: #483372;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 16px 32px -12px rgba(87, 66, 147, 0.55);
}
.onyx-pill:active,
.ghost-pill:active {
  transform: scale(0.97);
}
.btn-arrow {
  transition: transform 0.3s var(--ease);
}
.onyx-pill:hover .btn-arrow {
  transform: translateX(-3px);
}

.ghost-pill {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  color: #2b2042;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.3s var(--ease);
}
.ghost-pill:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(43, 32, 66, 0.22);
  transform: translateY(-1px);
}

/* Hero Exploded Focus Mode Transitions */
#hero-copy {
  transition: opacity 0.52s var(--ease), transform 0.58s var(--ease), filter 0.48s var(--ease);
  will-change: opacity, transform;
}
body.hero-exploded-focus #hero-copy {
  opacity: 0;
  transform: translateX(34px) scale(0.985);
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 1023px) {
  body.hero-exploded-focus #hero-copy {
    transform: translateY(22px) scale(0.98);
  }
}

.spec-value {
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  letter-spacing: -0.025em;
}

.pearl-frame {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.66), rgba(242, 232, 252, 0.34) 55%, rgba(255, 255, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 60px -36px rgba(43, 32, 66, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.studio-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(246, 242, 252, 0.48));
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.90);
  box-shadow:
    0 24px 56px -34px rgba(43, 32, 66, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Studio Projected 3D Callouts */
.callout {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  display: flex;
  align-items: center;
  direction: ltr;
}
.callout.flip { flex-direction: row-reverse; }
.callout-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #2b2042;
  flex-shrink: 0;
}
.callout-line {
  width: 18px;
  height: 1px;
  background: rgba(29, 23, 49, 0.34);
  flex-shrink: 0;
}
@media (min-width: 1024px) {
  .callout-line { width: 34px; }
}
.callout-box {
  direction: rtl;
  text-align: right;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 6px 11px;
  color: #2b2042;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .callout-box {
    padding: 7px 13px;
    min-width: 148px;
    max-width: 215px;
    white-space: normal;
  }
}

#cursorChip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  background: #1d1731;
  color: #f8f6fa;
  will-change: transform, opacity;
}

#drop-overlay {
  background: rgba(248, 246, 250, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fade-in { animation: fadeIn 0.28s ease-out forwards; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Interactive Iran SVG Map City Highlighting */
.map-city { cursor: pointer; }
.map-city .map-halo {
  opacity: 0;
  fill: #9768de;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.map-city .map-dot {
  fill: #624c9d;
  stroke: transparent;
  stroke-width: 0;
  transition: r 0.25s var(--ease), fill 0.25s ease, stroke 0.25s ease, stroke-width 0.25s ease;
}
.map-city .map-label {
  fill: #57506a;
  font-weight: 600;
  transition: fill 0.22s ease;
}
.map-city:hover .map-dot {
  fill: #2b2042;
}
.map-city:hover .map-label {
  fill: #1d1731;
}
.map-city.is-active .map-halo {
  opacity: 0.4;
  animation: mapCityPulse 2.1s ease-out infinite;
}
.map-city.is-active .map-dot {
  fill: #2b2042;
  stroke: #ffffff;
  stroke-width: 2px;
}
.map-city.is-active .map-label {
  fill: #1d1731;
  font-weight: 800;
}
@keyframes mapCityPulse {
  0%   { transform: scale(0.8); opacity: 0.5; }
  75%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ========================================================================= */
/* SECTION 4: LIVE VOLTAGE & KNOBS SIMULATOR STYLES                          */
/* ========================================================================= */
.guide-drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.36s var(--ease), opacity 0.28s ease, margin-bottom 0.36s var(--ease), visibility 0.36s;
  margin-bottom: 0;
}
.guide-drawer.open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  margin-bottom: 1.15rem;
}
.guide-drawer-inner { overflow: hidden; }

.top-pill-btn {
  transition: transform 0.18s var(--ease), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.top-pill-btn:hover { transform: translateY(-1px); }
.top-pill-btn:active { transform: scale(0.96); }

.mobile-sticky-hud {
  position: fixed;
  top: 10px;
  left: 50%;
  width: calc(100% - 20px);
  max-width: 440px;
  z-index: 60;
  transform: translate(-50%, -130%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s var(--ease), opacity 0.25s ease;
  background: rgba(29, 23, 49, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(229, 222, 238, 0.18);
  box-shadow: 0 16px 36px -8px rgba(29, 23, 49, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.mobile-sticky-hud.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.device-halo {
  position: absolute;
  inset: -14px;
  border-radius: 34px;
  filter: blur(26px);
  opacity: 0.58;
  pointer-events: none;
  transition: background 0.45s ease, opacity 0.45s ease;
  z-index: 0;
}
.halo-off { background: radial-gradient(circle, rgba(148, 163, 184, 0.35), rgba(139, 92, 246, 0.16), transparent 72%); }
.halo-boot { background: radial-gradient(circle, rgba(56, 189, 248, 0.55), rgba(99, 102, 241, 0.3), transparent 72%); }
.halo-secure { background: radial-gradient(circle, rgba(16, 185, 129, 0.48), rgba(14, 165, 233, 0.26), transparent 72%); }
.halo-delay { background: radial-gradient(circle, rgba(245, 158, 11, 0.52), rgba(249, 115, 22, 0.26), transparent 72%); }
.halo-fault {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.62), rgba(244, 63, 94, 0.35), transparent 72%);
  animation: faultHaloPulse 1.1s ease-in-out infinite alternate;
}
@keyframes faultHaloPulse {
  from { opacity: 0.45; transform: scale(0.98); }
  to { opacity: 0.8; transform: scale(1.03); }
}

.din-body {
  background: linear-gradient(180deg, #fafbfe 0%, #e7ecf4 100%);
  border: 1px solid #d1d9e8;
  box-shadow: 0 22px 42px -18px rgba(29, 23, 49, 0.36), 0 4px 12px -4px rgba(29, 23, 49, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.din-faceplate {
  background: linear-gradient(155deg, #ffffff 0%, #f5f7fc 55%, #e8edf6 100%);
  border: 1px solid #d7dfec;
  box-shadow: 0 18px 34px -14px rgba(29, 23, 49, 0.32), 0 3px 8px rgba(29, 23, 49, 0.09), inset 0 2px 0 rgba(255, 255, 255, 1), inset 0 -3px 6px rgba(148, 163, 184, 0.24);
}

.tft-bezel {
  background: #000000;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 1), inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 2.5px #cfd8e6, 0 8px 18px -6px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}
.tft-bezel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 18;
}
.tft-bezel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.015) 28%, transparent 42%);
  pointer-events: none;
  z-index: 20;
}

.tft-power-btn {
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.24), rgba(0, 0, 0, 0.98));
  border: 1.5px solid rgba(56, 189, 248, 0.78);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.36), inset 0 1px 2px rgba(255, 255, 255, 0.22);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, border-color 0.2s ease;
}
.tft-power-btn:hover {
  transform: scale(1.07);
  border-color: rgba(125, 211, 252, 1);
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.58);
}
.tft-power-btn:active { transform: scale(0.94); }

.device-mini-power {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.16s var(--ease), box-shadow 0.16s ease, opacity 0.2s ease;
}
.device-mini-power:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.65);
}
.device-mini-power:active { transform: scale(0.92); }

.blue-knob-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.blue-knob-wrap:active { cursor: grabbing; }

.blue-knob {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: radial-gradient(circle at 30% 26%, #67e8f9 0%, #0ea5e9 46%, #0284c7 76%, #0369a1 100%);
  box-shadow: 0 5px 12px rgba(2, 132, 199, 0.42), 0 1.5px 3px rgba(15, 23, 42, 0.25), inset 0 2px 3px rgba(255, 255, 255, 0.6), inset 0 -3px 5px rgba(7, 89, 133, 0.72);
  border: 1.5px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.16s ease, transform 0.12s ease;
}
.blue-knob-wrap:hover .blue-knob {
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.42), 0 6px 14px rgba(2, 132, 199, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.68);
}
.blue-knob-wrap.dragging .blue-knob {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.55), 0 6px 16px rgba(220, 38, 38, 0.48), inset 0 2px 3px rgba(255, 255, 255, 0.62);
  border-color: #ef4444;
}

.knob-dial {
  width: 25px;
  height: 25px;
  border-radius: 9999px;
  background: radial-gradient(circle at 40% 35%, #38bdf8 0%, #0284c7 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
  position: relative;
  will-change: transform;
}
.knob-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.5px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: linear-gradient(90deg, #075985 0%, #0c4a6e 50%, #7dd3fc 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}
.knob-slot::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  height: 5px;
  border-radius: 1px;
  background: #f0f9ff;
}

.knob-bubble {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  background: linear-gradient(135deg, #ef4444, #be123c);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.52);
  border: 1px solid rgba(254, 202, 202, 0.72);
  transition: opacity 0.16s ease, transform 0.16s var(--ease);
  z-index: 30;
}
.blue-knob-wrap.dragging .knob-bubble {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.hw-black-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(145deg, #333845 0%, #111318 65%, #07080a 100%);
  border: 1px solid #000000;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.28);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  cursor: pointer;
}
.hw-black-btn:active,
.hw-black-btn.pressed { transform: translateY(2px) scale(0.94); }
.hw-black-btn.delay-ready { animation: pulseAmberRing 1.1s infinite; }

@keyframes pulseAmberRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75), 0 3px 7px rgba(0, 0, 0, 0.38); }
  50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0), 0 3px 7px rgba(0, 0, 0, 0.38); }
}

.terminal-well {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 55%, #94a3b8 0%, #cbd5e1 68%, #e2e8f0 100%);
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.42), 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screw-head {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: conic-gradient(from 45deg, #cbd5e1, #64748b, #e2e8f0, #475569, #cbd5e1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  position: relative;
}
.screw-head::before,
.screw-head::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #334155;
  border-radius: 1px;
}
.screw-head::before { width: 11px; height: 2.5px; transform: translate(-50%, -50%) rotate(25deg); }
.screw-head::after { width: 2.5px; height: 11px; transform: translate(-50%, -50%) rotate(25deg); }

.pro-chip { transition: all 0.18s var(--ease); }
.pro-chip:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(98, 76, 157, 0.38);
  transform: translateY(-1px);
}
.pro-chip:active { transform: scale(0.97); }
.pro-chip.is-active {
  background: #2b2042;
  color: #ffffff;
  border-color: #2b2042;
  box-shadow: 0 6px 16px -6px rgba(43, 32, 66, 0.45);
}
.pro-chip.summer-active {
  background: linear-gradient(135deg, #ea580c, #e11d48);
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 6px 18px -5px rgba(234, 88, 12, 0.5);
}

.appliance-chip { transition: all 0.18s var(--ease); }
.appliance-chip:hover {
  border-color: rgba(98, 76, 157, 0.45);
  background: rgba(255, 255, 255, 1);
}
.appliance-chip:active { transform: scale(0.97); }
.appliance-chip.on {
  background: linear-gradient(135deg, rgba(98, 76, 157, 0.12), rgba(14, 165, 233, 0.10));
  border-color: #574293;
  box-shadow: 0 4px 12px -4px rgba(87, 66, 147, 0.25);
}
.appliance-chip.on-overload {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(244, 63, 94, 0.10));
  border-color: #e11d48;
  box-shadow: 0 4px 12px -4px rgba(225, 29, 72, 0.3);
}

.v-fader-track {
  position: relative;
  width: 44px;
  height: 126px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244, 240, 250, 0.7) 0%, rgba(255, 255, 255, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 2px 6px rgba(43, 32, 66, 0.08), 0 4px 12px rgba(87, 66, 147, 0.05);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ns-resize;
}
.v-fader-ticks {
  position: absolute;
  inset: 8px 6px;
  background-image: repeating-linear-gradient(to bottom, rgba(30, 27, 75, 0.14) 0px, rgba(30, 27, 75, 0.14) 1px, transparent 1px, transparent 14px);
  pointer-events: none;
  z-index: 4;
  border-radius: 8px;
}
.v-zone-danger {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(-45deg, rgba(244, 63, 94, 0.24), rgba(244, 63, 94, 0.24) 4px, rgba(244, 63, 94, 0.06) 4px, rgba(244, 63, 94, 0.06) 8px);
  pointer-events: none;
  transition: top 0.12s ease, bottom 0.12s ease, height 0.12s ease;
}
.v-zone-safe {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.36), rgba(16, 185, 129, 0.22));
  border-top: 2px solid #059669;
  border-bottom: 2px solid #059669;
  pointer-events: none;
  transition: top 0.12s ease, bottom 0.12s ease, height 0.12s ease;
}
.v-zone-safe-amp {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.28), rgba(56, 189, 248, 0.14));
  border-top: 2px solid #0284c7;
  pointer-events: none;
  transition: height 0.12s ease;
}
.v-fill-bar {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 5px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 5;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.v-thumb {
  position: absolute;
  left: 50%;
  width: 52px;
  height: 22px;
  transform: translate(-50%, 50%);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f0f9 100%);
  border: 2px solid #2b2042;
  box-shadow: 0 6px 16px rgba(43, 32, 66, 0.24), inset 0 1px 0 #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  pointer-events: none;
  z-index: 12;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.v-fader-track.active-drag .v-thumb {
  transform: translate(-50%, 50%) scale(1.09);
  border-color: #624c9d;
  box-shadow: 0 8px 20px rgba(98, 76, 157, 0.38);
}
.v-thumb-led {
  width: 24px;
  height: 3.5px;
  border-radius: 999px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.v-limit-tag {
  position: absolute;
  left: calc(100% + 8px);
  transform: translateY(50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  pointer-events: none;
  z-index: 15;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}
.v-limit-tag.limit-red-pulse {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.65);
  transform: translateY(50%) scale(1.12);
}

@media (max-width: 639px) {
  .v-fader-track { width: 34px; height: 148px; border-radius: 12px; }
  .v-fill-bar { left: 5px; right: 5px; border-radius: 8px; }
  .v-thumb { width: 42px; height: 20px; border-radius: 8px; }
  .v-thumb-led { width: 18px; height: 3px; }
  .v-limit-tag { left: calc(100% + 5px); font-size: 8.5px; padding: 1px 4px; border-radius: 5px; }
}

.tft-glow-blue { text-shadow: 0 0 12px rgba(56, 189, 248, 0.65), 0 0 24px rgba(14, 165, 233, 0.28); }
.tft-glow-green { text-shadow: 0 0 12px rgba(52, 211, 153, 0.65), 0 0 24px rgba(16, 185, 129, 0.28); }
.tft-glow-amber { text-shadow: 0 0 11px rgba(251, 191, 36, 0.68); }
.tft-glow-cyan { text-shadow: 0 0 11px rgba(34, 211, 238, 0.62); }
.tft-glow-red { text-shadow: 0 0 14px rgba(255, 30, 60, 0.85), 0 0 28px rgba(225, 29, 72, 0.45); }
.oled-glow-white { text-shadow: 0 0 10px rgba(255, 255, 255, 0.45); }

.oled-num {
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.tft-knob-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ff2e4c, #dc2626);
  border: 1px solid rgba(254, 202, 202, 0.95);
  border-radius: 5px;
  padding: 0 5px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85);
  transform: scale(1.12);
  display: inline-block;
  animation: tftRedPulse 0.65s ease-in-out infinite alternate;
}
@keyframes tftRedPulse {
  from { box-shadow: 0 0 6px rgba(239, 68, 68, 0.55); }
  to { box-shadow: 0 0 16px rgba(239, 68, 68, 0.95); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}