/* ==========================================================================
   1. THEME & VARIABLES
   ========================================================================== */

:root {
  /* Core Colors */
  --bg-base: #020617;
  --bg-panel: rgba(15, 23, 42, 0.72);
  --bg-input: rgba(2, 6, 23, 0.82);

  /* Accents */
  --accent-primary: #eab308;   /* Yellow */
  --accent-secondary: #38bdf8; /* Cyan */
  --accent-tertiary: #a78bfa;  /* Purple */
  --accent-success: #22c55e;   /* Green */
  --accent-danger: #f87171;    /* Red */

  /* Text & Fonts */
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-mono: "Fira Code", Consolas, monospace;
}

/* ==========================================================================
   2. BASE & GRID LAYOUT
   ========================================================================== */

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
}

body.molecule-editor-page {
  display: grid;
  grid-template-columns: 300px 1fr 260px;
  grid-template-rows: 58px 1fr;
  grid-template-areas:
    "topbar topbar topbar"
    "left canvas right";
  overflow: hidden;

  color: var(--text-main);
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.08), transparent 45%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 35%),
    var(--bg-base);
}

.molecule-topbar { grid-area: topbar; }
.left-panel      { grid-area: left; }
#graphCanvas     { grid-area: canvas; }
.right-panel     { grid-area: right; }

/* Enforce Custom Cursor Globally */
body.molecule-editor-page,
body.molecule-editor-page * {
  cursor: none !important;
  box-sizing: border-box;
}

/* ==========================================================================
   3. TOP BAR
   ========================================================================== */

.molecule-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: 0 18px;

  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82)),
    rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow:
    0 0 22px rgba(56, 189, 248, 0.14),
    inset 0 -1px 0 rgba(234, 179, 8, 0.12);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.molecule-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.55);
}

.topbar-link {
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease, transform 0.18s ease;
}

.topbar-link:hover {
  color: var(--accent-primary);
  text-shadow: 0 0 12px rgba(234, 179, 8, 0.55);
  transform: translateX(-2px);
}

.topbar-title-block { min-width: 0; }

.topbar-kicker {
  color: var(--accent-success);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
}

.topbar-title {
  margin-top: 2px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.28), 0 0 22px rgba(167, 139, 250, 0.12);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   4. SHARED PANELS (LEFT TOOLBAR & RIGHT HUD)
   ========================================================================== */

.molecule-panel {
  position: relative;
  z-index: 5;
  height: calc(100vh - 58px);
  padding: 18px;
  box-sizing: border-box;

  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12), inset 0 0 18px rgba(56, 189, 248, 0.06);
  overflow-y: auto;
}

.left-panel { border-right: 1px solid rgba(56, 189, 248, 0.22); }
.right-panel { border-left: 1px solid rgba(56, 189, 248, 0.22); }

/* Panel Scanner Animation */
.molecule-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-secondary), var(--accent-tertiary), transparent);
  animation: moleculePanelScan 4s linear infinite;
}

/* ==========================================================================
   5. TYPOGRAPHY & DIVIDERS
   ========================================================================== */

#toolbar h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: 1px;
  color: #eab308;
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.55), 0 0 25px rgba(56, 189, 248, 0.20);
}

#toolbar h2::after {
  content: "";
  display: block;
  width: 90px;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), transparent);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.7);
  animation: moleculePulseLine 2s infinite;
}

/* Integrated new tool header typography */
.tool-panel-header { margin-bottom: 16px; }
.tool-panel-header p {
  margin: -6px 0 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

#toolbar label,
.hud-slider-label {
  display: block;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

#toolbar hr,
#cameraPanel hr {
  border: none;
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.65), rgba(167, 139, 250, 0.45), transparent);
}

/* ==========================================================================
   6. FORM ELEMENTS (INPUTS, SELECTS, TEXTAREAS)
   ========================================================================== */

#toolbar select,
#toolbar textarea,
#toolbar input,
#cameraPanel input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  color: #cbd5f5;
  background: var(--bg-input);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  outline: none;
  font-family: var(--font-mono);
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.05), 0 0 10px rgba(56, 189, 248, 0.08);
}

