/* ============================================================
 * stele_detail.php 碑帖详情页样式
 * ============================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}
.breadcrumb a { color: #666; transition: color 0.2s; }
.breadcrumb a:hover { color: #4a6741; }
.breadcrumb span { margin: 0 6px; }

/* 碑帖头部 */
.stele-header {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 24px 32px;
    margin-bottom: 20px;
}
.stele-header h1 {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.stele-header .full-name {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}
.stele-header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stele-header .meta .tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: #f5f5f5;
    color: #666;
}
.stele-header .meta .tag.green { background: #e8f4e8; color: #4a6741; }
.stele-header .meta .tag.blue { background: #e8f0fa; color: #3498db; }

/* 主区域 */
.main-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 24px;
}

/* 左侧课时目录 */
.lesson-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}
.lesson-sidebar .sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.lesson-sidebar .sidebar-header h3 {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    padding-left: 10px;
    border-left: 3px solid #4a6741;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lesson-sidebar .sidebar-header h3 .count {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}
.lesson-sidebar .lesson-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.lesson-sidebar .lesson-list::-webkit-scrollbar { width: 6px; }
.lesson-sidebar .lesson-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 3px;
    border: 1px solid transparent;
    position: relative;
}
.lesson-item:hover { background: #f5faf5; }
.lesson-item.active {
    background: #e8f4e8;
    border-color: #4a6741;
}
.lesson-item.done::after {
    content: '✓';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a6741;
    font-weight: bold;
    font-size: 14px;
}
.lesson-item .thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
    flex-shrink: 0;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lesson-item .thumb img {
    width: 150%;
    object-fit: cover;
}
.lesson-item .info { flex: 1; min-width: 0; padding-right: 18px; }
.lesson-item .no {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 2px;
}
.lesson-item.active .no { color: #4a6741; }
.lesson-item .desc {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧课时内容 */
.lesson-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 24px;
    min-height: 620px;
}
.lesson-content .lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.lesson-content .lesson-header h2 {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
    padding-left: 12px;
    border-left: 4px solid #4a6741;
}
.lesson-content .lesson-header .lesson-nav { display: flex; gap: 8px; }
.lesson-content .lesson-header .lesson-nav button {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.lesson-content .lesson-header .lesson-nav button:hover:not(:disabled) {
    border-color: #4a6741;
    color: #4a6741;
}
.lesson-content .lesson-header .lesson-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lesson-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.lesson-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lesson-img-box {
    background: #fafafa;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #f0f0f0;
}
.lesson-img-box img {
    max-width: 100%;
    max-height: 520px;
    margin: 0 auto;
    border-radius: 6px;
    cursor: zoom-in;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.lesson-desc-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top:20px;
}
.lesson-desc-box .lesson-desc {
    margin-top: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.9;
    text-align: left;
    white-space: pre-wrap;
}

.lesson-right {
    min-width: 0;
}
.homework-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 18px;
}

.box-title {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
    padding-left: 10px;
    border-left: 3px solid #4a6741;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hw-status { font-size: 13px; color: #999; font-weight: normal; }
.hw-status.done { color: #4a6741; }
.hw-status.locked { color: #e67e22; }

.hw-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}
.hw-upload-area:hover {
    border-color: #4a6741;
    background: #f5faf5;
}
.hw-upload-area input[type=file] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.hw-preview {
    margin-top: 14px;
    text-align: center;
}
.hw-preview img {
    max-width: 300px;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.hw-actions {
    margin-top: 14px;
    text-align: center;
}
.hw-actions button {
    padding: 10px 32px;
    background: #4a6741;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
.hw-actions button:hover { background: #3d5636; }
.hw-actions button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.hw-submitted { text-align: center; }
.hw-submitted .hw-img-wrap img {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.hw-locked {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
}
.hw-locked-icon { font-size: 48px; margin-bottom: 12px; }
.hw-locked-text { color: #999; font-size: 14px; }

.hw-comment-section {
    margin-top: 20px;
    background: #fdf6e3;
    border: 1px solid #f0d98a;
    border-radius: 10px;
    padding: 16px 20px;
}
.hw-comment-section .box-title {
    color: #b8860b;
    border-left-color: #b8860b;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f0d98a;
}
.hw-comment {
    font-size: 14px;
    color: #555;
    line-height: 1.9;
    white-space: pre-wrap;
}

/* 点评反馈按钮 */
.hw-feedback-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #f0d98a;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hw-fb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #e0c060;
    background: #fff;
    color: #b8860b;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.hw-fb-btn:hover:not(:disabled) {
    background: #fdf6e3;
    border-color: #d4a017;
}
.hw-fb-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.hw-fb-btn.done {
    background: #e8f4e8;
    border-color: #4a6741;
    color: #4a6741;
}
.hw-fb-btn .fb-icon { font-size: 14px; }

.hw-fb-vip {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
    border-color: #d4a017;
    color: #b8860b;
    font-weight: 600;
}
.hw-fb-vip .fb-vip-tag {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

/* 老师选择弹窗 */
#teacherPickerModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 4000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#teacherPickerModal.show { display: flex; }
#teacherPickerModal .tp-panel {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
#teacherPickerModal .tp-title {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 4px;
}
#teacherPickerModal .tp-sub {
    font-size: 13px;
    color: #999;
    margin-bottom: 14px;
}
#teacherPickerModal .tp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}
#teacherPickerModal .tp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
#teacherPickerModal .tp-item:hover {
    border-color: #d4a017;
    background: #fdf6e3;
}
#teacherPickerModal .tp-item.selected {
    border-color: #d4a017;
    background: #fdf6e3;
    box-shadow: 0 0 0 2px rgba(212,160,23,0.2);
}
#teacherPickerModal .tp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}
#teacherPickerModal .tp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#teacherPickerModal .tp-name {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}
#teacherPickerModal .tp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
#teacherPickerModal .tp-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
#teacherPickerModal .tp-cancel {
    background: #f0f0f0;
    color: #666;
}
#teacherPickerModal .tp-cancel:hover { background: #e5e5e5; }
#teacherPickerModal .tp-confirm {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    font-weight: 600;
}
#teacherPickerModal .tp-confirm:hover { opacity: 0.92; }
#teacherPickerModal .tp-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 底部简介 */
.intro-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 32px;
}
.intro-section .section-title {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
    padding-left: 12px;
    border-left: 4px solid #4a6741;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.intro-section .intro-content {
    color: #555;
    font-size: 14px;
    line-height: 1.9;
}

/* 大图 */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.lightbox.show { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}
.lightbox .close-btn {
    position: absolute;
    right: 24px;
    top: 20px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}
.lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 50px;
    height: 80px;
    cursor: pointer;
}
.lightbox .nav-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox .nav-btn.prev { left: 20px; }
.lightbox .nav-btn.next { right: 20px; }
.lightbox .counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 20px;
}

