/* CSS Variables for Themes - Nordic Theme */
:root {
  /* Light Theme (Nord Snow Storm) */
  --bg-primary: linear-gradient(135deg, #5e81ac 0%, #81a1c1 100%);
  --bg-secondary: rgba(236, 239, 244, 0.95);
  --bg-card: rgba(236, 239, 244, 0.95);
  --bg-card-hover: rgba(229, 233, 240, 1);
  --text-primary: #2e3440;
  --text-secondary: #3b4252;
  --text-muted: #4c566a;
  --accent-primary: #5e81ac;
  --accent-secondary: #81a1c1;
  --accent-gradient: linear-gradient(135deg, #5e81ac 0%, #88c0d0 100%);
  --border-color: rgba(46, 52, 64, 0.1);
  --shadow-color: rgba(46, 52, 64, 0.1);
  --shadow-lg: 0 20px 60px rgba(46, 52, 64, 0.15);
  --shadow-md: 0 10px 30px rgba(46, 52, 64, 0.1);
  --shadow-sm: 0 4px 15px rgba(46, 52, 64, 0.08);
  --input-bg: #e5e9f0;
  --btn-primary-bg: linear-gradient(135deg, #5e81ac 0%, #81a1c1 100%);
  --btn-primary-text: #eceff4;
  --btn-secondary-bg: #d8dee9;
  --btn-secondary-text: #3b4252;
  --btn-danger-bg: #bf616a;
  --btn-danger-text: #eceff4;
  --success-color: #a3be8c;
  --warning-color: #ebcb8b;
  --danger-color: #bf616a;
  --progress-bg: rgba(46, 52, 64, 0.1);
  --progress-fill: #5e81ac;
  --todo-complete-bg: rgba(163, 190, 140, 0.15);
  --countdown-bg: rgba(46, 52, 64, 0.05);
}

/* Dark Theme (Nord Polar Night) */
[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #2e3440 0%, #3b4252 100%);
  --bg-secondary: rgba(46, 52, 64, 0.95);
  --bg-card: rgba(59, 66, 82, 0.9);
  --bg-card-hover: rgba(67, 76, 94, 1);
  --text-primary: #eceff4;
  --text-secondary: #e5e9f0;
  --text-muted: #d8dee9;
  --accent-primary: #88c0d0;
  --accent-secondary: #8fbcbb;
  --accent-gradient: linear-gradient(135deg, #88c0d0 0%, #8fbcbb 100%);
  --border-color: rgba(236, 239, 244, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
  --input-bg: rgba(67, 76, 94, 0.8);
  --btn-primary-bg: linear-gradient(135deg, #88c0d0 0%, #8fbcbb 100%);
  --btn-primary-text: #2e3440;
  --btn-secondary-bg: rgba(76, 86, 106, 0.8);
  --btn-secondary-text: #eceff4;
  --btn-danger-bg: #bf616a;
  --btn-danger-text: #eceff4;
  --success-color: #a3be8c;
  --warning-color: #ebcb8b;
  --danger-color: #bf616a;
  --progress-bg: rgba(236, 239, 244, 0.1);
  --progress-fill: #88c0d0;
  --todo-complete-bg: rgba(163, 190, 140, 0.2);
  --countdown-bg: rgba(236, 239, 244, 0.05);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

/* Current Time Display */
.current-time {
  text-align: center;
  font-size: 4rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 5px;
}

.current-date {
  text-align: center;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  font-weight: 300;
}

/* Countdown Section */
.countdown-section {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.countdown-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 30px;
}

.countdown-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.countdown-item {
  background: var(--countdown-bg);
  border-radius: 16px;
  padding: 20px 25px;
  min-width: 100px;
  text-align: center;
  transition: transform 0.3s ease;
}

.countdown-item:hover {
  transform: translateY(-5px);
}

.countdown-value {
  font-size: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.countdown-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.countdown-separator {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--progress-bg);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--progress-fill);
  border-radius: 6px;
  /* No animation, no transition, no pseudo-elements */
}



.progress-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Tools Section */
.tools-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.tool-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

.tool-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 25px;
}

.tool-title svg {
  color: var(--accent-primary);
}

/* Pomodoro Timer */
.pomodoro-display {
  font-size: 4.5rem;
  font-weight: 700;
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.pomodoro-status {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 1rem;
}

.pomodoro-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.pomodoro-modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.mode-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.mode-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.mode-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

.pomodoro-stats {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pomodoro-stats strong {
  color: var(--accent-primary);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

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

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Todo List */
.todo-input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.todo-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.todo-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.todo-input::placeholder {
  color: var(--text-muted);
}

.todo-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: var(--btn-secondary-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.filter-btn.active {
  background: var(--accent-gradient);
  color: white;
}

.todo-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.todo-list::-webkit-scrollbar {
  width: 6px;
}

.todo-list::-webkit-scrollbar-track {
  background: var(--progress-bg);
  border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 3px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--input-bg);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.todo-item:hover {
  box-shadow: var(--shadow-sm);
}

.todo-item.completed {
  background: var(--todo-complete-bg);
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.todo-checkbox:hover {
  border-color: var(--accent-primary);
}

.todo-checkbox.checked {
  background: var(--success-color);
  border-color: var(--success-color);
}

.todo-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.todo-text {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
  word-break: break-word;
}

.todo-delete {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.todo-item:hover .todo-delete {
  opacity: 1;
}

.todo-delete:hover {
  background: var(--danger-color);
  color: white;
}

.todo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

#todoCount {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Greeting Section */
.greeting-section {
  text-align: center;
  padding: 30px;
}

.greeting {
  font-size: 1.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 15px;
}

.quote {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Footer */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.footer a:hover {
  color: white;
  border-bottom-color: white;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  .current-time {
    font-size: 2.5rem;
  }

  .current-date {
    font-size: 1rem;
  }

  .countdown-section {
    padding: 25px 20px;
  }

  .countdown-title {
    font-size: 1.5rem;
  }

  .countdown-container {
    gap: 8px;
  }

  .countdown-item {
    padding: 15px 12px;
    min-width: 70px;
  }

  .countdown-value {
    font-size: 2rem;
  }

  .countdown-separator {
    font-size: 1.5rem;
  }

  .tools-section {
    grid-template-columns: 1fr;
  }

  .tool-card {
    padding: 20px;
  }

  .pomodoro-display {
    font-size: 3rem;
  }

  .pomodoro-controls {
    flex-wrap: wrap;
  }

  .btn {
    padding: 10px 18px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .countdown-item {
    min-width: 55px;
    padding: 10px 8px;
  }

  .countdown-value {
    font-size: 1.5rem;
  }

  .countdown-label {
    font-size: 0.7rem;
  }

  .countdown-separator {
    font-size: 1.2rem;
  }

  .pomodoro-modes {
    flex-direction: column;
  }

  .mode-btn {
    width: 100%;
  }
}

/* Celebration Animation */
@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.celebrating {
  animation: celebrate 0.5s ease infinite;
}

/* Confetti Animation */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  animation: confetti-fall 3s linear forwards;
}

/* Notification styles */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
  max-width: 90%;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification.success {
  border-left: 4px solid var(--success-color);
}

.notification.warning {
  border-left: 4px solid var(--warning-color);
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Page Title Animation */
@keyframes pulse-title {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.pulse-title {
  animation: pulse-title 2s ease infinite;
}