#toolbar select { padding: 9px 10px; }

#toolbar textarea {
  height: 190px;
  resize: vertical;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
}

/* Integrated specific height for new json section */
.json-section textarea {
  height: 150px;
}

#toolbar select:focus,
#toolbar textarea:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 15px rgba(56, 189, 248, 0.55);
}

/* ==========================================================================
   7. BUTTONS & GRIDS
   ========================================================================== */

/* Standard Buttons */
#toolbar button,
.hud-btn {
  width: 100%;
  margin: 6px 0;
  padding: 10px 12px;
  color: var(--accent-secondary);
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

#toolbar button:hover,
.hud-btn:hover {
  color: var(--bg-base);
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.75), 0 0 28px rgba(56, 189, 248, 0.35);
}

#toolbar button:active,
.hud-btn:active { transform: translateY(0) scale(0.98); }

/* Topbar Specific Buttons */
.topbar-btn {
  width: auto;
  min-width: 92px;
  height: 34px;
  margin: 0;
  padding: 0 11px;
  color: var(--accent-primary);
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(234, 179, 8, 0.38);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topbar-btn:hover {
  color: var(--bg-base);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.62), 0 0 24px rgba(234, 179, 8, 0.22);
}

.topbar-btn.accent { color: var(--accent-secondary); border-color: rgba(56, 189, 248, 0.42); }
.topbar-btn.accent:hover {
  color: var(--bg-base);
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.68), 0 0 24px rgba(56, 189, 248, 0.24);
}

/* Button Grids & Utilities (Integrated from new changes) */
.tool-button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tool-button-grid button {
  margin: 0 !important;
  min-height: 38px;
  padding: 8px 9px;
  font-size: 10px;
}

.history-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}

.history-button-row button {
  margin: 0 !important;
  color: var(--accent-tertiary) !important;
  border-color: rgba(167, 139, 250, 0.42) !important;
}

.history-button-row button:hover {
  color: var(--bg-base) !important;
  background: var(--accent-tertiary) !important;
  border-color: var(--accent-tertiary) !important;
}

/* Presets (from previous updates) */
.preset-btn {
  min-height: 38px;
  margin: 0 !important;
  padding: 8px 9px !important;
  color: var(--accent-tertiary) !important;
  border-color: rgba(167, 139, 250, 0.42) !important;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(56, 189, 248, 0.04)), rgba(2, 6, 23, 0.58) !important;
  font-size: 10px !important;
  letter-spacing: 0.8px !important;
}

.preset-btn:hover {
  color: var(--bg-base) !important;
  background: var(--accent-tertiary) !important;
  border-color: var(--accent-tertiary) !important;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.72), 0 0 24px rgba(167, 139, 250, 0.28) !important;
}

/* Destructive / Action specific colors */
#deleteBtn, #clearBtn { color: var(--accent-danger); border-color: rgba(248, 113, 113, 0.45); }
#deleteBtn:hover, #clearBtn:hover { background: var(--accent-danger); border-color: var(--accent-danger); box-shadow: 0 0 16px rgba(248, 113, 113, 0.65); }

#saveBtn, #loadBtn, #exportPngBtn { color: var(--accent-primary); border-color: rgba(234, 179, 8, 0.5); }
#saveBtn:hover, #loadBtn:hover, #exportPngBtn:hover { background: var(--accent-primary); border-color: var(--accent-primary); box-shadow: 0 0 16px rgba(234, 179, 8, 0.65); }

/* ==========================================================================
   8. PANEL WIDGETS & CARDS (HUD Sections, Tools, Formulas)
   ========================================================================== */

/* Integrated Standard Tool Sections */
.tool-section {
  position: relative;
  margin: 0 0 8px;
  padding: 13px;
  border-radius: 15px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 50%), rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(56, 189, 248, 0.14);
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.035), 0 0 12px rgba(2, 6, 23, 0.18);
}

.tool-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-success);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.tool-section-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.75);
}

