body {font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}

.home-link {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
}

.book-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.book-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #ddd; display: flex; align-items: center; justify-content: center;
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-title {
    font-size: 2.2em;
    color: #2c3e50;
    font-weight: 700;
}

.book-description {
    text-indent: 2em each-line;
    background: white;
    padding: 18px;
    border-radius: 10px;
    flex-grow: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.book-description h3 {
    text-decoration: none;
    text-indent: 0;
    margin-bottom: 4px;
}

.book-tags {
    background: white;
    padding: 10px 10px 10px 18px;
    border-radius: 10px;
    color: #3498db;
    flex-grow: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 18px;
    align-content: center;
}

.read-button {
    align-self: start;
    padding: 12px 35px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.read-button:hover {
    background: #34495e;
}

.reco-modal-input {
    width: 52px;
    text-align: center;
    line-height: 36px;
    font-size: 1.1em;
    font-weight: bold;
    background: #f9f9f9;
    border-right: 1px solid #ccc;
}

.reco-modal-btn {
    width: 28px; height: 18px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 0.65em;
    line-height: 1;
}

.chapter-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.volume-group {
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.volume-header {
    background-color: #dfe6e9;
    color: #2d3436;
    padding: 12px 25px;
    font-size: 1.25em;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #2c3e50;
    transition: background-color 0.2s;
}
.volume-header:hover {
    background-color: #d1d8dd;
}
.volume-header::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #2d3436;
    border-bottom: 2px solid #2d3436;
    transform: rotate(45deg); /* 向下箭头 */
    transition: transform 0.3s ease;
    margin-left: 10px;
}
.volume-header.is-collapsed::after {
    transform: rotate(-45deg); /* 向右箭头 */
}

.volume-chapters {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    display: grid; 
}
.volume-chapters.collapsed {
    display: none;
}

.chapter-item {
    background: white;
    padding: 15px 20px;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    border: 1px solid #eee;
}
.chapter-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: white;
    border-color: #ddd;
}
.chapter-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    width: 100%;
}

.modal-actions {
    flex-direction: row;
    align-items: center; 
}

@media (max-width: 768px) {
    .book-container {grid-template-columns: 1fr;}
    .book-title {font-size: 1.8em;}
    .book-cover {max-width: 300px; margin: 0 auto;}
    .volume-chapters {grid-template-columns: 1fr;}
}

@media (max-width: 480px) {
    .top-bar-detail {padding: 10px 15px;}
    .book-description {padding: 15px;}
    .chapter-item {padding: 12px 20px;}
    .volume-chapters {grid-template-columns: 1fr;}
    .volume-header {font-size: 1.1em;}
}

/* ---- 评分系统 ---- */
.book-rating-area {
    background: white;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 5星展示（平均分） */
.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars-track {
    position: relative;
    display: inline-block;
    font-size: 1.4em;
    color: #ddd;
    letter-spacing: 2px;
    line-height: 1;
}
.stars-track::before { content: '★★★★★'; }

.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f39c12;
}
.stars-fill::before { content: '★★★★★'; }

.rating-text {
    font-size: 1.0em;
    color: #444;
    font-weight: 600;
}
.rating-sub { color: #aaa; font-size: 0.85em; }

/* 10星点击选择器 */
.rating-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rating-label { font-size: 0.9em; color: #555; }

.stars-input { display: flex; gap: 3px; cursor: pointer; }
.star-input-item {
    font-size: 1.5em;
    color: #ddd;
    transition: color 0.1s, transform 0.1s;
    user-select: none;
    line-height: 1;
}
.star-input-item.star-selected { color: #f39c12; }
.star-input-item.star-hover { color: #f1c40f; transform: scale(1.15); }

.rating-user-hint { font-size: 0.82em; color: #888; }

@media (max-width: 480px) {
    .stars-input { gap: 2px; }
    .star-input-item { font-size: 1.3em; }
}