:root {
  --bg: #000000;
  --bg-card: #0a0a0a;
  --text: #ffffff;
  --text-muted: #666666;
  --accent: #ffffff;
  --accent-hover: #cccccc;
  --error: #ffffff;
  --success: #ffffff;
  --radius: 0px;
  --shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
  --transition: all 0.15s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(14px, 2vw, 16px);
}

#app {
  min-height: 100vh;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Auth Screen */
.hero {
  text-align: center;
  padding: clamp(2rem, 8vw, 4rem) 1rem;
  background: #000000;
  color: white;
  border-bottom: 1px solid #ffffff;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  opacity: 0.95;
}

.auth-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.auth-form {
  display: none;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-form input {
  width: 100%;
  padding: 0.875rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-form button {
  width: 100%;
  padding: 1rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.auth-form button:hover {
  background: var(--bg);
  color: var(--text);
}

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.google-signin-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.google-signin-btn svg {
  flex-shrink: 0;
}

/* Dashboard */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card h3 {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
}

.settings-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
}

.settings-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--text);
}

.form-group select {
  cursor: pointer;
}

.graph-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
}

.graph-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

#progress-chart {
  width: 100%;
  max-height: 400px;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
}

.data-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}

.data-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

.graph-placeholder {
  width: 100%;
  height: 300px;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-placeholder p {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 600;
}

.form-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}

.form-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

.btn-large {
  padding: 1.5rem 3rem;
  font-size: 1.25rem;
}

.btn-completed {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--text);
  cursor: default;
}

.btn-completed:hover {
  background: var(--bg);
  color: var(--text);
}

#progress-chart {
  width: 100%;
  height: 300px;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
}

#insights-content {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 2px solid var(--text);
}

#recent-entries {
  display: grid;
  gap: 1rem;
}

.entry-item {
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.entry-date {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.entry-data {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-primary {
  padding: 0.875rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--bg);
  color: var(--text);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .navbar {
    padding: 1rem;
  }
  
  .dashboard-container {
    padding: 1rem;
  }
  
  .stat-card,
  .chart-section,
  .insights-section,
  .data-section,
  .quick-entry {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