/* Right HUD Camera Panel Sections */
.panel-section {
  position: relative;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.04), 0 0 14px rgba(56, 189, 248, 0.08);
  overflow: hidden;
}

.panel-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 45%);
  pointer-events: none;
}

.panel-kicker {
  margin-bottom: 8px;
  color: var(--accent-success);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
}

.panel-section h3 {
  margin: 0 0 14px;
  color: var(--accent-secondary);
  font-size: 18px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

/* Formula & Weight Cards */
.molecule-formula-card {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.12), transparent 48%), rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(234, 179, 8, 0.26);
  box-shadow: inset 0 0 14px rgba(234, 179, 8, 0.05), 0 0 16px rgba(234, 179, 8, 0.08);
}

.molecule-formula-card.compact {
  margin: 0;
}

.molecule-formula {
  margin-top: 8px;
  min-height: 38px;
  display: flex;
  align-items: center;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.55), 0 0 24px rgba(234, 179, 8, 0.18);
  word-break: break-word;
}

.molecule-weight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(234, 179, 8, 0.18);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.molecule-weight-row strong {
  color: var(--accent-secondary);
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.45), 0 0 18px rgba(56, 189, 248, 0.16);
}

.preset-card {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 48%), rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 0 14px rgba(56, 189, 248, 0.05), 0 0 16px rgba(56, 189, 248, 0.08);
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

/* Camera Grid & Sliders */
.camera-button-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.camera-button-grid .hud-btn { margin: 0; min-height: 42px; }
.camera-button-grid .wide { color: var(--accent-tertiary); border-color: rgba(167, 139, 250, 0.5); }
.camera-button-grid .wide:hover { color: var(--bg-base); background: var(--accent-tertiary); box-shadow: 0 0 12px rgba(167, 139, 250, 0.75), 0 0 28px rgba(167, 139, 250, 0.35); }

.hud-slider-label span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

#zoomSlider {
  appearance: none;
  height: 6px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-tertiary));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35), 0 0 20px rgba(167, 139, 250, 0.18);
}

#zoomSlider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary), 0 0 18px rgba(56, 189, 248, 0.65);
}

#zoomSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary), 0 0 18px rgba(56, 189, 248, 0.65);
}



/* ==========================================================================
   9. GRAPH CANVAS & STATUS
   ========================================================================== */

#graphCanvas {
  position: relative;
  width: 100%;
  height: 100vh;
  background:
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(56, 189, 248, 0.10), transparent 55%),
    #020617;
  background-size: 42px 42px, 42px 42px, auto, auto;
  overflow: hidden;
}

#graphCanvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(56, 189, 248, 0.04), transparent 18%, transparent 82%, rgba(167, 139, 250, 0.05));
  box-shadow: inset 0 0 45px rgba(56, 189, 248, 0.08), inset 0 0 90px rgba(2, 6, 23, 0.8);
}

/* Status Panel */
#status {
  min-height: 1.5em;
  margin-top: 14px;
  color: #22c55e;
  font-size: 12px;
  font-family: monospace;
  line-height: 1.5;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}

/* ==========================================================================
   10. CUSTOM CURSOR
   ========================================================================== */

#molecule-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999999;
  mix-blend-mode: screen;
}

.cursor-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary), 0 0 18px rgba(234, 179, 8, 0.8), 0 0 35px rgba(56, 189, 248, 0.45);
}

.cursor-orbit {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7), inset 0 0 8px rgba(56, 189, 248, 0.25);
}

.orbit-a {
  transform: rotate(25deg) scaleX(1.25);
  animation: cursorOrbitA 1.6s linear infinite;
}

.orbit-b {
  transform: rotate(-65deg) scaleX(1.25);
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.7), inset 0 0 8px rgba(167, 139, 250, 0.25);
  animation: cursorOrbitB 2.2s linear infinite;
}

