:root {
  --bg: #f3f4f6;
  --text: #111111;
  --button-bg: #e0e0e0;
  --shadow-light: #ffffff;
  --shadow-dark: #bebebe;
}

body.dark {
  --bg: #1e1e2f;
  --text: #eeeeee;
  --button-bg: #2d2d3c;
  --shadow-light: #2f2f42;
  --shadow-dark: #121212;
}

body {
  font-family: 'Helvetica Neue', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: background-color 0.3s, color 0.3s;
}

.main-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.theme-toggle {
  background: var(--button-bg);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2em;
  margin-bottom: 10px;
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
}

.widget-box {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark),
              -6px -6px 12px var(--shadow-light);
  padding: 30px 40px;
  width: 340px;
  text-align: center;
}

#timer-display {
  font-size: 2.5em;
  font-weight: bold;
}

#milliseconds {
  font-size: 0.5em;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.button-group button {
  flex: 1 1 140px;
  padding: 16px 20px;
  font-size: 1.1em;
  background: var(--button-bg);
  border: none;
  border-radius: 12px;
  box-shadow: 5px 5px 10px var(--shadow-dark),
              -5px -5px 10px var(--shadow-light);
  transition: all 0.2s ease;
  cursor: pointer;
}

.button-group button:hover {
  box-shadow: inset 5px 5px 10px var(--shadow-dark),
              inset -5px -5px 10px var(--shadow-light);
}

.datetime-widget {
  font-size: 0.95em;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 3px 3px 8px var(--shadow-dark),
              -3px -3px 8px var(--shadow-light);
  width: 340px;
  background: var(--bg);
  text-align:center;
}
body.dark .button-group button,
body.dark .theme-toggle {
  color: #f1f1f1;
}
body.dark .button-group button:hover {
  box-shadow: inset 3px 3px 6px #111111,
              inset -3px -3px 6px #2f2f42;
}
