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

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

.header {
    display: flex;
    height: 80px;
    background-color: #2c3e50;
    justify-content: center;
    align-items: center;
}

.title {
    font-size: 36px;
    font-weight: bold;
    color: white;
}

.container {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background-color: #f5f6fa;
    padding: 20px;
    border-right: 1px solid #dcdde1;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.past-recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.recommendations-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.book-recommendation {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-header {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.book-cover {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
}

.book-info {
    flex: 1;
}

.book-title {
    margin-bottom: 10px;
}

.book-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2em;
}

.book-link:hover {
    text-decoration: underline;
}

.book-description {
    color: #2c3e50;
    line-height: 1.6;
}

.user-input {
    padding: 20px;
    background-color: #f5f6fa;
    border-top: 1px solid #dcdde1;
}

#book-request-form {
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

#user-prompt {
    flex: 1;
    padding: 12px;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 12px 24px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #34495e;
}

/* Loading indicator styles */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(41, 128, 185, 0.25); /* light blue ring */
    border-top-color: #2980b9; /* blue accent */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    font-size: 0.95rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}