* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Times New Roman', Times, serif;
  background-color: #FFF8E7;
  color: #2c2c2c;
  line-height: 1.6;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid #8B7355;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2em;
  color: #5D4E37;
}

header a {
  color: #5D4E37;
  text-decoration: none;
  font-size: 1.1em;
  transition: color 0.3s ease;
}

header a:hover {
  color: #8B7355;
}

.user-menu {
  display: flex;
  gap: 20px;
  align-items: center;
}

.language-toggle {
  background-color: transparent;
  color: #5D4E37;
  border: 2px solid #5D4E37;
  padding: 5px 15px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.9em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 20px;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.language-toggle:hover {
  background-color: #5D4E37;
  color: #FFF8E7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.button, button, input[type="submit"] {
  background-color: #5D4E37;
  color: #FFF8E7;
  border: none;
  padding: 12px 24px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 5px;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button:hover, button:hover, input[type="submit"]:hover {
  background-color: #8B7355;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.button-secondary {
  background-color: #A0826D;
}

.button-secondary:hover {
  background-color: #B8956A;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1em;
  border: 2px solid #D4C5B9;
  background-color: #FFFEF9;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #8B7355;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

.error {
  color: #c00;
  background-color: #ffe6e6;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #c00;
  border-radius: 10px;
}

.success {
  color: #060;
  background-color: #e6ffe6;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #060;
  border-radius: 10px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.book-card {
  text-align: center;
  padding: 15px;
  background-color: #FFFEF9;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.book-card img {
  max-width: 100%;
  height: auto;
  max-height: 300px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  margin-bottom: 15px;
  border-radius: 8px;
}

.book-card h3 {
  font-size: 1.1em;
  margin: 10px 0 5px 0;
}

.book-card p {
  font-size: 0.9em;
  color: #666;
}

.rating {
  font-size: 1.5em;
  margin: 10px 0;
  color: #f39c12;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0;
}

.star {
  font-size: 1.5em;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s ease, transform 0.1s ease;
}

.star:hover {
  transform: scale(1.2);
}

.star.filled {
  color: #f39c12;
}

.notes-section {
  margin-top: 15px;
  width: 100%;
}

.notes-editor {
  margin-top: 10px;
  text-align: left;
}

.notes-input {
  width: 100%;
  padding: 10px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.9em;
  border: 2px solid #D4C5B9;
  background-color: #FFFEF9;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: 10px;
}

.notes-input:focus {
  outline: none;
  border-color: #8B7355;
}

.notes-display {
  text-align: left;
  margin-top: 10px;
}

.notes-toggle {
  width: 100%;
}

.home-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 400px;
  margin: 50px auto;
}

.home-options .button {
  width: 100%;
  text-align: center;
  padding: 20px;
  font-size: 1.2em;
}

.search-results {
  margin-top: 30px;
}

.result-item {
  border: 2px solid #D4C5B9;
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  gap: 20px;
  background-color: #FFFEF9;
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.result-item:hover {
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.result-item img {
  max-width: 100px;
  height: auto;
}

.result-info {
  flex: 1;
}

.note {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

/* Review page styles */
.review-container {
  max-width: 900px;
  margin: 0 auto;
}

.review-header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 2px solid #D4C5B9;
  margin-bottom: 40px;
}

.review-header h2 {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: #5D4E37;
}

.review-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.book-cover-section {
  text-align: center;
}

.review-details {
  background-color: #FFFEF9;
  padding: 30px;
  border-radius: 15px;
  border: 2px solid #D4C5B9;
}

.star-rating-large {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.star-large {
  font-size: 3em;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s ease;
}

.star-large:hover {
  color: #f39c12;
}

@media (max-width: 768px) {
  .review-content {
    grid-template-columns: 1fr;
  }
  
  .book-cover-section img,
  .book-cover-section > div {
    max-width: 200px !important;
    width: 200px !important;
    height: 300px !important;
  }
}
