/* Timer Styles */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Main Timer Container */
.timer-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 50px;
  padding: 4px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 46px;
  color: #888;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn.active {
  background: linear-gradient(45deg, #00c8ff, #00fff7);
  color: #0b0c10;
  box-shadow: 0 4px 15px rgba(0,200,255,0.3);
}

.mode-btn:not(.active):hover {
  color: #00c8ff;
  background: rgba(0,200,255,0.1);
}

/* Timer Sections */
.timer-section {
  display: none;
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.timer-section.active {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Session Tabs (Pomodoro) */
.session-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.session-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #888;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-width: 120px;
}

.session-btn span {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.session-btn small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.session-btn.active {
  background: rgba(0,200,255,0.15);
  border-color: #00c8ff;
  color: #00c8ff;
  box-shadow: 0 4px 20px rgba(0,200,255,0.2);
}

.session-btn:not(.active):hover {
  background: rgba(255,255,255,0.08);
  color: #e0e0e0;
}

/* Timer Display */
.timer-display {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.time-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-circle.simple {
  width: 300px;
  height: 300px;
  border: 3px solid rgba(0,200,255,0.2);
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: rgba(255,255,255,0.1);
}

.progress-ring-fill {
  stroke: #00c8ff;
  stroke-dasharray: 879.65; /* 2 * PI * 140 */
  stroke-dashoffset: 879.65;
  transition: stroke-dashoffset 1s ease;
  filter: drop-shadow(0 0 8px rgba(0,200,255,0.6));
}

.time-text {
  position: absolute;
  text-align: center;
  z-index: 10;
}

.time-main {
  display: block;
  font-size: 3.5rem;
  font-weight: 300;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(0,200,255,0.3);
}

.time-label {
  display: block;
  font-size: 1rem;
  color: #888;
  font-weight: 400;
}

/* Timer Controls */
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 25px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-width: 120px;
  justify-content: center;
}

.control-btn.primary {
  background: linear-gradient(45deg, #00c8ff, #00fff7);
  color: #0b0c10;
  box-shadow: 0 4px 20px rgba(0,200,255,0.4);
}

.control-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,200,255,0.6);
}

.control-btn.secondary {
  background: rgba(249,199,79,0.2);
  color: #f9c74f;
  border: 1px solid #f9c74f;
}

.control-btn.secondary:hover {
  background: #f9c74f;
  color: #0b0c10;
  transform: translateY(-2px);
}

.control-btn.tertiary {
  background: rgba(255,255,255,0.05);
  color: #888;
  border: 1px solid rgba(255,255,255,0.2);
}

.control-btn.tertiary:hover {
  background: rgba(255,255,255,0.1);
  color: #e0e0e0;
  transform: translateY(-2px);
}

.control-btn.quaternary {
  background: rgba(0,255,247,0.1);
  color: #00fff7;
  border: 1px solid #00fff7;
}

.control-btn.quaternary:hover {
  background: #00fff7;
  color: #0b0c10;
  transform: translateY(-2px);
}

/* Session Info */
.session-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  margin-top: 1rem;
}

.session-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.counter-label {
  font-size: 0.85rem;
  color: #888;
}

.counter-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00c8ff;
}

.next-break {
  text-align: center;
  color: #f9c74f;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Stopwatch Laps */
.laps-container {
  margin-top: 2rem;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.laps-title {
  color: #00c8ff;
  margin-bottom: 1rem;
  font-weight: 500;
  text-align: center;
}

.laps-list {
  max-height: 200px;
  overflow-y: auto;
}

.lap-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  border-left: 3px solid #00fff7;
}

.lap-number {
  color: #888;
  font-weight: 500;
}

.lap-time {
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 50%;
  right: -350px;
  transform: translateY(-50%);
  width: 320px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 20px;
  padding: 2rem;
  transition: right 0.3s ease;
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-panel.open {
  right: 20px;
}

.settings-panel h3 {
  color: #00c8ff;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-group label {
  display: block;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.setting-group input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  outline: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00c8ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,200,255,0.5);
}

.setting-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00c8ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0,200,255,0.5);
}

.setting-value {
  color: #00c8ff;
  font-weight: 600;
  float: right;
}

.setting-group input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: #00c8ff;
}

.settings-toggle {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0,200,255,0.2);
  border: 1px solid #00c8ff;
  color: #00c8ff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 999;
}

.settings-toggle:hover {
  background: rgba(0,200,255,0.3);
  transform: translateY(-50%) scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timer-container {
    padding: 1rem;
  }
  
  .session-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .session-btn {
    min-width: auto;
    padding: 0.75rem 1rem;
  }
  
  .time-main {
    font-size: 2.5rem;
  }
  
  .timer-controls {
    gap: 0.5rem;
  }
  
  .control-btn {
    padding: 0.75rem 1.5rem;
    min-width: 100px;
    font-size: 0.9rem;
  }
  
  .session-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Settings overlay for mobile */
  .settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .settings-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .settings-panel {
    width: calc(100vw - 40px);
    right: -100vw;
    top: 50%;
    transform: translateY(-50%);
    max-width: 350px;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
  }
  
  .settings-panel.open {
    opacity: 1;
    visibility: visible;
  }
  
  .settings-toggle {
    right: 15px;
    bottom: 20px;
    top: auto;
    transform: none;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 15px rgba(0,200,255,0.3);
  }
  
  .settings-toggle:hover {
    background: rgba(0,200,255,0.3);
    transform: scale(1.1);
  }
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0,200,255,0.95);
  color: #0b0c10;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
}

.notification.show {
  transform: translateX(0);
}

.notification.break {
  background: rgba(249,199,79,0.95);
}

.notification.complete {
  background: rgba(0,255,247,0.95);
}

/* Pulse Animation for Active Timer */
.time-circle.active {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Custom Scrollbar */
.laps-list::-webkit-scrollbar,
.settings-panel::-webkit-scrollbar {
  width: 6px;
}

.laps-list::-webkit-scrollbar-track,
.settings-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.laps-list::-webkit-scrollbar-thumb,
.settings-panel::-webkit-scrollbar-thumb {
  background: #00c8ff;
  border-radius: 3px;
}

.laps-list::-webkit-scrollbar-thumb:hover,
.settings-panel::-webkit-scrollbar-thumb:hover {
  background: #00fff7;
}