body{
    background-color: #fcfca5;
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    justify-content: center;
    text-align: center;
    display: flex;
    align-items: flex-start; /* start at top and better if results are long */
}
h1, h2 {
    font-weight: 600;  /* thicker  */
}
p {
    font-weight: 400;  /* normal text */
}

.logo{
    display: block;
    margin: 0 auto 20px;   /* center and add spacing below */
    /* width: 500px;          control size */
    height: auto;       /*keeps proportions*/
    max-width: 150px;
}
.container{
    background-color: #fbebe9;
    width: 60%;
    max-width: 800px;
    /* min-height: 500px; */
    text-align: center;
    border-radius: 30px;
    box-sizing: border-box;
    padding: 30px;      /* ensure spacing inside */
    margin: 20px auto;  /* spacing around container */
    height: auto;       /* container grows with results */
    max-height: none;   /* no artificial cutoff */
}

#result {
    margin-top: 20px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    font-size: 15px;
    line-height: 1.6;
    background: #fff;
    border-radius: 15px;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
}
#result h4 {
    margin-top: 15px;
    color: #d6336c;
}
.anto{
    color: green;
}
.syno{
    color: red;
}
.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.search-bar input {
    padding: 12px 15px;
    width: 250px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
}


.search-bar button {
    padding: 12px 18px;
    font-size: 16px;
    border: none;
    background: #ff8fa3;
    /* color: white; */
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.search-bar button:hover {
    background: #ff4d6d;
    transform: scale(1.05);
}

.search-bar button:active {
    transform: scale(0.95);
}
.wotd-card {
  background: #fff;
  padding: 20px;
  margin: 20px auto;
  border-radius: 20px;
  /* box-shadow: 0 4px 15px rgba(0,0,0,0.1); */
  width: 80%;
  max-width: 600px;
  text-align: center;
  font-family: 'Poppins', Arial, sans-serif;
  transition: transform 0.3s ease;
}

.wotd-card:hover {
  transform: scale(1.02);
}

.wotd-card h2 {
  color: #ff4d6d;
  margin-bottom: 10px;
}

.wotd-card p {
  font-size: 16px;
  line-height: 1.6;
}
.wotd-word {
  font-size: 20px;
  color: #222;
  margin-bottom: 10px;
}

.wotd-definition {
  font-size: 16px;
  color: #444;
  margin: 5px 0;
}

.wotd-example {
  font-size: 15px;
  color: #555;
  font-style: italic;
  background: #f9f9f9;
  padding: 8px;
  border-radius: 8px;
}
.sound-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #ff4d6d;
  transition: transform 0.2s ease;
}

.sound-btn:hover {
  transform: scale(1.2);
  color: #d6336c;
}

#history {
  position: absolute; /* Place it freely on page */
  top: 20px;          /* Distance from top */
  left: 20px;         /* Distance from left */
  background-color: #fff6f6;
  border: 2px solid #f08080;
  border-radius: 10px;
  padding: 15px;
  width: 200px;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#history h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #ff4d6d;
}

#historyList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #ffffff;
  transition: background 0.2s;
}

.history-item:hover {
  background: #e5bebe;
}

#clearHistoryBtn {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 14px;
  background: #ff8fa3;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease;
}

#clearHistoryBtn:hover {
  background: #ff4d6d;
}

#favorites {
  position: absolute; /* free placement */
  top: 20px;          /* distance from top */
  right: 20px;        /* stick to right side */
  background-color: #fff6f6;
  border: 2px solid #f08080;
  border-radius: 10px;
  padding: 15px;
  width: 200px;
  font-family: Arial, sans-serif;
  /* box-shadow: 0 4px 6px rgba(0,0,0,0.1); */
}

#favorites h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #ff4d6d;
}

#favoritesList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.favorite-item {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #ffffff;
  transition: background 0.2s;
}

.favorite-item:hover {
  background: #e5bebe;
}

#clearFavoritesBtn {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 14px;
  background: #ff8fa3;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease;
}

#clearFavoritesBtn:hover {
  background: #ff4d6d;
}
