/* Stopwatch Specific Styles */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=Roboto+Mono:wght@400;700&display=swap');

/* Time display uses a monospace font */
.time-display-font {
  font-family: 'Roboto Mono', monospace;
}

/* Control buttons at the top */
.control-buttons-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

    .icon-button:active {
  transform: scale(0.95);
}

/* Main stopwatch container */
.stopwatch-container {
  width: 100%;
  max-width: 28rem;
  margin: auto auto 2rem auto;
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  text-align: center;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Fullscreen styles */
.stopwatch-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  z-index: 1000;
  justify-content: center;
}

.stopwatch-container.fullscreen .stopwatch-title {
  font-size: 2.5rem;
}

.stopwatch-container.fullscreen #time-display {
  font-size: 4rem;
}

.stopwatch-container.fullscreen .buttons-container {
  margin-top: 2rem;
}

.stopwatch-container.fullscreen .icon-button {
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
}

/* Title */
.stopwatch-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  color: #22d3ee;
  padding-top: 3rem;
}

/* Time Display */
#time-display {
  font-size: 2rem;
  color: cornflowerblue;
  text-align: center;
  letter-spacing: 0.05em;
  background-color: #111827;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

/* Milliseconds styling inside time display */
#time-display #milliseconds {
  color: #9ca3af;
  font-size: 0.8em;
}

/* Container for the control buttons */
.buttons-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Common styles for all control buttons */
.control-button {
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-size: 1.125rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.control-button:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Individual button colors */
#startBtn { background-color: #22c55e; }
#startBtn:hover:not(:disabled) { background-color: #16a34a; }
#pauseBtn { background-color: #ef4444; }
#pauseBtn:hover:not(:disabled) { background-color: #dc2626; }
#resetBtn { background-color: #4b5563; }
#resetBtn:hover:not(:disabled) { background-color: #374151; }

/* Mute Button custom styling */
#muteBtn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: #9ca3af;
  padding: 0.5rem;
  border-radius: 9999px;
  background: none;
  box-shadow: none;
}

#muteBtn:hover {
  color: #ffffff;
}

/* Responsive adjustments for medium screens and up */
@media (min-width: 576px) {
  #time-display { font-size: 2.5rem; }
}