body.dark {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #0b1220;
  color: #e5e7eb;
  overflow: hidden;
}

/* ================= APP LAYOUT ================= */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ================= SIDEBAR ================= */
.sidebar {
  width: 260px;
  background: #0f172a;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid #1f2937;
}

.sidebar h3 {
  margin-bottom: 10px;
}

.sidebar button {
  padding: 10px;
  background: #1f2937;
  color: #e5e7eb;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.sidebar button:hover {
  background: #374151;
  transform: translateX(3px);
}

.sidebar select {
  padding: 8px;
  background: #111827;
  color: white;
  border: 1px solid #374151;
  border-radius: 8px;
}

/* ================= TIME BOX ================= */
.time-box {
  background: #111827;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
}

/* ================= MAIN AREA ================= */
.main {
  flex: 1;
  padding: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ================= TOP STATS BAR ================= */
.stats-bar {
  display: flex;
  justify-content: space-between;
  background: #111827;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid #1f2937;
}

.stats-bar div {
  font-size: 14px;
}

/* ================= SECTIONS ================= */
.section {
  display: none;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
  height: 100%;
  padding-right: 10px;
}

.section.active {
  display: block;
}

/* ================= CARD SYSTEM ================= */
.card {
  background: #111827;
  padding: 15px;
  border-radius: 14px;
  margin-bottom: 15px;
  border: 1px solid #1f2937;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #374151;
}

/* ================= INPUTS ================= */
input,
select,
textarea {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  background: #0b1220;
  border: 1px solid #1f2937;
  color: white;
  border-radius: 10px;
  outline: none;
}

textarea {
  min-height: 80px;
}

/* ================= BUTTON ================= */
button {
  padding: 10px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: 0.2s;
}

button:hover {
  background: #1d4ed8;
}

/* ================= LIVE MOOD PREVIEW ================= */
.preview-box {
  margin-top: 10px;
  padding: 10px;
  background: #0b1220;
  border: 1px dashed #374151;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0.8;
}

/* ================= JOURNAL ================= */
#entriesList {
  list-style: none;
  padding: 0;
}

#entriesList li {
  background: #111827;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid #1f2937;
}

/* ================= HEATMAP ================= */
#heatmap {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
}

.heatmap-cell {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #1f2937;
  transition: 0.3s;
}

.heatmap-cell.level-1 {
  background: #1e293b;
}
.heatmap-cell.level-2 {
  background: #334155;
}
.heatmap-cell.level-3 {
  background: #475569;
}
.heatmap-cell.level-4 {
  background: #6366f1;
}
.heatmap-cell.level-5 {
  background: #22c55e;
}

/* ================= SCROLLBAR ================= */
.section::-webkit-scrollbar {
  width: 6px;
}

.section::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 10px;
}

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

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .sidebar {
    width: 200px;
  }

  .stats-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
}
