/* ========================================
   Msyark 电子课本 - 自定义样式
   ©2026 Msyark Studio
   ======================================== */

/* --- 课本条目双按钮布局 --- */
.book-item {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.book-item .book-btn {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 0;
}

/* 新标签页打开按钮 */
.book-btn-new-tab {
    flex-shrink: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 111, 165, 0.25);
    border: 1px solid rgba(74, 111, 165, 0.4);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: #a8c4e6;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.25s ease;
    padding: 0;
    margin: 0;
}

.book-btn-new-tab:hover {
    background: rgba(74, 111, 165, 0.5);
    color: #ffffff;
    transform: none;
    box-shadow: -2px 0 8px rgba(74, 111, 165, 0.25);
}

.book-btn-new-tab:active {
    transform: scale(0.95);
    background: rgba(74, 111, 165, 0.6);
}

/* 测试版新标签按钮 */
.book-btn-new-tab.testing {
    background: rgba(240, 173, 78, 0.2);
    border-color: rgba(240, 173, 78, 0.4);
    color: #f0c878;
}

.book-btn-new-tab.testing:hover {
    background: rgba(240, 173, 78, 0.45);
    color: #ffffff;
    box-shadow: -2px 0 8px rgba(240, 173, 78, 0.3);
}

/* 对不可用的课本，隐藏新标签按钮占位（book-item内只有一个按钮时正常显示） */
.book-item:has(.status-unavailable) .book-btn,
.book-item:has(.status-new) .book-btn {
    border-radius: 10px;
}

/* --- 模态框动画 --- */
.modal-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-mask.show {
    opacity: 1;
}

/* --- 全屏过渡 --- */
.fullscreen-transition {
    transition: all 0.35s ease;
}

/* --- 评分星星交互 --- */
.star-icon {
    font-size: 2.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-icon:hover {
    transform: scale(1.2);
}

/* --- 响应式 --- */
@media (max-width: 576px) {
    .book-btn-new-tab {
        width: 40px;
        font-size: 0.85rem;
        border-radius: 0 8px 8px 0;
    }
}