:root {
  --cream: #F5E6D3;
  --dark-coffee: #3E2723;
  --medium-roast: #6F4E37;
  --latte-foam: #D7CCC8;
  --espresso: #2C1810;
  --light-cream: #FAF0E6;
  --warning-color: #FF9800;
}

/* Payment Overlay Styles */
.payment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.payment-modal {
  background: var(--cream);
  border-radius: 15px;
  padding: 0;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

.payment-content {
  padding: 30px;
  text-align: center;
}

.payment-content h2 {
  color: var(--dark-coffee);
  margin-bottom: 15px;
  font-size: 24px;
}

.payment-content p {
  color: var(--medium-roast);
  margin-bottom: 15px;
  line-height: 1.6;
}

.payment-buttons {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}

.payment-btn {
  background: var(--medium-roast);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.payment-btn:hover {
  background: var(--dark-coffee);
  transform: translateY(-2px);
}

.payment-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}


@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

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

/* Content section styles */
.how-it-works, .benefits {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.step, .benefit {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.step h3, .benefit h3 {
  color: var(--medium-roast);
  margin-bottom: 10px;
  font-size: 18px;
}

.step p, .benefit p {
  color: var(--dark-coffee);
  line-height: 1.6;
  margin: 0;
}

.faq .faq-item {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--latte-foam);
  padding-bottom: 15px;
}

.faq .faq-item:last-child {
  border-bottom: none;
}

.faq h3 {
  color: var(--medium-roast);
  margin-bottom: 8px;
  font-size: 16px;
}

.faq p {
  color: var(--dark-coffee);
  line-height: 1.6;
  margin: 0;
}

.form-group small {
  display: block;
  color: var(--medium-roast);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .how-it-works, .benefits {
    flex-direction: column;
    gap: 15px;
  }
  
  .step, .benefit {
    min-width: unset;
  }
}

/* Warning notification style */
.warning {
  background: #fff3e0;
  color: #e65100;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  border-left: 4px solid #e65100;
  opacity: 0;
  animation: fadeInOut 5s ease-in-out forwards;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Georgia', serif;
  background-color: var(--cream);
  color: var(--espresso);
  line-height: 1.6;
  min-height: 100vh;
}

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

h1 {
  text-align: center;
  color: var(--dark-coffee);
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: normal;
}

.title-name {
  margin-bottom: 20px;
}

.subtitle {
  text-align: center;
  color: var(--medium-roast);
  font-size: 1.2rem;
  font-style: italic;
  margin: -20px auto 30px;
  max-width: 600px;
  line-height: 1.4;
}

.card {
  background: var(--light-cream);
  border: 1px solid var(--latte-foam);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(62, 39, 35, 0.1);
}

.card h2 {
  color: var(--medium-roast);
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--latte-foam);
  padding-bottom: 10px;
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--dark-coffee);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--latte-foam);
  border-radius: 4px;
  font-size: 16px;
  background: white;
  color: var(--espresso);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--medium-roast);
}

button {
  background: var(--medium-roast);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s;
}

button:hover {
  background: var(--dark-coffee);
}

button:disabled {
  background: var(--latte-foam);
  cursor: not-allowed;
}

.books-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.book-item {
  background: white;
  border: 1px solid var(--latte-foam);
  border-radius: 6px;
  padding: 15px;
}

.book-title {
  font-weight: bold;
  color: var(--dark-coffee);
  margin-bottom: 5px;
}

.book-author {
  color: var(--medium-roast);
  font-style: italic;
  margin-bottom: 8px;
}

.book-rating {
  color: var(--espresso);
  font-size: 0.9em;
}

.library-stats {
  background: var(--light-cream);
  border: 1px solid var(--latte-foam);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.library-stats h3 {
  color: var(--dark-coffee);
  margin-bottom: 15px;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--latte-foam);
  padding-bottom: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
}

.stat-item.last-book {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--latte-foam);
}

.stat-label {
  font-weight: bold;
  color: var(--medium-roast);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dark-coffee);
}

.last-book-info {
  margin-top: 5px;
  line-height: 1.4;
}

.book-title {
  font-weight: bold;
  color: var(--dark-coffee);
}

.book-author {
  color: var(--medium-roast);
  font-style: italic;
  margin-left: 8px;
}

.book-rating {
  color: var(--espresso);
  margin-left: 8px;
}

.recommendation {
  background: var(--light-cream);
  border-left: 4px solid var(--medium-roast);
  padding: 20px;
  margin: 20px 0;
}

.recommendation-title {
  color: var(--dark-coffee);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.recommendation-reason {
  color: var(--espresso);
  font-style: italic;
  margin-bottom: 15px;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-approve {
  background: #4CAF50;
}

.btn-approve:hover {
  background: #45a049;
}

.btn-reject {
  background: #f44336;
}

.btn-reject:hover {
  background: #da190b;
}

.btn-approve.selected {
  background: #4CAF50;
  border: 3px solid #2e7d32;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
  transform: scale(0.98);
}

.btn-reject.selected {
  background: #f44336;
  border: 3px solid #c62828;
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
  transform: scale(0.98);
}

.btn-approve:disabled,
.btn-reject:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-approve.selected:disabled {
  opacity: 1;
  background: #4CAF50;
  border: 3px solid #2e7d32;
}

.btn-reject.selected:disabled {
  opacity: 1;
  background: #f44336;
  border: 3px solid #c62828;
}

.feedback-form {
  margin-top: 20px;
  padding: 15px;
  background: var(--cream);
  border-radius: 4px;
}

.feedback-submitted {
  background: var(--latte-foam);
  opacity: 0.8;
}

.feedback-submitted textarea {
  background: transparent;
  border: 1px solid var(--latte-foam);
  color: var(--espresso);
  resize: none;
}

.feedback-submitted button {
  display: none;
}

.feedback-summary {
  font-style: italic;
  color: var(--medium-roast);
  margin-top: 10px;
  padding: 8px;
  background: var(--latte-foam);
  border-radius: 4px;
  border-left: 3px solid var(--medium-roast);
}

.hidden {
  display: none;
}

.loading {
  text-align: center;
  padding: 20px;
  color: var(--medium-roast);
  font-style: italic;
}

.fullscreen-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(245, 230, 211, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--latte-foam);
  border-top: 4px solid var(--medium-roast);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: var(--dark-coffee);
  font-size: 18px;
  font-weight: bold;
}

.rotating-text {
  transition: opacity 0.3s ease-in-out;
}

.loading-subtext {
  color: var(--medium-roast);
  font-size: 14px;
  margin-top: 5px;
  font-style: italic;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error {
  background: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 4px;
  margin: 10px 0;
  border-left: 4px solid #c62828;
}

.notification-container {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 1000;
  max-width: 350px;
}

.success {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  border-left: 4px solid #2e7d32;
  opacity: 0;
  animation: fadeInOut 5s ease-in-out forwards;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error {
  background: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  border-left: 4px solid #c62828;
  opacity: 0;
  animation: fadeInOut 5s ease-in-out forwards;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  10%,
  90% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}