* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: #0b0e14;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

#state-card {
  text-align: center;
  padding: 40px 20px;
  border-radius: 24px;
  margin-bottom: 24px;
  transition: background 0.3s;
}

.state-off  { background: #1a1f2b; }
.state-work { background: linear-gradient(180deg, #2a4a8a 0%, #1f3870 100%); }
.state-move { background: linear-gradient(180deg, #2f7a4a 0%, #235a38 100%); }

#state-icon { font-size: 60px; margin-bottom: 8px; }
#state-name { font-size: 28px; font-weight: 700; letter-spacing: 2px; opacity: 0.9; }
#timer { font-size: 56px; font-weight: 200; margin-top: 12px; font-variant-numeric: tabular-nums; }
#efficiency { font-size: 18px; margin-top: 6px; opacity: 0.75; }

#actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.btn {
  padding: 18px 8px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.btn:active { transform: scale(0.96); }
.btn.active { box-shadow: 0 0 0 3px rgba(255,255,255,0.4); }
.btn-off  { background: #3a4252; }
.btn-work { background: #3a6acc; }
.btn-move { background: #3aa066; }

#ping-info {
  background: #2a1f3a;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}
.hidden { display: none; }

#log-block h3 { font-size: 16px; opacity: 0.6; margin-bottom: 10px; font-weight: 500; }
#log { list-style: none; }
#log li {
  padding: 8px 12px;
  background: #141821;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}
#log .log-state { font-weight: 600; }
#log .log-time { opacity: 0.6; }
