/* File: css/wsp-listening-reading-styles.css */
/* Version: 1.2 - Layout adjustments for controls and added tip style */

.wsp-lr-plugin-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: sans-serif;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wsp-lr-plugin-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.wsp-lr-controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wsp-lr-accent-selector label {
    margin-left: 1px;
    cursor: pointer;
}

.wsp-lr-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wsp-lr-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.wsp-lr-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.wsp-lr-article-content {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 15px;
    line-height: 1.8;
    font-size: 18px;
    scroll-behavior: smooth;
    background-color: #fdfdfd;
}

.wsp-lr-article-content .sentence-pair {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.play-sentence-icon {
    cursor: pointer;
    margin-right: 10px;
    font-size: 1.2em;
    color: #007bff;
    transition: color 0.2s;
    user-select: none;
}

.play-sentence-icon:hover {
    color: #0056b3;
}

.sentence-text {
    flex-grow: 1;
}

.wsp-lr-article-content .en-sentence {
    font-weight: bold;
    margin: 0;
}

.wsp-lr-article-content .cn-sentence {
    font-size: 0.9em;
    color: #555;
    margin: 4px 0 0 0;
}

.wsp-lr-article-content .en-sentence span.word {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.wsp-lr-article-content .en-sentence span.word:hover {
    background-color: #007bff;
    color: #fff;
    border-radius: 3px;
}

.highlight {
    background-color: #f0ad4e;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
}

.wsp-lr-playback-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* Specific style for point reading controls to have less margin */
.wsp-lr-playback-controls.point-reading-controls {
    justify-content: flex-end; /* Align to the right */
    margin-bottom: 5px;
    padding: 5px 10px;
}


.wsp-lr-speed-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tip for point reading page */
.wsp-lr-point-reading-tip {
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}


/* Modal Styles */
.wsp-lr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.wsp-lr-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

.wsp-lr-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#wsp-lr-article-list li {
    padding: 10px;
    cursor: pointer;
    list-style-type: none;
}

#wsp-lr-article-list li:hover {
    background-color: #f1f1f1;
}

.wsp-lr-article-title {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wsp-lr-article-title h4 {
    margin: 0 0 5px 0;
    font-size: 1.4em;
    font-weight: bold;
}

.wsp-lr-article-title p {
    margin: 0;
    font-size: 1em;
    color: #666;
}
/* --- 美化后的文章级别选择弹窗样式 --- */

/* 弹窗内容区域 */
#wsp-lr-level-selection-modal .wsp-lr-modal-content {
    max-width: 600px; /* 适当加宽以容纳卡片 */
    border-radius: 12px; /* 更柔和的圆角 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* 添加更立体的阴影 */
    border: none; /* 移除默认的1px边框 */
    padding: 2.5rem; /* 增加内部空间感 */
    text-align: center; /* 整体内容居中 */
}

/* 弹窗标题 */
#wsp-lr-level-selection-modal h2 {
    font-size: 2em; /* 增大标题字号 */
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* 描述文字区域 */
#wsp-lr-level-selection-modal .wsp-lr-level-description {
    font-size: 1.05em; /* 调整描述字号 */
    color: #555;
    line-height: 1.7; /* 增加行高，提升可读性 */
    margin-bottom: 2.5rem; /* 增加与下方卡片的间距 */
    text-align: left; /* 描述文字左对齐更易阅读 */
    background-color: #f8f9fa; /* 给描述区一个浅灰色背景 */
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007bff; /* 左侧添加蓝色强调线 */
}

/* 选项卡片容器 */
#wsp-lr-level-selection-modal .wsp-lr-level-buttons {
    display: flex;
    flex-direction: column; /* 卡片垂直排列 */
    gap: 1rem; /* 卡片之间的间距 */
}

/* 新的卡片式按钮样式 */
.wsp-lr-level-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

/* 卡片悬停效果 */
.wsp-lr-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

/* 卡片图标 */
.wsp-lr-level-card-icon {
    font-size: 2.5em;
    margin-right: 1.5rem;
    transition: transform 0.3s ease;
}

.wsp-lr-level-card:hover .wsp-lr-level-card-icon {
    transform: scale(1.1);
}

/* 卡片文字区域 */
.wsp-lr-level-card-text {
    text-align: left;
}

/* 卡片主标题 */
.wsp-lr-level-card-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* 卡片副标题 */
.wsp-lr-level-card-subtitle {
    font-size: 0.95em;
    color: #777;
    margin: 0;
}

/* 为不同的卡片添加不同的主题色和图标 */
.wsp-lr-level-card[data-count="8"]:hover { border-color: #28a745; }
.wsp-lr-level-card[data-count="8"] .wsp-lr-level-card-icon { color: #28a745; }

.wsp-lr-level-card[data-count="48"]:hover { border-color: #ffc107; }
.wsp-lr-level-card[data-count="48"] .wsp-lr-level-card-icon { color: #ffc107; }

.wsp-lr-level-card[data-count="89"]:hover { border-color: #dc3545; }
.wsp-lr-level-card[data-count="89"] .wsp-lr-level-card-icon { color: #dc3545; }
/* --- 美化后的故事选择列表弹窗样式 --- */
/* --- 美化后的故事选择列表弹窗样式 (单列列表版) --- */

/* 弹窗内容区 */
#wsp-lr-story-selection-modal .wsp-lr-modal-content {
    max-width: 700px; /* 宽度可以适当调整 */
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* 弹窗标题 */
#wsp-lr-story-selection-modal h3 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

/* 故事列表容器 (改为单列布局) */
#wsp-lr-story-list {
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: auto; /* 当内容超出时显示滚动条 */
    flex-grow: 1;
}

/* 移除默认的列表项目符号 */
#wsp-lr-story-list li::marker {
    content: "" !important;
    font-size: 0 !important;
}

/* 故事列表项 (行样式) */
#wsp-lr-story-list li {
    display: flex;
    align-items: center; /* 垂直居中对齐序号和标题 */
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 0.75rem; /* 列表项之间的间距 */
}

/* 列表项悬停效果 */
#wsp-lr-story-list li:hover {
    transform: translateX(5px); /* 悬停时轻微右移 */
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    padding-left: calc(1rem - 3px); /* 保持内边距一致 */
}

/* 故事序号样式 */
.wsp-lr-story-card-number {
    font-size: 1.1em; /* 与标题字体大小一致 */
    font-weight: 600; /* 加粗以作区分 */
    color: #007bff; /* 使用主题蓝色 */
    margin-right: 1rem; /* 序号和标题之间的间距 */
    min-width: 30px; /* 保证对齐 */
}

/* 故事标题样式 */
.wsp-lr-story-card-title {
    font-size: 1.1em; /* 与序号字体大小一致 */
    color: #343a40; /* 深灰色，易于阅读 */
    line-height: 1.4;
}

/* --- START: MODIFICATIONS FOR ENHANCED POINT READING --- */
/* Hide sentence play icon on enhanced point reading page */
.wsp-point-reading-enhanced .play-sentence-icon {
    display: none;
}

/* Remove word hover effect and pointer cursor on enhanced point reading page */
.wsp-point-reading-enhanced .en-sentence span.word {
    cursor: default;
}

.wsp-point-reading-enhanced .en-sentence span.word:hover {
    background-color: transparent;
    color: inherit;
}
/* --- END: MODIFICATIONS FOR ENHANCED POINT READING --- */