@font-face{font-family:"Melo Sans";font-style:normal;font-weight:100 600;font-display:swap;src:url("/fonts/MeloSans-Medium.woff2") format("woff2");}
@font-face{font-family:"Melo Sans";font-style:normal;font-weight:700 900;font-display:swap;src:url("/fonts/MeloSans-Black.woff2") format("woff2");}
:root { --font-sans: "Melo Sans", Vazirmatn, Tahoma, system-ui, sans-serif; }
:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: #14171c;
  color: #e8e8e8;
  font-family: var(--font-sans);
}

#app {
  height: 100%;
  display: flex;
  align-items: stretch;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#melo-face {
  background: #0D120F; /* هم‌رنگ زمینه‌ی رندر ماژول صورت — بدون فلش موقع لود */
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.35);
  max-width: 80vmin;
  max-height: 80vmin;
  width: 480px;
  height: 480px;
}

#controls {
  width: 280px;
  flex-shrink: 0;
  background: #181c22;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 24px;
  overflow-y: auto;
}

#controls h2 {
  font-size: 14px;
  font-weight: 600;
  color: #9aa1ab;
  margin: 0 0 16px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.preset-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #cfd3d8;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.preset-btn:hover {
  background: rgba(94, 233, 122, 0.15);
  color: #5ee97a;
}

.preset-btn:active {
  background: rgba(94, 233, 122, 0.25);
}

.scenario-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sim-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sim-toggle,
.sim-water {
  background: rgba(255, 255, 255, 0.06);
  color: #cfd3d8;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sim-toggle:hover,
.sim-water:hover {
  background: rgba(94, 233, 122, 0.15);
  color: #5ee97a;
}

.sim-toggle.playing {
  background: #5ee97a;
  color: #0d120f;
}

.sim-toggle.playing:hover {
  background: #5ee97a;
  filter: brightness(1.08);
}

.sim-speed {
  background: rgba(255, 255, 255, 0.06);
  color: #cfd3d8;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.sim-clock {
  font-size: 11px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  margin: 0 0 16px;
}

.world-sliders {
  margin-bottom: 4px;
}

.world-status {
  font-size: 12px;
  color: #9aa1ab;
  margin: 4px 0 0;
  padding-bottom: 20px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

#controls .gesture-title {
  margin-top: 20px;
}

.gesture-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 20px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.debug {
  margin-top: 20px;
}

.debug summary {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.debug summary:hover {
  color: #9aa1ab;
}

.debug[open] summary {
  margin-bottom: 16px;
}

.debug > h2:first-of-type {
  margin-top: 0;
}

.debug > h2 {
  margin-top: 20px;
}

.sliders {
  padding-right: 4px;
}

.param-row {
  margin-bottom: 18px;
}

.param-hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.5;
}

.param-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: #cfd3d8;
  margin-bottom: 4px;
}

.param-value {
  font-variant-numeric: tabular-nums;
  color: #5ee97a;
  font-size: 12px;
  direction: ltr;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5ee97a;
  box-shadow: 0 0 0 4px rgba(94, 233, 122, 0.15);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5ee97a;
  box-shadow: 0 0 0 4px rgba(94, 233, 122, 0.15);
  cursor: pointer;
  border: none;
}

.actions {
  margin-top: 16px;
  padding-top: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  background: #5ee97a;
  color: #0d120f;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.copy-btn:hover {
  filter: brightness(1.08);
}

.copy-btn:active {
  filter: brightness(0.95);
}

.copy-status {
  font-size: 12px;
  color: #9aa1ab;
  min-height: 1em;
}
