.pomodoro-tool {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-sm);
  gap: var(--spacing-md);  animation: fadeIn 0.6s ease-out;
  margin: 0 auto;
}
.pomodoro-display {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  position: relative;
  flex-shrink: 0;
}
.session-label {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: slideDown 0.6s ease-out;
  margin: 0;
  padding: 0;
}
.progress-ring-container {
  position: relative;
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.progress-ring {
  width: 100%;
  height: 100%;
  transform: scale(1);
  transition: transform 0.3s ease;
}
.pomodoro-tool.final-minute .progress-ring {
  animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}
.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}
.progress-ring-circle {
  stroke-dasharray: 753.98;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
  stroke-width: 10;
  stroke-linecap: round;
}
.pomodoro-tool.work .progress-ring-circle {
  stroke: url(#progressGradient);
  filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
}
.pomodoro-tool.short-break .progress-ring-circle,
.pomodoro-tool.long-break .progress-ring-circle {
  stroke: url(#breakGradient);
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}
.time-display-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.time-display {
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.6s ease-out 0.3s backwards;
  margin: 0;
}
.pomodoro-tool.final-minute .time-display {
  animation: finalPulse 1s ease-in-out infinite;
  color: #f59e0b;
}
@keyframes finalPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  }
}
.session-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  color: var(--text-secondary);
  opacity: 0.8;
}
.pomodoro-icon {
  font-size: 1rem;
  margin-right: 2px;
}
.session-divider {
  opacity: 0.5;
}
.pomodoro-controls {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin: var(--spacing-xs) 0;
}
.pomodoro-btn {
  min-width: 90px;
  min-height: 52px;
  padding: 0;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.primary-btn {
  min-width: 110px;
  min-height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  color: white;
}
.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.primary-btn:active:not(:disabled) {
  transform: translateY(0);
}
.primary-btn.running {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.primary-btn.running:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}
.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}
.secondary-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.secondary-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.quick-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xs);
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.6s ease-out 0.2s backwards;
}
.preset-btn {
  padding: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  position: relative;
  overflow: hidden;
}
.preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px) scale(1.02);
}
.preset-btn.active {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.2) 0%,
    rgba(118, 75, 162, 0.2) 100%
  );
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}
.preset-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.preset-icon {
  font-size: 1rem;
  transition: transform 0.3s;
}
.preset-btn:hover .preset-icon {
  transform: scale(1.1);
}
.preset-label {
  font-size: 0.625rem;
}
.preset-value {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.preset-time {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}
.preset-unit {
  margin-left: 2px;
  font-size: 0.75rem;
  opacity: 0.7;
}
.pomodoro-stats {
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.6s ease-out 0.4s backwards;
}
.glassmorphism {
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stats-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  opacity: 0.8;
}
.stats-date {
  font-size: 0.625rem;
  color: var(--text-secondary);
  opacity: 0.6;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xs);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.stat-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.6;
  line-height: 1.2;
}
.stat-icon {
  font-size: 0.875rem;
  opacity: 0.8;
}
.stat-label {
  font-size: 0.5rem;
}
.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-value {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}
.stat-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 2px;
  transition: width 0.6s ease-out;
  width: 0;
}
.options-section {
  margin-bottom: 1.5rem;
}
.options-section:last-child {
  margin-bottom: 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.875rem;
}
.section-icon {
  font-size: 1.125rem;
}
.duration-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}
.duration-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  min-width: 120px;
}
.duration-controls {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
}
.duration-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.duration-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.duration-btn:active {
  transform: scale(0.95);
}
.duration-value {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  min-width: 60px;
}
.duration-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 0.25rem;
}
.interval-options {
  display: flex;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.25rem;
}
.interval-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.interval-btn.active {
  background: var(--gradient-primary);
  color: #fff;
}
.interval-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}
.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: background 0.2s ease;
}
.toggle-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.toggle-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.goal-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.875rem;
}
.goal-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}
.goal-buttons {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.goal-btn {
  flex: 1;
  min-width: 55px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.goal-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}
.goal-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
.actions-section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.action-btn {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}
.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.action-btn.danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 0.8);
}
.action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 480px) {
  .pomodoro-tool {
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }
  .progress-ring-container {
    width: 220px;
    height: 220px;
  }
  .time-display {
    font-size: 2.5rem;
  }
  .session-label {
    font-size: 1rem;
  }
  .session-info {
    font-size: 0.7rem;
  }
  .pomodoro-controls {
    gap: 8px;
  }
  .pomodoro-btn {
    min-width: 75px;
    min-height: 48px;
  }
  .primary-btn {
    min-width: 95px;
    min-height: 52px;
  }
  .quick-settings {
    gap: 6px;
    max-width: 100%;
  }
  .preset-btn {
    min-height: 58px;
    padding: 6px;
  }
  .preset-icon {
    font-size: 1rem;
  }
  .preset-label {
    font-size: 0.55rem;
  }
  .preset-time {
    font-size: 0.95rem;
  }
  .stats-grid {
    gap: 6px;
  }
  .stat-item {
    padding: 6px;
  }
  .stat-icon {
    font-size: 0.8rem;
  }
  .stat-value {
    font-size: 1.1rem;
  }
  .stat-label {
    font-size: 0.45rem;
  }
}
@media (min-width: 481px) and (max-width: 768px) {
  .progress-ring-container {
    width: 280px;
    height: 280px;
  }
  .time-display {
    font-size: 3.5rem;
  }
}
@media (min-width: 769px) {
  .pomodoro-tool {
    max-width: 650px;
    padding: var(--spacing-lg);
  }
  .progress-ring-container {
    width: 280px;
    height: 280px;
  }
  .time-display {
    font-size: 4rem;
  }
}
@media (prefers-contrast: high) {
  .progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.2);
  }
  .preset-btn {
    border-width: 2px;
  }
  .pomodoro-btn {
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@supports (-webkit-touch-callout: none) {
  body.fullscreen .pomodoro-tool {
    min-height: -webkit-fill-available;
  }
  body.fullscreen .pomodoro-tool {
    height: -webkit-fill-available;
  }
}
