/* Importing the font Libre Baskerville to give a paper-like journal feel to the app */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap');

body {
  font-family: Georgia, serif;
  background-color: #f5f3ef;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 1rem;
}

/* Main quote container using the paper feel theme */
.container {
  background: #fffdf9;
  padding: 2rem;
  border-radius: 12px;
  max-width: 620px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border: 1px solid #e3dfd9;
  position: relative; /* position setting for the favorite button */
}

/* Heading styling */
h1 {
  margin-bottom: 2.2rem;
  font-size: 1.8rem;
  color: #333;
  font-weight: bold;
}

/* Adding a margin at the top */
#quote-box {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100px;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: opacity 0.5s ease; /* transition for fade-in effect */
}

/* For the Main quote text */
#quote-text {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #333;
  text-align: center;
}


/* To make the Author show on the right-aligned */
#quote-author {
  align-self: flex-end;
  font-size: 1rem;
  color: #777;
  margin-top: 0.5rem;
}

/* CSS for the Button */
.primary-button {
  background-color: #8aa5a0;
  color: white;
  border: none;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease; /* smooth transition for hover when the color changes slightly */
}

.primary-button:hover {
  background-color: #6c8985; /* button color changes slightly on hover */
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
  z-index: 1000;  /* make sure the button for this stays on top */
}

.theme-toggle:hover {
  color: #333;
}


/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* DARK MODE for theme toggle */
body.dark-mode {
  background-color: #1b1a17;
  color: #e4dac8;
}

body.dark-mode .container {
  background-color: #24221e;
  border: 1px solid #393730;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1 {
  color: #c8c0ae;
}

body.dark-mode #quote-text {
  color: #f0e6d2;
}

body.dark-mode #quote-author {
  color: #a79c86;
}

body.dark-mode .primary-button {
  background-color: #5d6b65;
  color: #fefefe;
}

body.dark-mode .primary-button:hover {
  background-color: #7c8c86;
}

body.dark-mode .theme-toggle {
  color: #d2c8b5;
}

/* CSS styling for the Favorite button */
.favorite-button {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999; /* star outline color */
  transition: color 0.3s ease; /* adding a transition for color change */
}

.favorite-button:hover {
  transform: scale(1.2);
  color: goldenrod; /* star outline glows */
}

/* When the quote is favorited */
.favorite-button.favorited {
 color: gold;  /* The star lights up */
}
