
  :root {
    --teal: #00af9d;
    --teal-light: #1fd9c4;
    --navy: #003471;
    --navy-light: #0a4a96;
    --bg: #061224;
    --panel: #0c1e3a;
    --key-face: #181b22;
    --key-edge: #0a0c10;
    --key-border: #2a2e38;
    --key-top: #23262f;
    --text: #e8f1f7;
    --muted: #7e93b0;
  }
  * { box-sizing: border-box; }
  body {
    font-family:"Vazirmatn",Tahoma,sans-serif;
    background: radial-gradient(circle at 50% 0%, #0a2547 0%, var(--bg) 60%);
    color: var(--text);
    margin: 0;
    padding: 24px 16px 40px;
    min-height: 100vh;
  }
  @font-face{
    font-family:"Vazirmatn";
    src:url("../fonts/Vazirmatn-Regular.woff2");
    font-display:swap;
}
  h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--teal-light);
    letter-spacing: 0.5px;
  }
  .subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
  }
  .mobile-warning {
    display: none;
    background: #7f1d1d;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin: 0 auto 20px;
    max-width: 950px;
    font-size: 14px;
  }
  @media (max-width: 768px) {
    .mobile-warning { display: block; }
  }
  .container {
    max-width: 1360px;
    margin: 0 auto;
  }
  .panel {
    background: linear-gradient(180deg, var(--panel) 0%, #08182e 100%);
    border: 1px solid #122b50;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  }
  .panel h2 {
    margin: 0 0 18px;
    font-size: 17px;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .panel h2 .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--teal);
    margin-left: 8px;
    box-shadow: 0 0 8px var(--teal);
  }
  .reset-btn {
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy-light);
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
  }
  .reset-btn:hover { background: var(--navy-light); transform: translateY(-1px); }

  /* ===== Keyboard ===== */
  .keyboard-wrap {
    background: radial-gradient(ellipse at 50% 0%, #14161c 0%, #0a0b0f 70%);
    border: 1px solid #1c1f27;
    border-radius: 14px;
    padding: 22px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    direction: ltr;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
  }
  .keyboard-clusters {
    display: flex;
    gap: 16px;
    direction: ltr;
    width: max-content;
    margin: 0 auto;
  }
  .keyboard {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .cluster-gap { width: 14px; }
  .kb-row {
    display: flex;
    gap: 7px;
  }
  .nav-cluster {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .nav-cluster .kb-row { gap: 7px; }
  .arrow-block {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 7px;
  }
  .arrow-row { display: flex; gap: 7px; }
  .numpad-cluster {
    display: grid;
    grid-template-columns: repeat(4, 46px);
    grid-auto-rows: 50px;
    gap: 15px;
  }
  .key.numpad-tall {
    grid-row: span 2;
    height: 100%;
  }
  .key.numpad-wide {
    grid-column: span 2;
    width: 100%;
  }
  .key.ghost {
    visibility: hidden;
  }
  .key {
    position: relative;
    background: linear-gradient(180deg, var(--key-top) 0%, var(--key-face) 55%, var(--key-edge) 100%);
    border: 1px solid var(--key-border);
    border-bottom: 3px solid #000;
    border-radius: 6px;
    color: #aab1c4;
    font-size: 12.5px;
    font-weight: 600;
    min-width: 46px;
    height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.08s, transform 0.06s, border-color 0.08s, box-shadow 0.15s;
    user-select: none;
    direction: ltr;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
  }
  .key .sub-label {
    font-size: 8px;
    font-weight: 400;
    color: var(--teal);
    opacity: 0.75;
    margin-top: 1px;
  }
  .key.w15 { min-width: 72px; }
  .key.w2 { min-width: 94px; }
  .key.w225 { min-width: 106px; }
  .key.w625 { min-width: 290px; }
  .key.pressed {
    background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal) 60%, var(--navy) 100%);
    border-color: var(--teal-light);
    color: #00211c;
    transform: translateY(2px);
    border-bottom-width: 1px;
    box-shadow: 0 0 4px var(--teal-light), 0 0 22px rgba(0,175,157,0.85), 0 0 46px rgba(0,52,113,0.5);
  }
  .key.pressed .sub-label { color: #00211c; opacity: 0.6; }
  .key.tested:not(.pressed) {
    background: linear-gradient(180deg, #1a3530 0%, #122621 55%, #0a0f0d 100%);
    border-color: #1d6e62;
    color: #6fd9c4;
    box-shadow: 0 0 8px rgba(0,175,157,0.25) inset;
  }

  /* Status bar */
  .status-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
  }
  .status-bar b { color: var(--teal-light); font-size: 15px; }
  .progress-track {
    flex: 1;
    min-width: 140px;
    height: 8px;
    background: #0a1c38;
    border-radius: 5px;
    overflow: hidden;
    align-self: center;
  }
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-light), var(--teal));
    width: 0%;
    transition: width 0.2s;
  }
  .last-key {
    background: #050f1f;
    border: 1px solid #122b50;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 13px;
    direction: ltr;
    text-align: right;
    color: var(--muted);
  }
  .last-key b { color: #fbbf24; }
  .last-key i { color: var(--teal-light); font-style: normal; }

  /* ===== Mouse test ===== */
  .mouse-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 24px;
    align-items: start;
  }
  @media (max-width: 700px) {
    .mouse-layout { grid-template-columns: 1fr; }
  }
  .mouse-visual {
    display: flex;
    justify-content: center;
    padding-top: 8px;
  }
  .mouse-svg-wrap svg { width: 180px; height: auto; }
  .mz-left, .mz-right, .mz-wheel { transition: fill 0.12s, filter 0.12s; }
  .mz-left.active { fill: var(--teal); filter: drop-shadow(0 0 6px var(--teal)); }
  .mz-right.active { fill: var(--teal); filter: drop-shadow(0 0 6px var(--teal)); }
  .mz-wheel.active { fill: var(--teal-light); filter: drop-shadow(0 0 6px var(--teal-light)); }

  .mouse-stats{
  display:flex;

  justify-content:center;

  align-items:stretch;

  gap:14px;

  flex-wrap:wrap;
}
  @media (max-width: 480px) {
    .mouse-stats { grid-template-columns: 1fr; }
  }
  .btn-box{

  width:150px;

  height:90px;

  background:#050f1f;

  border:1px solid #122b50;

  border-radius:14px;

  padding:14px;

  text-align:center;

  font-size:13px;

  color:var(--muted);

  transition:.15s;

  display:flex;

  flex-direction:column;

  justify-content:center;

}
.btn-box.middle{

  width:70px;

}
  .btn-box.active {
    background: #06352f;
    border-color: var(--teal);
    color: #fff;
  }
  .btn-box .count {
    display: block;
    font-size: 22px;
    margin-top: 4px;
    color: var(--teal-light);
    font-weight: 700;
  }
  .scroll-zone {
    grid-column: 1 / -1;
    background: #050f1f;
    border: 2px dashed #1b3a66;
    border-radius: 10px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--muted);
    transition: all 0.2s;
    text-align: center;
    padding: 8px;
  }
  .scroll-zone.up { background: #06352f; border-color: var(--teal); color: #fff; }
  .scroll-zone.down { background: #06203f; border-color: var(--navy-light); color: #fff; }
  .dblclick-box {
    grid-column: 1 / -1;
    background: #050f1f;
    border: 2px dashed #1b3a66;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
  }
  .dblclick-box.active {
    background: #06352f;
    border-color: var(--teal);
    color: #fff;
  }
  .dblclick-box .count {
    display: block;
    font-size: 22px;
    margin-top: 4px;
    color: var(--teal-light);
    font-weight: 700;
  }

  .move-zone {
    grid-column: 1 / -1;
    background: #050f1f;
    border: 1px solid #122b50;
    border-radius: 10px;
    height: 180px;
    position: relative;
    overflow: hidden;
  }
  .move-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--teal-light);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--teal-light);
  }
  .move-info {
    position: absolute;
    bottom: 8px;
    left: 10px;
    font-size: 11px;
    color: var(--muted);
    direction: ltr;
  }
  .move-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
  }
  .nav-logo{
    display:flex;
    justify-content:center;
    align-items:center;
    height:85px;
}

.nav-logo img{
    width:150px;
    height:auto;
    opacity:.55;
}

.arrow-block{
    margin-top:16px;
}
.toggle-btn{
    background:#06352f;
    color:#fff;
    border:1px solid #00af9d;
    padding:7px 16px;
    border-radius:8px;
    cursor:pointer;
    margin-right:8px;
	font-family:'Vazirmatn',Tahoma,sans-serif;
}

.toggle-btn.off{
    background:#222;
    border-color:#555;
}
footer {
  text-align: center;
  color: #7a92b0;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.3px;
}

footer p {
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.3s ease;
}

footer p:hover {
  opacity: 1;
  color: #8fa9c7;
}

footer .heart {
  color: #e05c7a;
  display: inline-block;
  animation: heartbeat 1.4s ease infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.25); }
}

.footer-logo {
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 6px;
  transition: opacity 0.3s ease;
}

.footer-logo img {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.footer-logo:hover img {
  opacity: 1;
}

footer small {
  display: block;
  margin-top: 0.5rem;
  opacity: 0.7;
  font-size: 0.85rem;
}
