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

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f3ee;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #563d7c;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-image: url('../images/background.png'); /* Adjust path as needed */
    background-size: cover; /* Covers the entire viewport */
    background-attachment: fixed; /* Keeps image fixed during scroll */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents image from repeating */
}


/* Make sure content remains readable over the background */
.container {
    background-color: rgba(245, 243, 238, 0.85); /* Semi-transparent version of your current background */
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


/* Librarian layout */
.librarian-container {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.librarian-image {
    width: 30%;
    padding-right: 20px;
}

.placeholder-image {
    height: 200px;
    background-color: #ddd;
    border-radius: 10px;
}

.librarian-speech {
    width: 70%;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.librarian-speech:before {
    content: '';
    position: absolute;
    left: -10px;
    top: 30px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.librarian-speech p {
    margin-bottom: 1em;
}


/* Quiz form styling */
.quiz-form {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.options-container {
    margin-bottom: 20px;
}

.option {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option:hover {
    background-color: #f9f9f9;
}

.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option label {
    display: block;
    padding: 15px 15px 15px 45px;
    cursor: pointer;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.option label:before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 1px solid #563d7c;
    border-radius: 50%;
    background-color: white;
}

.option input[type="radio"]:checked + label {
    background-color: #f0ebf7;
}

.option input[type="radio"]:checked + label:before {
    background-color: #563d7c;
    box-shadow: inset 0 0 0 4px white;
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #563d7c;
    color: white;
}

.btn-primary:hover {
    background-color: #472d6b;
}

.btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background-color: #dde2e6;
}

.form-actions {
    text-align: center;
}

/* Recommendations styling */
.books-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.book-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.book-match {
    margin: 15px 0;
    font-weight: bold;
    color: #563d7c;
}

.actions {
    text-align: center;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .librarian-container {
        flex-direction: column;
    }
    
    .librarian-image, 
    .librarian-speech {
        width: 100%;
    }
    
    .librarian-image {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .librarian-speech:before {
        display: none;
    }
}

/* Score table styling */
.match-details {
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.match-details h4 {
    margin-bottom: 10px;
    color: #563d7c;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.score-table th, 
.score-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.score-table th {
    background-color: #f0ebf7;
    color: #563d7c;
}

.score-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.score-table tr:hover {
    background-color: #eee;
}

/* Add to your styles.css */
.book-details {
  display: flex;
  margin-bottom: 20px;
}

.book-cover {
  margin-right: 20px;
}

.thumbnail {
  max-width: 120px;
  max-height: 180px;
  object-fit: contain;
}

.no-cover {
  width: 120px;
  height: 180px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.buy-button {
  display: inline-block;
  background-color: #5D4777;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 10px;
  font-weight: bold;
}

.buy-button:hover {
  background-color: #483458;
}

footer {
    text-align: center;
}