:root {
  --bg-light: #fffdf7;
  --text-light: #444;
  --bg-dark: #1e1e1e;
  --text-dark: #eee;
  --accent: #A3D8F4;
  --button: #FFD6A3;
}

body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 20px;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded {
  opacity: 1;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.container {
  max-width: 700px;
  margin: auto;
  padding: 20px;
  margin-bottom: 60px;
}

textarea, input, select {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #fff;
  color: #000;
}

select {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

button {
  padding: 10px 15px;
  margin-top: 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--button);
  cursor: pointer;
  color: #333;
  font-weight: bold;
}

button:hover {
  background-color: #ffc48d;
}

#toggle-mode {
  float: right;
  margin-top: -50px;
  background: var(--accent);
}

.entry {
  margin-top: 15px;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid transparent;
  white-space: pre-wrap;
  animation: fadeInUp 0.4s ease forwards;
}

/* Mood colors – light mode */
body:not(.dark) .entry[data-mood="😊"] { background: #eaffea; border-color: #bcebc1; }
body:not(.dark) .entry[data-mood="😢"] { background: #e6f0ff; border-color: #b3d2f7; }
body:not(.dark) .entry[data-mood="😌"] { background: #fff8e1; border-color: #f6e1a5; }
body:not(.dark) .entry[data-mood="😠"] { background: #ffeaea; border-color: #f5bbbb; }
body:not(.dark) .entry[data-mood="🤯"] { background: #f5e8ff; border-color: #d9bdf4; }
body:not(.dark) .entry[data-mood="🌈"] { background: #e4fff2; border-color: #b6ead4; }

/* Mood colors – dark mode */
body.dark .entry[data-mood="😊"] { background: #3b6049; border-color: #75c095; }
body.dark .entry[data-mood="😢"] { background: #2c4569; border-color: #719bd3; }
body.dark .entry[data-mood="😌"] { background: #5a4e2c; border-color: #c9b87b; }
body.dark .entry[data-mood="😠"] { background: #5a2c2c; border-color: #c68f8f; }
body.dark .entry[data-mood="🤯"] { background: #4e3a5e; border-color: #a783c9; }
body.dark .entry[data-mood="🌈"] { background: #1f594a; border-color: #6fcfb1; }

.entry strong {
  display: inline-block;
  background-color: #f0f0f0;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 0.95em;
}
body.dark .entry strong {
  background-color: #444;
  color: #f0f0f0;
}

.export-btn {
  background-color: #A3F4C1;
  margin-top: 5px;
  font-size: 0.9rem;
  border-radius: 4px;
}
.delete-btn {
  background-color: #f4a3a3;
  margin-top: 5px;
  margin-left: 10px;
  font-size: 0.9rem;
  border-radius: 4px;
}

/* Footer */
.credit-badge {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.85em;
  color: #999;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typewriter for title */
h1 {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #ccc;
  width: 0;
  animation: typing 2s steps(20, end) forwards, blink 0.8s infinite;
}
@keyframes typing { to { width: 100%; } }
@keyframes blink { 50% { border-color: transparent; } }