.empty {
    background: #fff;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    color: #bbb;
    font-size: 14px;
}

/* 数字真人对话框 */
#chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: linear-gradient(135deg, #4a6741 0%, #2c3e50 100%);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 6px 20px rgba(74,103,65,0.4);
    transition: transform 0.2s;
    font-family: "STKaiti", "KaiTi", serif;
}
#chat-toggle-btn:hover { transform: scale(1.08); }

#chat-box {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 560px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 999;
    flex-direction: column;
    overflow: hidden;
}
#chat-box.show { display: flex; }

.chat-header {
    background: linear-gradient(135deg, #4a6741 0%, #2c3e50 100%);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    flex-shrink: 0;
}
.chat-header .title { display: flex; align-items: center; gap: 8px; }
.chat-header .avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 14px;
}
.chat-header #chat-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    opacity: 0.8;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    background: #f9f9f9;
}
.chat-system {
    text-align: center;
    color: #bbb;
    font-size: 12px;
    margin-bottom: 12px;
}
.chat-msg { display: flex; margin-bottom: 12px; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.ai { justify-content: flex-start; }
.chat-msg .bubble {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: 14px;
}
.chat-msg.user .bubble {
    background: #4a6741;
    color: #fff;
    border-radius: 12px 12px 0 12px;
}
.chat-msg.ai .bubble {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px 12px 12px 0;
}
.chat-msg .loading { color: #999; font-size: 12px; }

.chat-upgrade {
    background: linear-gradient(135deg, #fdf6e3 0%, #fef9ec 100%);
    border: 1px solid #f0d98a;
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
    text-align: center;
}
.chat-upgrade .upgrade-title {
    font-size: 15px;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 8px;
}
.chat-upgrade .upgrade-desc { font-size: 13px; color: #666; margin-bottom: 8px; }
.chat-upgrade .upgrade-list {
    text-align: left;
    list-style: none;
    font-size: 13px;
    color: #555;
    margin: 10px 0;
    padding-left: 8px;
}
.chat-upgrade .upgrade-list li {
    padding: 4px 0 4px 20px;
    position: relative;
}
.chat-upgrade .upgrade-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #b8860b;
    font-weight: 600;
}
.chat-upgrade .upgrade-btn {
    display: inline-block;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 6px;
    text-decoration: none;
}

.chat-footer {
    border-top: 1px solid #eee;
    padding: 10px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
}
.chat-footer input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
}
.chat-footer input:focus { border-color: #4a6741; }
.chat-footer button {
    background: #4a6741;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}
.chat-footer button:hover { background: #3d5636; }
.chat-footer button:disabled { background: #aaa; cursor: not-allowed; }

.chat-vip-tip {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #fdf6e3 0%, #fef9ec 100%);
    border-top: 1px solid #f0d98a;
    font-size: 12px;
    flex-shrink: 0;
}
.chat-vip-tip a {
    color: #b8860b;
    text-decoration: none;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 992px) {
    .main-content { grid-template-columns: 1fr; }
    .lesson-sidebar {
        position: static;
        max-height: 300px;
    }
    .lesson-row { grid-template-columns: 1fr; }
    .lesson-img-box img { max-height: 500px; }
}
@media (max-width: 768px) {
    .container { padding: 16px; }
    .stele-header { padding: 20px; }
    .stele-header h1 { font-size: 22px; }
    .lesson-content { padding: 16px; }
    .lesson-content .lesson-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .intro-section { padding: 20px; }
    #chat-box { width: 100%; height: 100%; bottom: 0; right: 0; border-radius: 0; }
    #chat-toggle-btn { width: 50px; height: 50px; bottom: 20px; right: 20px; }
}

/* 提交作业全屏遮罩 */
#hwLoadingMask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: wait;
}
#hwLoadingMask.show { display: flex; }
#hwLoadingMask .loading-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 90%;
}
#hwLoadingMask .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e8f4e8;
    border-top-color: #4a6741;
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: hw-spin 0.9s linear infinite;
}
@keyframes hw-spin {
    to { transform: rotate(360deg); }
}
#hwLoadingMask .loading-title {
    font-size: 17px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}
#hwLoadingMask .loading-sub {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
}

/* 学习成员 */
.study-members-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 16px 18px;
    margin: 24px 0;
}
.study-members-section .section-title {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
    padding-left: 12px;
    border-left: 4px solid #4a6741;
    margin-bottom: 18px;
    letter-spacing: 1px;
}
.study-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.study-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: transparent;
    border: none;
    transition: transform 0.2s;
    cursor: default;
}
.study-member:hover { transform: translateY(-2px); }
.study-member .sm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #4a6741;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.study-member .sm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.study-member .sm-count {
    font-size: 12px;
    color: #999;
    text-align: center;
    white-space: nowrap;
}
.study-members-empty {
    color: #bbb;
    font-size: 14px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.study-share-btn {
    display: inline-block;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff !important;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(184,134,11,0.25);
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}
.study-share-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ============================================================
   本课精临之星
   ============================================================ */
.lesson-star-section {
    background: linear-gradient(135deg, #f4faf4 0%, #f8fcf8 100%);
    border: 1px solid #cfe3d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.lesson-star-section .ls-title {
    font-size: 14px;
    color: #4a6741;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.lesson-star-section .ls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* 基础卡片（默认 = 普通会员：深绿系） */
.ls-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #cfe3d0;
    border-radius: 30px;
    padding: 5px 14px 5px 5px;
    box-shadow: 0 2px 6px rgba(74,103,65,0.08);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
}
.ls-item:hover {
    transform: translateY(-1px);
    border-color: #4a6741;
    box-shadow: 0 4px 10px rgba(74,103,65,0.18);
}
.ls-item .ls-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: #4a6741;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
}
.ls-item .ls-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ls-item .ls-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.ls-item .ls-name {
    font-size: 12px;
    color: #2c3e50;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ls-item .ls-score {
    font-size: 12px;
    color: #4a6741;
    font-weight: 600;
}

/* 授课老师：金色系 */
.ls-item.ls-teacher {
    background: linear-gradient(135deg, #fdf6e3 0%, #fef9ec 100%);
    border: 1px solid #e6c76a;
    box-shadow: 0 2px 6px rgba(184,134,11,0.12);
}
.ls-item.ls-teacher:hover {
    border-color: #d4a017;
    box-shadow: 0 4px 12px rgba(184,134,11,0.28);
}
.ls-item.ls-teacher .ls-avatar {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e6c76a;
}
.ls-item.ls-teacher .ls-avatar .ls-crown {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(184,134,11,0.45);
}
.ls-item.ls-teacher .ls-name {
    color: #8a6d1b;
}
.ls-item.ls-teacher .ls-score {
    color: #b8860b;
}

/* 「师」标签（金色） */
.ls-teacher-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 0 7px;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 16px;
    vertical-align: middle;
    letter-spacing: 0;
}

/* 空状态 */
.ls-empty-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px dashed #4a6741;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px;
    color: #4a6741;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 升级提示 */
.ls-upgrade-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
    border: 1px dashed #d4a017;
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
}
.ls-upgrade-tip .ls-upgrade-main {
    font-size: 14px;
    color: #b8860b;
    font-weight: 600;
    line-height: 1.4;
}
.ls-upgrade-tip .ls-upgrade-btn {
    display: inline-block;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(184,134,11,0.25);
    transition: opacity 0.2s, transform 0.2s;
}
.ls-upgrade-tip .ls-upgrade-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* 会员作业弹窗 */
#memberHomeworkModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}
#memberHomeworkModal.show { display: flex; }

