/* book-detail.css — детальный просмотр книги */
#bookDetail {
    background: var(--bg-page);
    border-radius: 1.5rem;
    box-shadow: 0 0.75rem 1.875rem rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    margin: 2rem auto;
    max-width: 81.25rem;
    transition: all var(--transition);
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

.book-detail-cover {
    width: 100%;
    height: 16.25rem;
    mask-image: linear-gradient(to bottom, black 60%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
}

.book-detail-layout {
    display: flex;
    gap: 2rem;
    padding: 0 2rem 2rem 2rem;
    margin-top: -2.5rem;
    position: relative;
    background: transparent;
}

.book-detail-img {
    width: 12.5rem;
    min-width: 12.5rem;
    height: 17.5rem;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
    background: var(--bg-surface);
}

.book-detail-info {
    flex: 1;
    background: var(--bg-card);
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

.book-detail-info h1 {
    font-size: 2.2rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.book-detail-info p {
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.book-detail-info h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-muted);
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background: transparent;
    border-radius: 0;
}

.stats-list li {
    background: var(--bg-soft);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-list li p {
    color: var(--text-light);
    margin-bottom: 0;
}

.stats-list li strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.progress-bar-bg {
    background: var(--border);
    border-radius: 1.25rem;
    height: 0.5rem;
    width: 100%;
    margin: 0.5rem 0 0.25rem;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--accent);
    height: 100%;
    width: 0%;
    border-radius: 1.25rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 1rem;
    background: var(--bg-soft);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.details-grid div {
    font-size: 0.85rem;
}

.details-grid div strong {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.additional-info {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-soft);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.additional-info li {
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: 3.125rem;
}

.meta-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.meta-footer div {
    flex: 1;
    font-size: 0.85rem;
}

.meta-footer div strong {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.back-button {
    margin: 1.25rem 2rem 2rem auto;
    display: block;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 2.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.back-button:hover {
    background: var(--accent-hover);
}

.book-detail-back {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.book-detail-back:hover {
    background: rgba(0, 0, 0, 0.8);
}

.edit-content-btn,
.edit-meta-btn {
    display: none;
}

.edit-content-btn.owner-only,
.edit-meta-btn.owner-only {
    display: block;
    box-shadow: 0.1875rem 0.1875rem 0 var(--accent-hover);
    background-color: var(--glow);
}

.detail-left-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}
.detail-cover-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s;
    background: var(--accent);
    color: var(--text-primary);
    box-shadow: 3px 3px 0 var(--accent-hover);
}

.read-btn {
    background: var(--accent);
    color: var(--text-primary);
    box-shadow: 3px 3px 0 var(--accent-hover);
}

.detail-btn:hover  { transform: translateY(-1px); }
.detail-btn:active { transform: translateY(1px);  }

