:root {
  --bg-color: #0F0A1A;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  
  --primary: #8B5CF6;
  --secondary: #A78BFA;
  --accent: #F59E0B;
  
  --text-main: #FFFFFF;
  --text-muted: #9CA3AF;
  
  --radius: 12px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.25s ease;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; color: var(--secondary); margin-bottom: 1rem; }

/* Layout */
.app-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 2rem;
  height: calc(100vh - 4rem);
}

.sidebar-header h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.streak-tracker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-color);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.nav-btn.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  font-weight: 500;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  width: 100%;
}

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

.btn-primary:hover {
  background: #7c3aed;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--surface-hover);
}

/* Main Content */
.main-content {
  flex: 1;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* Energy Tracker */
.energy-tracker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.energy-tracker label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.energy-options {
  display: flex;
  gap: 0.25rem;
}

.energy-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.energy-btn:hover {
  border-color: var(--secondary);
  color: var(--text-main);
}

.energy-btn.selected {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* Form Elements */
.review-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.review-step.active {
  display: block;
}

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

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-main);
}

textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: var(--transition);
}

textarea::placeholder {
  color: rgba(156, 163, 175, 0.5);
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Archive List */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.archive-item {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.archive-item:hover {
  border-color: var(--secondary);
  background: rgba(139, 92, 246, 0.05);
}

.archive-date {
  font-weight: 500;
}

.archive-energy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .no-print, .sidebar {
    display: none !important;
  }
  .main-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .app-container {
    display: block;
    padding: 0;
  }
  .review-step {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
  textarea {
    border: 1px solid #ccc;
    background: transparent;
    color: black;
  }
  h3 {
    color: black;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    padding: 1rem;
  }
  .sidebar {
    width: 100%;
    position: static;
    height: auto;
  }
  .main-content {
    padding: 1.5rem;
  }
}
