/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */

:root {
  /* Color Palette */
  --color-primary: #667eea;
  --color-secondary: #764ba2;
  --color-accent: #4299e1;

  /* Backgrounds */
  --color-bg-light: #f7fafc;
  --color-bg-white: #ffffff;

  /* Text Colors */
  --color-text-dark: #2d3748;
  --color-text-muted: #718096;

  /* UI Elements */
  --color-border: #e2e8f0;
  --color-error: #e53e3e;
  --color-error-bg: #fff5f5;
  --color-error-border: #fc8181;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.15);

  /* Spacing */
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;

  /* Typography */
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
}

/* Dark Theme - Override Variables */
body.theme-dark {
  /* Backgrounds */
  --color-bg-light: #1a202c;
  --color-bg-white: #2d3748;

  /* Text Colors */
  --color-text-dark: #f7fafc;
  --color-text-muted: #cbd5e0;

  /* UI Elements */
  --color-border: #4a5568;

  /* Accent Colors (lighter in dark mode) */
  --color-accent: #63b3ed;

  /* Shadows (darker in dark mode) */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5);

  /* Error Colors (adjusted for dark mode) */
  --color-error-bg: #742a2a;

  /* Header Gradient (different colors for dark mode) */
  --color-primary: #4a5568;
  --color-secondary: #2d3748;
}

/* Optional: Dark mode specific refinements */
body.theme-dark .task-item {
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .task-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-dark input {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-page-bg);
    padding: 20px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
    padding: var(--space-md);
  }
}


header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
  color: var(--color-text-dark);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(20deg);
}

.theme-icon {
  font-size: 24px;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
}


.secondary-info {
  color: var(--color-text-muted);
}

.widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget {
  background: var(--color-bg-white);
  padding: var(--space-md);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  min-height: 200px;
}

/* Weather widget - ONLY unique styles */
.weather-widget {
  border-left: 4px solid var(--color-accent);
}


.widget h2 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.2em;
    border-bottom: 2px solid var(--color-border);
}

/* Weather Widget Styles */
.weather-current {
    text-align: center;
    margin-bottom: 20px;
}

.weather-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 48px;
    font-weight: bold;
    color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
    margin: 10px 0;
}

.weather-location {
    font-size: 18px;
    color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
    margin: 5px 0;
}

.weather-condition {
    font-size: 16px;
    color: #4a5568;
    font-weight: 500;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
    margin-top: 15px;
}

.weather-detail {
    text-align: center;
}

.weather-detail span {
    display: block;
    font-size: 14px;
    color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
    margin-bottom: 5px;
}

.weather-detail strong {
    font-size: 18px;
    color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
}

/* Error Message Styles */
.error-message {
    text-align: center;
    padding: 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.error-message p {
    color: #e53e3e;
    font-size: 16px;
    margin: 5px 0;
}

.error-hint {
    color: #a0aec0;
    font-size: 14px !important;
}


.quote-card {
  text-align: center;
  padding: 30px 20px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quote-text {
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 15px;
  max-width: 600px;
}

.quote-author {
  font-size: 16px;
  color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
  font-weight: 500;
}

.btn-primary {
  background: #4299e1;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
  margin-top: 15px;
}

.btn-primary:hover {
  background: #3182ce;
}

.btn-primary:active {
  transform: scale(0.98);
}

.quote-card {
  animation: fadeIn 0.5s ease;
}

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


.task-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.task-form input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  font-size: 14px;
}

.task-form input[type="text"]:focus {
  outline: none;
  border-color: #4299e1;
}

.task-stats {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background: #f7fafc;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #4a5568;
}

.task-stats .stat strong {
  color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
}

.tasks-list {
  max-height: 300px;
  overflow-y: auto;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.task-item:hover {
  background: #f7fafc;
}

.task-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.task-item .task-text {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-dark);
}

.secondary-info {
  color: var(--color-text-muted);
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: #a0aec0;
}

.btn-delete {
  padding: 6px 12px;
  background: #fc8181;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-delete:hover {
  background: #f56565;
}

.no-tasks {
  text-align: center;
  padding: 40px 20px;
  color: #a0aec0;
  font-size: 14px;
}

