@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&family=Playfair+Display&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Playfair Display', serif;
  background: linear-gradient(135deg, #ffeef7, #e6f0ff);
  color: #222;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease;
}

.main-container {
  background: white;
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid gold;
  position: relative;
  animation: fadeIn 1s ease;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  color: #c0392b;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.date {
  font-size: 1.2rem;
  color: #555;
  text-align: center;
  margin-bottom: 1rem;
}

.prompt {
  background: #fff8dc;
  border-left: 6px solid #ff9a9e;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(255, 173, 173, 0.2);
}

textarea {
  width: 100%;
  height: 120px;
  font-size: 1rem;
  padding: 1rem;
  border: 2px solid #ff6f61;
  border-radius: 10px;
  resize: none;
  outline: none;
  font-family: 'Raleway', sans-serif;
  background: #fff;
  transition: 0.3s ease;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

textarea:focus {
  border-color: #d44179;
  box-shadow: 0 0 0 4px rgba(212, 65, 121, 0.2);
}

button {
  background: linear-gradient(90deg, #ff6f91, #ff9671);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  transition: 0.3s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #ff9671, #ff6f91);
}

.audio-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.audio-controls button {
  font-size: 1.2rem;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  background: #ffd700;
  color: #222;
}

.audio-controls input[type="range"] {
  width: 150px;
  accent-color: #ff6f61;
  cursor: pointer;
}

.history-heading {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: #5a5a5a;
  text-align: center;
}

#entry-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

#entry-list li {
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
  padding: 0.8rem;
  border-left: 4px solid #91e5f6;
  border-radius: 6px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Overlay screen for rain prompt */
#start-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  color: gold;
  font-size: 1.5rem;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 9999;
  cursor: pointer;
  transition: opacity 0.5s ease;
  padding: 2rem;
}

#start-overlay p {
  max-width: 500px;
  line-height: 1.6;
  text-shadow: 1px 1px 6px #000;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none;
}

/* Scrollbar aesthetic */
#entry-list::-webkit-scrollbar {
  width: 6px;
}
#entry-list::-webkit-scrollbar-thumb {
  background: #ffb6b6;
  border-radius: 10px;
}
#start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: gold;
  text-align: center;
  cursor: pointer;
  transition: opacity 1s ease;
}

#start-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
