/* Visually hidden (for accessibility) */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
}

.intro {
  font-size: 1.05em;
  color: #5a7d5a;
  text-align: center;
  margin-bottom: 0.5em;
}

header ul {
  margin: 0 auto 1em auto;
  padding-left: 1.2em;
  max-width: 400px;
  font-size: 0.98em;
  color: #4a5d4a;
}
header ul li {
  margin-bottom: 0.3em;
}

@media (max-width: 600px) {
  .intro {
    font-size: 1em;
    margin-bottom: 0.3em;
  }
  header ul {
    font-size: 0.95em;
    padding-left: 1em;
  }
  .app {
    padding: 0.7rem;
  }
  section[aria-label] {
    margin-bottom: 1.2em;
  }
}
/* Share Bloom button and notification */
#share-bloom-btn {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #6ec6ca 0%, #4db6ac 100%);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.8rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(76,175,80,0.06);
  font-family: inherit;
}
#share-bloom-btn:hover, #share-bloom-btn:focus {
  background: linear-gradient(90deg, #4db6ac 0%, #00897b 100%);
  box-shadow: 0 4px 16px rgba(76,175,80,0.10);
}
#share-bloom-notify {
  background: #eaf3ea;
  border-radius: 6px;
  padding: 0.4em 0.8em;
  margin-bottom: 0.5em;
  color: #5a7d5a;
  font-size: 0.98em;
  display: none;
  animation: fadeInCard 0.5s;
}
/* Past Reflections Section */
#past-reflections-section {
  margin-top: 2rem;
}
#past-reflections-title {
  font-size: 1.1rem;
  color: #5a7d5a;
  margin-bottom: 0.5rem;
}
#past-reflections-list {
  margin-bottom: 1rem;
}
.past-reflection {
  background: #f0f6f0;
  border-left: 4px solid #b0c8b0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.7em;
  font-size: 1.05em;
  display: block;
  opacity: 0;
  animation: fadeInCard 0.7s ease forwards;
  box-shadow: 0 2px 8px rgba(90,125,90,0.06);
  word-break: break-word;
}
.past-reflection .timestamp {
  margin-right: 0.7em;
}
#clear-reflections-btn {
  background: #e57373;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1em;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
  width: auto;
  min-width: 180px;
  display: block;
  margin: 0 auto;
}
#clear-reflections-btn:hover, #clear-reflections-btn:focus {
  background: #c62828;
}
.timestamp {
  display: inline-block;
  color: #7a8c7a;
  background: #eaf3ea;
  font-size: 0.85em;
  font-style: italic;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 0.5em;
  vertical-align: middle;
}
.reflection-label {
  font-weight: 600;
  color: #5a7d5a;
  margin-right: 0.3em;
}
/* Ensure all elements use border-box for sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background: #f9faf7;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  margin: 0;
  min-height: 100vh;
}

.app {
  max-width: 500px;
  width: 100%;
  background: #f2fdff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
  box-sizing: border-box;
}


h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}
h1 {
  text-align: center;
  color: #5a7d5a;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card {
  background: #ffeaf7;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 1.1rem;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(90,125,90,0.06);
  opacity: 0;
  animation: fadeInCard 0.8s ease forwards;
}

@keyframes fadeInCard {
  to { opacity: 1; }
}

textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: none;
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus {
  outline: none;
  border-color: #88a888;
  box-shadow: 0 0 0 2px #cde3cd;
}


/* Save Reflection button: more vibrant and prominent */
#save-btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #39ca69 0%, #2fe6c4 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 4px 16px rgba(67,233,123,0.13);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  font-family: inherit;
  letter-spacing: 0.01em;
}
#save-btn:hover, #save-btn:focus {
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
  box-shadow: 0 8px 24px rgba(67,233,123,0.18);
  outline: 2px solid #11998e;
  outline-offset: 2px;
  transform: scale(1.03);
}

.saved {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #f6f6f6;
  border-left: 4px solid #88a888;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.saved.show {
  display: block;
  opacity: 1;
}

#how-it-works {
  margin-top: 1rem;
}

/* Accessibility: high contrast for focus, readable font sizes */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }
  .app {
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
  h1 {
    font-size: 1.3rem;
  }
  .card {
    font-size: 1rem;
    padding: 0.7rem;
  }
  textarea, button {
    font-size: 1rem;
    padding: 0.7rem;
  }
}
