@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap');

* {
  box-sizing: border-box;
  outline: none;
}

body {
  background-color:purple ;
  
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 3rem;
}

.add {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color:goldenrod;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.add:active {
  transform: scale(0.98);
}

.note {
  background-color: #fff;
  box-shadow: 0 0 10px 4px rgba(0, 0, 0, 0.1);
  margin: 30px 20px;
  height: 350px;
  width: 350px;
  overflow-y: scroll;
}

.note .tools {
  background-color:goldenrod;
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem;
}

.note .tools button {
  background-color: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.note textarea {
  outline: none;
  font-family: inherit;
  font-size: 1.2rem;
  border: none;
  height: 400px;
  width: 100%;
  padding: 20px;
}

.main {
  padding: 20px;
}

.hidden {
  display: none;
}
#search {
  position: fixed;
  top: 1rem; 
  left: 13%;
  transform: translateX(-50%); 
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color:white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background-color:goldenrod;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  width: 80%; /* Adjust width as needed */
  max-width: 350px; /* Maximum width to prevent stretching too wide */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000; /* Ensure it stays above other content */
}

#search:focus {
 box-shadow: 0 0 7px white;
  outline: none;
}

body.dark-mode {
  background-color: #2c3e50;
  color: #ecf0f1;
}

body.dark-mode .note {
  background-color: #34495e;
  color: #ecf0f1;
}

body.dark-mode .add {
  background-color: goldenrod;
}

#toggle-theme {
  position: fixed;
  bottom: 1rem; /* Distance from the bottom of the viewport */
  left: 1rem; /* Distance from the left of the viewport */
  background-color:goldenrod; /* Example background color */
  color: #fff; /* Text color */
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000; /* Ensure it stays above other content */
  transition: background-color 0.3s, box-shadow 0.3s;
}

#toggle-theme:hover {
  background-color: #8e44ad; /* Darker shade on hover */
}

#toggle-theme:active {
  transform: scale(0.98); /* Slight scale effect when clicked */
}


.note {
  transition: transform 0.3s, box-shadow 0.3s;
}

.note:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
textarea, .main {
  transition: opacity 0.3s, visibility 0.3s;
}
@media (max-width: 768px) {
  .note {
    width: 90%;
    height: auto;
    margin: 20px auto;
  }
}

@media (max-width: 480px) {
  .note {
    width: 100%;
  }
}

/* Webkit-based browsers (Chrome, Safari) */
.note::-webkit-scrollbar {
  width: 8px;
}

.note::-webkit-scrollbar-thumb {
  background-color: #9b59b6;
  border-radius: 10px;
}

.note::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Firefox */
.note {
  scrollbar-width: thin;
  scrollbar-color: #9b59b6 #f1f1f1;
}

#developer-credit {
  position: fixed;
  bottom: 0.5rem;
  left: 80rem;
  font-family: 'Arial', sans-serif;
  font-size: 0.7rem;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  z-index: 1000;
}