#molecule-cursor.cursor-hover { width: 46px; height: 46px; }
#molecule-cursor.cursor-hover .cursor-core {
  background: var(--accent-secondary);
  box-shadow: 0 0 10px var(--accent-secondary), 0 0 24px rgba(56, 189, 248, 0.9), 0 0 45px rgba(167, 139, 250, 0.5);
}
#molecule-cursor.cursor-click { transform: translate(-50%, -50%) scale(0.75); }

.molecule-cursor-trail {
  position: fixed;
  width: 7px;
  height: 7px;
  pointer-events: none;
  z-index: 999998;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 8px var(--accent-secondary), 0 0 16px rgba(234, 179, 8, 0.45);
  transform: translate(-50%, -50%);
  animation: moleculeTrailFade 0.55s ease-out forwards;
}

/* ==========================================================================
   11. ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes moleculePanelScan { from { left: -100%; } to { left: 100%; } }
@keyframes moleculePulseLine { 0% { opacity: 0.55; width: 70px; } 50% { opacity: 1; width: 125px; } 100% { opacity: 0.55; width: 70px; } }
@keyframes cursorOrbitA { from { transform: rotate(25deg) scaleX(1.25); } to { transform: rotate(385deg) scaleX(1.25); } }
@keyframes cursorOrbitB { from { transform: rotate(-65deg) scaleX(1.25); } to { transform: rotate(-425deg) scaleX(1.25); } }
@keyframes moleculeTrailFade { from { opacity: 0.8; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(0); } }

/* ==========================================================================
   12. SCROLLBARS & RESPONSIVE
   ========================================================================== */

.molecule-panel::-webkit-scrollbar { width: 8px; }
.molecule-panel::-webkit-scrollbar-track { background: rgba(2, 6, 23, 0.8); }
.molecule-panel::-webkit-scrollbar-thumb { background: rgba(234, 179, 8, 0.35); border-radius: 10px; border: 1px solid rgba(234, 179, 8, 0.5); }
.molecule-panel::-webkit-scrollbar-thumb:hover { background: rgba(234, 179, 8, 0.65); }

@media (max-width: 1050px) {
  body.molecule-editor-page {
    grid-template-columns: 260px 1fr;
  }
  .right-panel {
    position: fixed;
    right: 16px;
    top: 90px;
    width: 230px;
    height: auto;
    max-height: calc(100vh - 120px);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 16px;
  }
}

@media (max-width: 760px) {
  body.molecule-editor-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .left-panel {
    height: auto;
    max-height: 42vh;
    border-right: none;
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  }
  .right-panel { display: none; }
  #graphCanvas { height: 58vh; }
}

@media (pointer: coarse) {
  #molecule-cursor, .molecule-cursor-trail { display: none; }
}

/* ==========================================================================
   13. Keypad
   ========================================================================== */
.shortcut-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shortcut-key {
  min-height: 38px;
  padding: 0 8px;

  color: var(--accent-secondary);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 48%),
    rgba(2, 6, 23, 0.62);

  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 10px;

  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;

  box-shadow:
    inset 0 -2px 0 rgba(2, 6, 23, 0.45),
    0 0 10px rgba(56, 189, 248, 0.10);

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.shortcut-key:hover {
  color: var(--bg-base);
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.68),
    0 0 24px rgba(56, 189, 248, 0.22);
}

.shortcut-key:active,
.shortcut-key.is-pressed {
  transform: translateY(0) scale(0.96);
  color: var(--bg-base);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow:
    0 0 12px rgba(234, 179, 8, 0.72),
    0 0 24px rgba(234, 179, 8, 0.25);
}

.shortcut-key.wide {
  grid-column: span 1;
  color: var(--accent-tertiary);
  border-color: rgba(167, 139, 250, 0.42);
  font-size: 10px;
}

.shortcut-key.wide:hover {
  color: var(--bg-base);
  background: var(--accent-tertiary);
  border-color: var(--accent-tertiary);
  box-shadow:
    0 0 12px rgba(167, 139, 250, 0.68),
    0 0 24px rgba(167, 139, 250, 0.22);
}

.shortcut-hint {
  min-height: 1.4em;
  margin: 10px 0 0;

  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
}