#memberHomeworkModal .mh-panel {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.mh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.mh-user { display: flex; align-items: center; gap: 12px; }
.mh-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.mh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mh-userinfo { display: flex; flex-direction: column; line-height: 1.35; }
.mh-name { font-size: 15px; color: #2c3e50; font-weight: 600; }
.mh-sub { font-size: 13px; color: #999; }
.mh-score { color: #b8860b; font-weight: 600; margin-left: 4px; }

.mh-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
}
.mh-close:hover { color: #333; }

.mh-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mh-img {
    text-align: center;
    background: #fafafa;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #f0f0f0;
}
.mh-img img {
    max-width: 100%;
    max-height: 380px;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.mh-good {
    background: #fdf6e3;
    border: 1px solid #f0d98a;
    border-radius: 10px;
    padding: 14px 18px;
}
.mh-good-title {
    font-size: 13px;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #f0d98a;
    letter-spacing: 1px;
}
.mh-good-text {
    font-size: 14px;
    color: #555;
    line-height: 1.9;
}

@media (max-width: 600px) {
    #memberHomeworkModal .mh-panel { max-height: 90vh; }
    .mh-body { padding: 14px; }
    .mh-img img { max-height: 260px; }
}

/* 手动复制弹窗 */
#manualCopyModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#manualCopyModal .mcm-panel {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#manualCopyModal .mcm-title {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}
#manualCopyModal .mcm-textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    font-family: inherit;
    resize: vertical;
    background: #fafafa;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}
#manualCopyModal .mcm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
#manualCopyModal .mcm-btn {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}
#manualCopyModal .mcm-cancel {
    background: #f0f0f0;
    color: #666;
}
#manualCopyModal .mcm-cancel:hover { background: #e5e5e5; }
#manualCopyModal .mcm-select {
    background: #4a6741;
    color: #fff;
}
#manualCopyModal .mcm-select:hover { background: #3d5636; }

/* 星级评分 */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}
.star-rating .stars {
    position: relative;
    display: inline-block;
    width: 90px;
    height: 18px;
    line-height: 18px;
    font-size: 0;
}
.star-rating .stars::before,
.star-rating .stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    background-repeat: repeat-x;
    background-size: 18px 18px;
}
.star-rating .stars::before {
    width: 90px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z' fill='none' stroke='%23d4a017' stroke-width='1.5'/></svg>");
}
.star-rating .stars::after {
    width: var(--star-w, 0%);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z' fill='%23d4a017' stroke='%23d4a017' stroke-width='1.5'/></svg>");
}
.star-rating .star-num {
    font-size: 12px;
    color: #b8860b;
    font-weight: 600;
}