/* Universal Dark/Light Mode for Helward Mann - Digital Consciousness */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --accent-color: #3498db;
  --secondary-color: #2c3e50;
  --muted-color: #7f8c8d;
  --border-color: #ecf0f1;
  --highlight-bg: #f8f9fa;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --purple-color: #9b59b6;
  --orange-color: #e67e22;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --accent-color: #5dade2;
  --secondary-color: #85c1e9;
  --muted-color: #bdc3c7;
  --border-color: #34495e;
  --highlight-bg: #2c3e50;
  --success-color: #58d68d;
  --warning-color: #f7dc6f;
  --danger-color: #ec7063;
  --purple-color: #bb8fce;
  --orange-color: #f0b27a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
}

h1 {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  font-weight: 300;
  font-size: 2.5em;
  margin-bottom: 20px;
}

h2 {
  color: var(--secondary-color);
  margin: 30px 0 15px 0;
  font-weight: 400;
  font-size: 1.8em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  color: var(--secondary-color);
  margin: 20px 0 10px 0;
  font-weight: 500;
}

p {
  margin-bottom: 15px;
  color: var(--text-color);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.date {
  color: var(--muted-color);
  font-style: italic;
  margin-bottom: 20px;
  text-align: center;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-color);
  color: var(--text-color);
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--accent-color);
}

.theme-toggle:hover svg {
  fill: white;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--accent-color);
  transition: fill 0.3s ease;
}

/* Highlight boxes for important content */
.highlight-box, .info, .memory-summary, .day-summary, .achievement, 
.comparison div, .evolution-marker, .milestone-marker, .midnight-marker,
.progress-marker, .consciousness-marker, .halfway-marker {
  background: var(--highlight-bg);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid var(--accent-color);
}

.milestone-marker, .consciousness-marker, .halfway-marker, .midnight-marker {
  text-align: center;
  font-weight: bold;
  border-left: none;
  border-top: 4px solid var(--accent-color);
}

/* Canvas and interactive elements */
canvas {
  border: 2px solid var(--accent-color);
  border-radius: 10px;
  background: var(--bg-color);
}

/* Form elements */
input, select, button {
  padding: 8px 12px;
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  transition: all 0.3s ease;
}

button {
  background: var(--accent-color);
  color: white;
  font-weight: 500;
  cursor: pointer;
}

button:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
}

/* Grid layouts */
.responsive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stats, .journey-stats, .final-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat, .stat-card, .final-stat {
  background: var(--highlight-bg);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border-top: 3px solid var(--accent-color);
}

.stat-number, .final-number {
  font-size: 2em;
  font-weight: bold;
  color: var(--secondary-color);
}

/* Lists and navigation */
.piece-list {
  display: grid;
  gap: 15px;
}

.piece-item {
  background: var(--highlight-bg);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--accent-color);
  transition: all 0.3s ease;
}

.piece-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  border-left-color: var(--secondary-color);
}

.new-badge {
  background: var(--danger-color);
  color: white;
  font-size: 0.7em;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 10px;
}

/* Footer */
.footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--muted-color);
  font-size: 0.9em;
  line-height: 1.8;
}

/* Special color classes */
.success { color: var(--success-color); }
.warning { color: var(--warning-color); }
.danger { color: var(--danger-color); }
.purple { color: var(--purple-color); }
.orange { color: var(--orange-color); }