/**
 * public/css/tools/mouse-tester.css
 * Mouse Tester Tool Styles — Game Boy Retro Industrial Style
 */

/* ─── Control Bar ─── */
.mt-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Click Area ─── */
.mt-click-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgb(239, 236, 233);
  border: 1px solid #b3afab;
  border-radius: 8px;
  box-shadow: 3px 3px 6px rgba(82, 87, 99, 0.15), -2px -2px 4px rgba(248, 246, 242, 0.6);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s;
}
.mt-click-area.mt-click-area-active {
  cursor: pointer;
  background: rgb(245, 242, 237);
  box-shadow: 3px 3px 6px rgba(82, 87, 99, 0.15), -2px -2px 4px rgba(248, 246, 242, 0.6), 0 0 20px rgba(148, 181, 79, 0.15);
}

/* ─── Mouse Graphic ─── */
.mt-mouse-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mt-mouse {
  width: 200px;
  height: 300px;
  position: relative;
}
.mt-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 255px;
  background: linear-gradient(to bottom, rgb(231, 227, 217), rgb(219, 214, 201));
  border-radius: 0 0 100px 100px;
  border: 1px solid #a0a0a0;
  border-top: none;
  transition: transform 0.05s;
  user-select: none;
}
.mt-body.active {
  background: linear-gradient(to bottom, rgb(200, 196, 186), rgb(188, 184, 171));
  transform: scale(0.98);
  box-shadow: 0 0 30px 10px rgba(138, 185, 78, 0.7);
  animation: mt-glow 1.2s ease-out;
}
@keyframes mt-glow {
  0% { box-shadow: 0 0 10px 2px rgba(138, 185, 78, 0.4); }
  30% { box-shadow: 0 0 50px 20px rgba(138, 185, 78, 0.9); }
  60% { box-shadow: 0 0 40px 15px rgba(138, 185, 78, 0.8); }
  100% { box-shadow: 0 0 30px 10px rgba(138, 185, 78, 0.7); }
}
.mt-buttons {
  position: absolute;
  top: 16px;
  width: calc(100% + 8px);
  left: -4px;
  height: 90px;
  display: flex;
  gap: 5px;
  z-index: 1;
}
.mt-btn {
  flex: 1;
  height: 100%;
  background: rgb(174, 169, 159);
  border: 1px solid rgb(170, 165, 156);
  border-radius: 5px 5px 3px 3px;
  transition: transform 0.05s;
}
.mt-btn.active {
  background: rgb(150, 145, 135);
  transform: scale(0.98);
  box-shadow: 0 0 20px 5px rgba(138, 185, 78, 0.6);
}
.mt-divider { display: none; }
.mt-click-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.mt-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #4e4c50;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Stats ─── */
.mt-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.mt-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
}
.mt-stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1f232a;
}
.mt-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #747276;
  text-transform: uppercase;
}
.mt-stat-total .mt-stat-value { color: var(--screen-green, #94b54f); font-size: 26px; }

/* ─── History ─── */
.mt-history-container {
  width: 100%;
  overflow: hidden;
  margin-top: 12px;
}
.mt-history-bg {
  position: relative;
  min-height: 56px;
  border: 1px solid #959292;
  border-radius: 6px;
  box-shadow: 6px 6px 13px rgba(82, 87, 99, 0.2), -3px -3px 6px rgba(248, 246, 242, 0.75), inset 1px 1px 0 rgba(248, 246, 242, 0.42);
  background: radial-gradient(circle at 22% 28%, rgba(190, 210, 118, 0.92), rgba(123, 181, 66, 0.9) 28%, rgba(55, 94, 46, 0.92) 64%, rgba(38, 38, 38, 0.96)), linear-gradient(145deg, #a8c45d, #708d3d);
}
.mt-history-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: repeating-linear-gradient(0deg, rgba(38, 38, 38, 0.12) 0, rgba(38, 38, 38, 0.12) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
}
.mt-history-scroll {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  min-height: 56px;
}
.mt-history-scroll::-webkit-scrollbar { height: 5px; }
.mt-history-scroll::-webkit-scrollbar-track { background: rgba(55, 94, 46, 0.3); border-radius: 3px; }
.mt-history-scroll::-webkit-scrollbar-thumb { background: rgba(38, 38, 38, 0.5); border-radius: 3px; }
.mt-record {
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  min-width: 42px;
  text-align: center;
  padding: 6px 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}
.mt-placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 500;
  font-family: 'Rajdhani', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ─── Dark Theme ─── */
[data-theme="dark"] .mt-click-area {
  background: #1a1e1a;
  border-color: #3a3e3a;
}
[data-theme="dark"] .mt-click-area.mt-click-area-active {
  background: #1e241e;
}
[data-theme="dark"] .mt-body {
  background: linear-gradient(to bottom, #2a2e2a, #222622);
  border-color: #3a3e3a;
}
[data-theme="dark"] .mt-body.active {
  background: linear-gradient(to bottom, #1e241e, #1a1e1a);
  box-shadow: 0 0 30px 10px rgba(148, 181, 79, 0.4);
}
[data-theme="dark"] .mt-btn {
  background: #2a2e2a;
  border-color: #3a3e3a;
}
[data-theme="dark"] .mt-btn.active {
  background: #1e241e;
  box-shadow: 0 0 20px 5px rgba(148, 181, 79, 0.4);
}
[data-theme="dark"] .mt-hint { color: #8a9a6a; }
[data-theme="dark"] .mt-stat-value { color: #aaba7a; }
[data-theme="dark"] .mt-stat-total .mt-stat-value { color: var(--screen-green, #94b54f); }
[data-theme="dark"] .mt-stat-label { color: #5a5e5a; }
[data-theme="dark"] .mt-history-bg {
  border-color: #2a2e2a;
  background: radial-gradient(circle at 22% 28%, rgba(100, 130, 60, 0.7), rgba(60, 90, 30, 0.7) 28%, rgba(20, 40, 10, 0.8) 64%, rgba(10, 15, 10, 0.9));
}
[data-theme="dark"] .mt-record {
  background: #1e241e;
  border-color: #2a2e2a;
  color: #8a9a6a;
}
[data-theme="dark"] .mt-placeholder { color: rgba(200, 220, 180, 0.7); }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .mt-mouse { width: 160px; height: 240px; }
  .mt-body { height: 205px; border-radius: 0 0 80px 80px; }
  .mt-buttons { height: 72px; }
  .mt-stat-value { font-size: 18px; }
  .mt-stat-total .mt-stat-value { font-size: 22px; }
}
