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

:root {
  --body-bg: linear-gradient(135deg, #0b1022, #101b3a);
  --card-bg: #111827e6;
  --text-color: #e5e7eb;
  --muted-text-color: #9ca3af;
  --primary-btn-bg: #22c55e;
  --primary-btn-hover: #16a34a;
  --secondary-bg: #374151;
  --accent: #38bdf8;
}

body {
  background: var(--body-bg);
  color: var(--text-color);
  font-family: Arial, Helvetica, sans-serif;

  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.container {
  width: 100%;
  max-width: 28.75rem;
}

.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.header h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.header p {
  color: var(--muted-text-color);
  font-size: 0.95rem;
}

.timer-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mode-tabs .tab {
  border: none;
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  background: var(--secondary-bg);
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--accent);
  color: #0b1022;
}

.status {
  text-align: center;
  color: var(--muted-text-color);
}

.status-text,
.session-count {
  margin-top: 0.9rem;
}

.timer-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(72vw, 18.75rem);
  margin: 0.8rem auto 1.1rem;
  aspect-ratio: 1;
}

.time-display {
  line-height: 1;
  font-size: clamp(3rem, 15vw, 4rem);
  letter-spacing: 2px;
  font-weight: 700;
}

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

.progress-ring_track,
.progress-ring_indicator {
  fill: none;
  stroke-width: 8px;
}

.progress-ring_track {
  stroke: rgba(156, 163, 175, 0.2);
}

.progress-ring_indicator {
  stroke: var(--accent);
  stroke-linecap: round;
  transition:
    stroke-dashoffset 0.3s linear,
    stroke 0.3s ease;
}

.control-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.control-btns .btn {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-btn-bg);
  color: #0b1022;
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
}

.btn-secondary {
  background: var(--secondary-bg);
  color: var(--text-color);
}

.audio-control {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.5rem;
}

.audio-control label {
  color: var(--muted-text-color);
  font-size: 0.9rem;
}

.audio-control input {
  width: 100%;
  outline: none;
}

.custom-timer-panel {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;

  color: var(--muted-text-color);
}

.expand-panelBtn {
  border: none;
  outline: none;
  background: transparent;

  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;

  cursor: pointer;
}

.custom-text {
  color: var(--muted-text-color);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.expand-panelBtn:hover .custom-text {
  color: var(--text-color);
}

.custom-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

button[aria-expanded="true"] .custom-icon {
  transform: rotate(225deg);
  margin-top: 0.5rem;
}

.custom-durations[hidden] {
  display: none;
}

.custom-durations {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.custom-durations label {
  font-size: 0.9rem;
}

.custom-durations input {
  width: 100%;
  padding: 0.5rem;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
}

.custom-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.custom-actions .btn {
  border: none;
  outline: none;
  padding: 0.5rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 400px) {
  .timer-card {
    padding: 0.9rem;
  }

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