:root {
  --bg-primary: #0f1219;
  --bg-secondary: #1a1f2e;
  --bg-card: #1e2433;
  --text-primary: #e8e2d6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.2);
  --border: rgba(255, 255, 255, 0.06);
  --gradient-start: #0f1219;
  --gradient-end: #1a1025;
}

.theme-light {
  --bg-primary: #f8f6f1;
  --bg-secondary: #efe9df;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #d97706;
  --accent-glow: rgba(217, 119, 6, 0.15);
  --border: rgba(0, 0, 0, 0.08);
  --gradient-start: #f8f6f1;
  --gradient-end: #ede4d8;
}

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

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  min-height: 100vh;
  color: var(--text-primary);
  transition: background 0.4s ease, color 0.3s ease;
}

.theme-dark body,
body.theme-dark {
  background: linear-gradient(135deg, #0f1219 0%, #1a1025 50%, #0f1924 100%);
}

.theme-light body,
body.theme-light {
  background: linear-gradient(135deg, #f8f6f1 0%, #ede4d8 50%, #f0ebe3 100%);
}

.dashboard-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  animation: fadeSlideDown 0.6s ease;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.3rem;
  font-weight: 400;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  animation: fadeSlideUp 0.6s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Clock Card */
.clock-card {
  border-top: 3px solid var(--accent);
}

.time-display {
  margin-bottom: 0.5rem;
}

.time-digits {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.time-seconds {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.time-ampm {
  font-size: 1rem;
  font-weight: 400;
  color: var(--accent);
  margin-left: 0.3rem;
}

.date-display {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.clock-quote {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Notes Card */
.notes-card {
  grid-row: span 1;
}

.notes-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease;
  outline: none;
}

.notes-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.notes-textarea::placeholder {
  color: var(--text-muted);
}

.notes-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notes-saved {
  opacity: 0.7;
}

/* Activity Card */
.activity-content {
  margin-bottom: 1rem;
}

.activity-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.activity-type {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.activity-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.activity-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.3);
}

.activity-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.activity-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Weather Card */
.weather-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.weather-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  animation: weatherGlow 4s ease-in-out infinite;
  pointer-events: none;
}

.weather-icon-large {
  font-size: 4rem;
  margin: 0.5rem 0;
  animation: weatherBob 3s ease-in-out infinite;
  position: relative;
}

.weather-desc {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
}

.weather-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  position: relative;
}

/* Counter Card */
.counter-card {
  text-align: center;
}

.counter-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.5rem 0;
  transition: transform 0.15s ease;
}

.counter-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.05em;
}

.counter-btn:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 30px var(--accent-glow);
  transform: scale(1.05);
}

.counter-btn-active {
  transform: scale(0.9) !important;
}

.counter-message {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  font-style: italic;
}

.counter-reset {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  transition: color 0.2s;
}

.counter-reset:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* Footer */
.dashboard-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  animation: fadeSlideUp 0.8s ease backwards;
  animation-delay: 0.7s;
}

.dashboard-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.remix-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.remix-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Animations */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes weatherBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes weatherGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Responsive */
@media (max-width: 700px) {
  .dashboard-container {
    padding: 1.2rem 1rem;
  }

  .header-title {
    font-size: 1.8rem;
  }

  .header-subtitle {
    font-size: 0.9rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .time-digits {
    font-size: 2.2rem;
  }

  .counter-number {
    font-size: 2.8rem;
  }
}