body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
}

.search {
    display: flex;
    margin-bottom: 20px;
}

.search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search button {
    padding: 10px 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search button:hover {
    background: #0056b3;
}

.autocomplete-suggestions {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 10;
}

.autocomplete-suggestions div {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-suggestions div:hover {
    background: #f0f0f0;
}

.book {
    margin-top: 20px;
}

.book img {
    max-width: 100px;
    margin-right: 20px;
    float: left;
}

.rating {
    display: flex;
    gap: 4px;
    margin-top: 5px;
    justify-content: center;
}

.rating .star {
    font-size: 18px;
    color: #ccc;
}

.rating span {
    cursor: pointer;
    font-size: 20px;
}

.rating span:hover,
.rating span.selected {
    color: gold;
}

/* Prevent hover and pointer on read-only stars */
.rating.read-only .star {
    cursor: default;
    pointer-events: none;
}

/* Prevent color change on hover for read-only */
.rating.read-only .star:hover {
    color: inherit;
}

.rating .star.selected {
    color: #aa8e39;
}

textarea {
    width: 100%;
    height: 100px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
}

button.submit {
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button.submit:hover {
    background: #218838;
}

.add-book-form {
    margin-top: 20px;
    display: block;
}

.add-book-form input,
.add-book-form button {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.add-book-form label {
    display: block;
    margin: 10px 0 5px;
}

.add-book-form .radio-group {
    display: flex;
    gap: 10px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.book-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
}
.book-card img {
    max-width: 100%;
    border-radius: 4px;
}
.book-card h3 {
    font-size: 16px;
    margin: 10px 0;
}

.header {
    display: flex;
    justify-content: center;  /* Center content horizontally */
    align-items: center;      /* Align items vertically */
    position: relative;       /* Needed for absolute positioning */
    padding: 10px 0;
}

.site-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Center it exactly */
    margin: 0;
}

.user-info {
    position: absolute;
    right: 10px;  /* Position the user info on the right */
    font-size: 14px;
    color: #333;
}

.user-info a {
    color: #007bff;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: underline;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}
.filters label {
    font-weight: bold;
}

.filters select {
    padding: 6px;
    border-radius: 4px;
    min-width: 100px;
}

.year-heading {
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 36px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

.book-year-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 40px;
}

.progress-section {
    margin: 30px 0 20px;
    text-align: center;
}

.progress-label {
    font-size: 18px;
    font-weight: 500;
    color: #2e3c48;
    margin-bottom: 10px;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.3px;
}

.progress-bar-bg {
    position: relative;
    height: 24px;
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.progress-bar-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6a85b6 0%, #bac8e0 100%);
    border-radius: 6px 0 0 6px;
    transition: width 0.6s ease-in-out;
}

.progress-percent {
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
    line-height: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #524f4f;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    opacity: 4;
}