.stopwatch-tool {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  gap: var(--spacing-lg);}
.stopwatch-display {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg) 0;
  flex-shrink: 0;
}
.stopwatch-display .time-display {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.time-main {
  font-size: 1em;
}
.time-centiseconds {
  font-size: 0.5em;
  opacity: 0.8;
  margin-bottom: 0.2em;
}
.stopwatch-controls {
  display: flex;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 500px;
  justify-content: center;
  flex-shrink: 0;
}
.stopwatch-btn {
  width: 80px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.stopwatch-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.stopwatch-btn:active:not(:disabled) {
  transform: translateY(0);
}
.stopwatch-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}
.stopwatch-btn svg {
  pointer-events: none;
}
.start-btn {
  width: 100px;
  height: 56px;
  background: linear-gradient(135deg, #10b981, #059669);
}
.start-btn:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}
.start-btn.running {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.start-btn.running:hover {
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}
.start-btn.paused {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.start-btn.paused:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}
.reset-btn {
  width: 100px;
  height: 56px;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.3);
}
.reset-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}
.lap-btn {
  width: 100px;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.lap-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}
.stopwatch-laps-wrapper {
  width: 100%;
  height: 280px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
}
.laps-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  flex-shrink: 0;
  height: 20px;
}
.laps-list-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: #ffffff05;
  border-radius: 16px;
  padding: 4px 0 4px 4px;
}
.laps-list {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding-right: 4px;
}
.laps-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: 0.875rem;
  opacity: 0.5;
}
.laps-empty.hidden {
  display: none;
}
.lap-item {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  border-left: 3px solid transparent;
  transition: var(--transition);
  min-height: 48px;
  flex-shrink: 0;
}
.lap-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.lap-item.fastest {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}
.lap-item.slowest {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.lap-number {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
}
.lap-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.lap-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}
.lap-badge.fastest {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.lap-badge.slowest {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.lap-badge-placeholder {
  min-width: 90px;
  height: 1px;
}
@keyframes notificationDoublePulse {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.1);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
  60% {
    transform: scale(1);
  }
}
.stopwatch-tool.notification-pulse .time-display {
  animation: notificationDoublePulse 0.8s ease-in-out forwards;
}
.interval-inputs {
  display: flex;
  gap: var(--spacing-sm);
}
.interval-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.interval-input-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.interval-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  font-family: inherit;
}
.interval-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.6);
  background: rgba(255, 255, 255, 0.1);
}
.interval-input:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .stopwatch-tool {
    padding: var(--spacing-md);
    gap: var(--spacing-md);
  }
  .stopwatch-display {
    padding: var(--spacing-md) 0;
  }
  .stopwatch-display .time-display {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .stopwatch-controls {
    gap: var(--spacing-sm);
  }
  .stopwatch-btn {
    width: 70px;
    height: 52px;
  }
  .start-btn {
    width: 90px;
    height: 52px;
  }
  .stopwatch-laps-wrapper {
    height: 220px;
  }
  body.fullscreen .stopwatch-laps-wrapper {
    height: 180px;
  }
  .lap-item {
    grid-template-columns: 40px 1fr auto;
  }
}
@media (min-width: 1024px) {
  .stopwatch-tool {
    max-width: 700px;
  }
  .stopwatch-laps-wrapper {
    height: 320px;
  }
}
