@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  color-scheme: light;
  --panel-bg: rgba(255, 255, 255, 0.86);
  --panel-border: rgba(17, 24, 39, 0.12);
  --text-main: #0f172a;
  --text-muted: rgba(15, 23, 42, 0.65);
  --accent: #e25d2c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  background: radial-gradient(circle at top left, #f2c9b2 0%, rgba(242, 201, 178, 0.2) 40%),
    radial-gradient(circle at 20% 80%, #f2a0b5 0%, rgba(242, 160, 181, 0.2) 45%),
    linear-gradient(135deg, #f9f3e9 0%, #f4f7fb 100%);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 40px;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

header p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.status {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 8px 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.live {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

#liveTimer {
  font-family: "JetBrains Mono", "Menlo", monospace;
  font-size: 36px;
  letter-spacing: 0.08em;
}

#runState {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.controls {
  display: grid;
  gap: 14px;
}

.time-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.control-row.two {
  grid-template-columns: 1fr auto;
}

.control-row.single {
  grid-template-columns: 1fr;
}

input[type="number"],
input[type="text"],
input[type="password"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  background: #101828;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  --pulse-color: rgba(16, 24, 40, 0.35);
}

button.secondary {
  background: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  --pulse-color: rgba(15, 23, 42, 0.18);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--accent);
}

button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.25) inset;
}

button.is-clicked {
  animation: buttonPulse 240ms ease-out;
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse-color);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
  }
}

.helper {
  font-size: 12px;
  color: var(--text-muted);
}

.quick-section {
  display: grid;
  gap: 8px;
}

.quick-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.quick-buttons button {
  padding: 8px 10px;
  font-size: 13px;
}

.preview {
  margin-top: 16px;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  height: 160px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  position: relative;
  contain: paint;
  clip-path: inset(0);
  background: #111111;
  color: #ffffff;
  font-family: "JetBrains Mono", "Menlo", monospace;
  letter-spacing: 0.08em;
}

.preview-text {
  display: inline-block;
  line-height: 1;
  transform-origin: center;
}

footer {
  margin-top: 26px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status {
    width: 100%;
    justify-content: space-between;
  }
}
