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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #e5e7eb;
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.app {
  background: #f5f5f5;
  color: #111827;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: #111827;
  color: white
}

.app-title {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  margin: 0;
}

.icon-button {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-menu,
.icon-menu::before,
.icon-menu::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: relative;
}

.icon-menu::before,
.icon-menu::after {
  content: "";
  position: absolute;
  left: 0;
}

.icon-menu::before {
  top: -5px;
}

.icon-menu::after {
  top: 5px;
}

.header-spacer {
  width: 28px;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 0.5rem;
}

.mode-selector {
  margin-bottom: 1.5rem;
}

.mode-button {
  width: 100%;
  border-radius: 12px;
  border: none;
  padding: 0.9rem 1rem;
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.mode-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.mode-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.mode-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.icon-chevron {
  border-style: solid;
  border-width: 2px 2px 0 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(135deg);
  color: #6b7280;
}

.mode-dropdown {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.35rem 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  display: none;
  max-height: 260px;
  overflow-y: auto;
}

.mode-dropdown.open {
  display: block;
}

.mode-option {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.mode-option:hover,
.mode-option.active {
  background: #eff6ff;
}

.mode-option-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.mode-option-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
}

.timer-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring-wrapper {
  position: relative;
  width: min(72vw, 320px);
  aspect-ratio: 1 / 1;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 8;
}

.timer-ring-progress {
  fill: none;
  stroke: #2563eb;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear, stroke 0.25s;
}

.timer-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-label {
  font-size: 2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
}

.timer-value {
  font-size: 4.5rem;
  font-weight: 600;
  margin: 0.35rem 0;
}

.round-display {
  font-size: 1.8rem;
  font-weight: 600;
  color: #4b5563;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 0.75rem;
}

.toolbar-item {
  flex: 1;
  border: none;
  border-radius: 10px 10px 0 0;
  padding: 0.5rem 0.25rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #6b7280;
}

.toolbar-item:disabled {
  opacity: 0.9;
}

.toolbar-label {
  margin-top: 0.15rem;
  text-align: center;
}

.icon-gear,
.icon-volume,
.icon-bell {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  position: relative;
}

.icon-volume::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.icon-bell::before {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 6px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1.1rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.control-button {
  flex: 1;
  padding: 2rem 0.25rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
}

.control-button.primary {
  background: #2563eb;
  color: white;
}

.control-button:active {
  transform: translateY(1px);
}

@media (max-width: 400px) {
  .app-main {
    padding-inline: 0.75rem;
  }

  .mode-title {
    font-size: 0.85rem;
  }

  .timer-value {
    font-size: 3rem;
  }

  .timer-label {
    font-size: 1.5rem;
  }
  .round-display {
    font-size: 1.2rem;
  }
}

