/* css/lesson.css */
/* 仅用于 lesson-list.html 和 lesson-content.html */

/* --- 课程列表页 (lesson-list.html) --- */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.lesson-link-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}
.lesson-link-box:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none;
}


/* --- 课程内容页 (lesson-content.html) --- */
.sentence-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sentence-table th, 
.sentence-table td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.sentence-table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

.sentence-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.play-btn {
    font-size: 1.3em;
    line-height: 1;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--primary-color);
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.play-btn:hover {
    background-color: #e0e0e0;
}

.col-play { width: 50px; text-align: center; }
.col-jp { width: 30%; }
.col-cn { width: 30%; }
.col-grammar { width: 35%; }


/* --- 标日课程表格 (移动端) --- */
@media (max-width: 768px) {
    .sentence-table {
        display: block;
    }
    .sentence-table thead {
        display: none; /* 隐藏表头 */
    }
    .sentence-table tbody, .sentence-table tr, .sentence-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .sentence-table tr {
        border: 1px solid var(--border-color);
        margin-bottom: 15px;
        border-radius: 5px;
        overflow: hidden;
    }
    .sentence-table td {
        border: none;
        border-bottom: 1px dotted #eee;
        padding-left: 110px; /* 为 'data-label' 腾出空间 */
        position: relative;
    }
    .sentence-table td:last-child {
        border-bottom: none;
    }
    
    /* 使用 ::before 伪元素创建 "标签" */
    .sentence-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 90px;
        font-weight: 600;
        color: #555;
    }
    
    /* 更新 JS 以添加 data-label */
    .col-jp::before { content: '日文'; }
    .col-cn::before { content: '中文'; }
    .col-grammar::before { content: '语法'; }
    
    .col-play {
        padding-left: 12px; /* 播放按钮不需要 label */
        background-color: var(--bg-light);
        text-align: left;
    }
    .col-play::before {
        content: '';
    }
}
