/* General page styling */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f8f3e9;
  color: #382b24;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(135deg, #5b3526, #8b4d35);
  color: #fff8ed;
  text-align: center;
  padding: 45px 20px;
  border-bottom: 6px solid #d49a55;
}

header h1 {
  margin: 0;
  font-size: 2.8rem;
  letter-spacing: 1px;
}

header p {
  margin: 10px 0 0;
  font-size: 1.1rem;
  color: #f4dfc3;
}

/* Main content */
main {
  width: 95%;
  max-width: 1500px;
  margin: 35px auto;
}

section {
  margin-bottom: 40px;
}

h2 {
  color: #713e2c;
  font-size: 1.8rem;
  border-bottom: 2px solid #d49a55;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Inventory table */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fffdf8;
  border: 1px solid #dfcdb8;
  box-shadow: 0 5px 18px rgba(56, 43, 36, 0.08);
}

thead {
  background-color: #633d2e;
  color: #fff8ed;
}

th {
  padding: 16px 12px;
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

td {
  padding: 15px 12px;
  border-bottom: 1px solid #e8dccb;
  vertical-align: top;
  font-size: 0.92rem;
}

/* Alternating row colors */
tbody tr:nth-child(even) {
  background-color: #f7efe2;
}

tbody tr:hover {
  background-color: #f0dfc7;
  transition: background-color 0.2s ease;
}

/* Book titles */
tbody td:first-child {
  color: #713e2c;
  font-weight: bold;
  min-width: 145px;
}

/* Status badges */
.status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 20px;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

.read .status {
  background-color: #dcebd7;
  color: #285c32;
}

.in-progress .status {
  background-color: #fbe5b5;
  color: #79520b;
}

.to-read .status {
  background-color: #dce8f7;
  color: #254f80;
}

/* Rating indicators */
.rate {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.rate span {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #c58b48;
  border-radius: 50%;
  background-color: transparent;
}

/* Filled rating dots */
.rate.two span:nth-child(-n+2),
.rate.three span:nth-child(-n+3) {
  background-color: #c58b48;
}

/* Reflection section */
.reflection {
  background-color: #fffdf8;
  border-left: 5px solid #a85f3b;
  padding: 25px 30px;
  box-shadow: 0 4px 14px rgba(56, 43, 36, 0.06);
}

.reflection h2 {
  margin-top: 0;
}

.reflection p {
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.reflection p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background-color: #382b24;
  color: #f4dfc3;
  text-align: center;
  padding: 20px;
  margin-top: 45px;
}

footer p {
  margin: 0;
  font-style: italic;
}

/* Responsive design */
@media (max-width: 1000px) {
  main {
    width: 96%;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 10px 8px;
  }

  header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 700px) {
  main {
    width: 94%;
  }

  header {
    padding: 32px 15px;
  }

  header h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Allow horizontal scrolling rather than crushing table columns */
  section:first-child {
    overflow-x: auto;
  }

  table {
    min-width: 1100px;
  }

  .reflection {
    padding: 20px;
  }
}

