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

body {
  font-family: adobe-caslon-pro, serif;
  font-weight: 400;
  background-color: #f5f5f5;
  font-style: normal;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-size-adjust: 100%;
}

/* chat-view */
#chat-view {
  position: absolute;
  top: 0;
  left: 0;
  border-right: 1px solid #8e8e8e;
  border-bottom: 1px solid #8e8e8e;
  padding: 4px 8px;
  text-align: center;
  font-size: 1.25rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    letter-spacing: 0.1rem;
}

#chat-view:hover {
  a {
    color: #ff7700;
  }
  border-color: #ff7700;
  cursor: pointer;
}

#chat-view a {
  color: #8e8e8e;
  text-decoration: none;
}

/* time-view */

#time-view {
  position: absolute;
  top: 0;
  right: 0;
  border-left: 1px solid #8e8e8e;
  border-bottom: 1px solid #8e8e8e;
  padding: 4px 8px;
  text-align: center;
  font-family: instrument-sans-variable, sans-serif;
    font-variation-settings: "wdth" 100, "wght" 300;
    letter-spacing: 0.1rem;

}

#time-view:hover {
  .current-time {
    color: #ff7700;
  }
  border-color: #ff7700;
  cursor: pointer;
}

.current-time {
  font-size: 1.25rem;
  color: #8e8e8e;
}

/* ── PUBLIC VIEW ── */
#public-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
}

.status-label {
  font-size: 3em;
  color: #ff7700;
  font-style: italic;
  letter-spacing: 0.05rem;
}

.status-label a {
  color: #ff7700;
}

.power-ring {
  /* width: 200px;
  height: 200px; */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  letter-spacing: 0.1rem;
}

.power-ring.on {
  font-size: 12rem;
  color: #ff56d5;
    font-style: italic;
  /* font-family: instrument-sans-variable, sans-serif;
  font-variation-settings: "wdth" 100, "wght" 500; */
}

.power-ring.off {
  font-size: 15rem;
  color: #36f;
    font-style: italic;
  /* font-family: instrument-sans-variable, sans-serif; */
  /* font-variation-settings: "wdth" 100, "wght" 500; */

}

.power-icon {
  width: 72px;
  height: 72px;
}

.power-icon circle,
.power-icon path {
  transition: stroke 0.5s;
}

.state-text {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.5s;
}

.state-text.on {
  color: #ff56d5;
  font-family: instrument-sans-variable, sans-serif;
  font-variation-settings: "wdth" 100, "wght" 500;
}

.state-text.off {
  color: #36f;
}

.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.uptime {
  font-size: 24px;
  font-weight: 200;
  color: #8e8e8e;
  font-variant-numeric: tabular-nums;
  font-family: instrument-sans-variable, sans-serif;
    font-variation-settings: "wdth" 100, "wght" 300;
    letter-spacing: 0.1rem;
  }

.divider {
  width: 1px;
  height: 40px;
  background: #222;
}

/* ── ADMIN VIEW ── */
#admin-view {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 40px 24px;
  width: 100%;
  max-width: 400px;
}

#login-panel,
#control-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.panel-title {
  color: #555;
}

.password-input {
  width: 100%;
  border: 1px solid #333;
  border-radius: 10px;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.1em;
}

.password-input:focus {
  border-color: #555;
}

.password-input::placeholder {
  color: #444;
  letter-spacing: 0;
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.05em;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  border: 1px solid black;
  background-color: white;
}

.btn-on {
  background: #fff;
  color: #000;
  border: 1px solid black;
}

.btn-off {
  background: #000;
  color: #fff;
    border: 1px solid black;

}

.btn-logout {
  background: transparent;
  color: #555;
  font-size: 13px;
  padding: 10px;
}

.error-msg {
  color: #ef4444;
  font-size: 13px;
  min-height: 18px;
}

.admin-power-ring {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-power-ring.on {
  font-size: 12rem;
  color: #ff56d5;
  font-family: instrument-sans-variable, sans-serif;
  font-variation-settings: "wdth" 100, "wght" 500;

}

.admin-power-ring.off {
  font-size: 12rem;
  color: #36f;
  font-family: instrument-sans-variable, sans-serif;
  font-variation-settings: "wdth" 100, "wght" 500;
}

.admin-state {
  font-size: 13px;
  color: #555;
}

.admin-state span {
  font-weight: 600;
}

.admin-state .on-text {
  color: #22c55e;
}

.admin-state .off-text {
  color: #ef4444;
}

.admin-timer {
  font-size: 13px;
  color: #555;
  font-variant-numeric: tabular-nums;
}

/* hidden admin trigger */
#admin-trigger {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  cursor: default;
  z-index: 100;
  user-select: none;
}

.connecting {
  color: #6a6a6a;
  font-size: 1rem;
  font-style: italic;
}