@import url('https://fonts.googleapis.com/css2?family=Mona+Sans:wght@400;700&display=swap');

:root {
  --max-content-width: 600px;
  --bg-dark: #0a0a0a;
  --text-light: #ffffff;
  --text-muted: #ccc;
  --bar-green: #23964d;
  --bar-green-hover: #108139;
  --bar-yellow: #ccb13b;
  --bar-yellow-hover: #a8810d;
  --bar-red: #ef4444;
  --bar-bg: #222;

}

/* Base layout */
body {
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Mona Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  margin: 0;
}

h2 {
  color: var(--text-muted);
  margin: 0;
  text-align: center;
  width: var(--max-content-width);
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#step-desc {
  color: #888;
  font-size: 0.9rem;
  text-align: center;
  width: var(--max-content-width);
  max-width: 90vw;
  margin: 0;
  min-height: 1.2em;
}


#timer {
  font-size: clamp(3rem, 15vw, 10rem);
  font-weight: 700;
  font-variant: tabular-nums;
  margin: 0 0 20px;
  text-align: center;
  width: var(--max-content-width);
  max-width: 90vw;
}

/* Progress bar (full width, fixed bottom) */
#progress {
  width: 100%;
  min-height: 80px;
  height: 5svh;
  background: var(--bar-bg);
  border-radius: 0;
  overflow: hidden;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
}

#progress-bar {
  height: 100%;
  width: 100%;
  background: var(--bar-green);
  transition: width 1s linear, background 2s ease-in-out;
}

/* Buttons */
.buttons {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: var(--max-content-width);
  max-width: 90vw;
}

button {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-weight: 700;
}

.start { background: var(--bar-green); }
.start:hover { background: var(--bar-green-hover); }
.pause { background: var(--bar-yellow); }
.pause:hover { background: var(--bar-yellow-hover); }
.next { background: #3295D2; }
.next:hover { background: #275aad; }
.reset { background: #676262; }
.reset:hover { background: #7c4c63; }

/* Login form styles (for controller login page) */
form.login {
  background: #111;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}
form.login input {
  padding: 10px;
  border: none;
  border-radius: 6px;
  width: 200px;
  margin-top: 10px;
}
form.login button {
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--bar-green);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.error { color: var(--bar-red); margin-top: 8px; }

/* Status indicator */
#status {
  font-size: 12px;
  color: #999;
}
#status.offline { color: var(--bar-red); }

/* Logout link */
a.logout {
  color: var(--bar-red);
  position: absolute;
  top: 15px;
  right: 15px;
  text-decoration: none;
}

/* Header bar (logo + status) */
.header-bar {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  width: 32px;
  height: auto;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #timer { font-size: 8rem; }
  #progress { height: 14px; }
}
