@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --primary-bg: #EEF2FF;
    --accent: #22C55E;
    --accent-light: #86EFAC;
    --accent-bg: #F0FDF4;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text: #1E1B4B;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.06);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: 200ms ease;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

button, .btn, [onclick] {
    cursor: pointer;
    transition: all var(--transition);
}

input, textarea, select {
    font-family: var(--font-body);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-left: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 30px;
}

.content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
}

.content-wrapper.two-column .left-column {
    width: 45%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.content-wrapper.two-column .right-column {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 160px);
}

.left-column {
    flex-shrink: 0;
}

.right-column {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.video-box {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.video-section,
.audio-section {
    margin-bottom: 10px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow);
}

.video-section .video-box {
    margin-top: 10px;
}

.content-wrapper.two-column .left-column .title {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin: 0;
}

.content-wrapper.two-column .left-column .info-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.content-wrapper.two-column .left-column .meta-info,
.content-wrapper.two-column .left-column .tags-box {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.content-wrapper.two-column .left-column .vocab-cards-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.media-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-box {
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.video-wrapper {
    position: relative;
    width: 100%;
}

.video-box video {
    width: 100%;
    display: block;
    pointer-events: auto;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 5;
    pointer-events: none;
}

.video-box video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

.video-box video::-webkit-media-controls-panel {
    width: calc(100% + 30px);
}

video::-internal-media-controls-download-button {
    display: none;
}

video::-webkit-media-controls-download-button {
    display: none;
}

video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

audio::-internal-media-controls-download-button {
    display: none;
}

audio::-webkit-media-controls-download-button {
    display: none;
}

.video-loading,
.audio-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    z-index: 10;
}

.audio-box h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-box audio {
    width: 100%;
}

.no-video {
    padding: 100px 20px;
    text-align: center;
    color: var(--text-secondary);
    background: #1a1a1a;
}

.left-sections {
    margin-top: 20px;
}

.left-sections .section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.left-sections .section-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

.left-sections .section-content {
    color: #555;
    line-height: 1.8;
}

.no-audio {
    color: var(--text-muted);
    text-align: center;
    padding: 10px;
}

.title {
    font-size: 28px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.4;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-item .value {
    color: var(--text);
    font-weight: 500;
}

.difficulty .star {
    color: #ddd;
    font-size: 18px;
}

.difficulty .star.active {
    color: #FFB800;
}

.source-link {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.source-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.tags-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.tags-box .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.content-sections {
    margin-top: 20px;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

.section-content {
    color: #555;
    line-height: 1.8;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.section-content p {
    margin-bottom: 10px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.vocabularies-box {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.vocabularies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.vocab-item {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 500;
}

.vocab-word-link {
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.vocab-word-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.vocab-cards-box {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.vocab-cards-box .section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.vocab-category {
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    background: var(--card-bg);
}

.vocab-category-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
}

.vocab-category-header:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.vocab-category-header .category-name {
    font-weight: 600;
    color: #fff;
    flex: 1;
    font-size: 16px;
}

.vocab-category-header .category-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-xl);
}

.vocab-category-header .category-arrow {
    font-size: 10px;
    color: #fff;
    transition: transform 0.3s ease;
}

.vocab-category.collapsed .category-arrow {
    transform: rotate(-90deg);
}

.vocab-category-words {
    padding: 16px;
    background: var(--card-bg);
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 2000px;
}

.vocab-category.collapsed .vocab-category-words {
    max-height: 0 !important;
    padding: 0 16px;
}

.vocab-drawer {
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.vocab-drawer:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-bg);
}

.vocab-drawer:last-child {
    margin-bottom: 0;
}

.vocab-drawer-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(to right, #fafbff, #fff);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vocab-drawer-header:hover {
    background: linear-gradient(to right, #f0f3ff, #fafbff);
}

.vocab-drawer-header .vocab-word {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
    font-family: 'Georgia', serif;
}

.vocab-drawer-header .vocab-phonetic {
    font-size: 13px;
    color: #888;
    margin-left: 12px;
    font-style: italic;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.vocab-phonetics {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    gap: 8px;
}

.vocab-phonetic-group {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    gap: 4px;
}

.vocab-phonetics .phonetic-item,
.vocab-phonetic-group .phonetic-item {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-style: italic;
}

.vocab-phonetics .phonetic-us,
.vocab-phonetic-group .phonetic-us {
    color: var(--primary);
    background: var(--primary-bg);
}

.vocab-phonetics .phonetic-uk,
.vocab-phonetic-group .phonetic-uk {
    color: var(--danger);
    background: #FEF2F2;
}

.vocab-phonetic-group .audio-btn {
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    transition: all var(--transition);
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--primary);
}

.vocab-phonetic-group .audio-btn .audio-icon {
    width: 12px;
    height: 12px;
}

.vocab-phonetic-group .audio-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.vocab-phonetic-group .audio-btn.audio-uk {
    color: #e74c3c;
    background: #fef0f0;
}

.vocab-phonetic-group .audio-btn.audio-uk:hover {
    background: #e74c3c;
    color: #fff;
}

.vocab-audio-btns {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    gap: 8px;
}

.vocab-audio-btns .audio-btn {
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f0f3ff;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-weight: 500;
}

.vocab-audio-btns .audio-btn .audio-icon {
    width: 12px;
    height: 12px;
}

.vocab-audio-btns .audio-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.vocab-audio-btns .audio-btn:active {
    transform: scale(0.95);
}

.vocab-audio-btns .audio-btn.playing {
    animation: audioPlaying 0.5s ease infinite alternate;
}

@keyframes audioPlaying {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.vocab-drawer-header .vocab-drawer-arrow {
    margin-left: auto;
    font-size: 10px;
    color: var(--primary);
    transition: transform 0.3s ease;
    background: #f0f3ff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.vocab-drawer.open .vocab-drawer-arrow {
    transform: rotate(180deg);
    background: var(--primary);
    color: #fff;
}

.vocab-drawer.open {
    border-color: var(--primary);
}

.vocab-drawer-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.vocab-drawer.open .vocab-drawer-content {
    padding: 16px;
    max-height: none;
    border-top: 1px solid #f0f0f0;
}

.vocab-detail-item {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.vocab-detail-item:last-child {
    margin-bottom: 0;
}

.vocab-detail-item .detail-label {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vocab-detail-item .detail-value {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.vocab-detail-item .detail-value p {
    margin: 0 0 8px 0;
}

.vocab-detail-item .detail-value p:last-child {
    margin-bottom: 0;
}

.footer {
    background: #2d3748;
    color: #a0aec0;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.list-page .list-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-header:hover {
    background: #f5f5f5;
}

.search-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.search-toggle-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.search-section.collapsed .search-toggle-icon {
    transform: rotate(180deg);
}

.search-content {
    padding: 20px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.search-section.collapsed .search-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.search-row {
    margin-bottom: 15px;
}

.search-row:last-child {
    margin-bottom: 0;
}

.search-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.search-item label {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 50px;
    padding-top: 6px;
    flex-shrink: 0;
}

.star-filter, .tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.star-option, .tag-option {
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: var(--text-secondary);
}

.star-option:hover, .tag-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.star-option.active, .tag-option.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

.card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary);
}

.card-difficulty .star {
    color: #ddd;
    font-size: 12px;
}

.card-difficulty .star.active {
    color: #FFB800;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.card-tags .tag {
    font-size: 11px;
    padding: 2px 8px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.card-footer .date {
    color: var(--text-muted);
    font-size: 12px;
}

.btn-view {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: opacity 0.3s;
}

.btn-view:hover {
    opacity: 0.9;
}

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.subtitle-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.subtitle-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle-tab-btns {
    display: flex;
    gap: 8px;
}

.subtitle-tab-btn {
    padding: 8px 20px;
    background: #f5f5f5;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.subtitle-tab-btn:hover {
    background: #e8e8e8;
}

.subtitle-tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.subtitle-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.subtitle-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.subtitle-mode-btns {
    display: flex;
    gap: 6px;
    margin-right: 10px;
}

.subtitle-mode-btn {
    padding: 5px 12px;
    background: #f0f0f0;
    color: var(--text-secondary);
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.subtitle-mode-btn:hover {
    background: #e0e0e0;
}

.subtitle-mode-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.subtitle-play-controls {
    display: flex;
    gap: 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.download-btn:hover {
    opacity: 0.9;
}

.subtitle-line .translation {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.subtitle-line .translation.hidden {
    display: none;
}

.subtitle-container.no-subtitle-mode .subtitle-line {
    display: none;
}

.subtitle-container.en-mode .translation {
    display: none;
}

.control-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.control-btn:hover {
    opacity: 0.9;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* 打印样式 */
@media print {
    body {
        background: #fff !important;
        padding: 20px !important;
    }
    
    .header,
    .footer,
    .video-section,
    .audio-section,
    .subtitle-header,
    .subtitle-play-controls,
    .subtitle-mode-btns,
    .icon-btn,
    .control-btn,
    .word-mode-btn,
    .mobile-layout,
    .mobile-nav-bar,
    .mobile-tab-bar,
    .favorite-btn,
    .vocab-drawer-arrow,
    .dictation-container,
    .no-subtitle-hint,
    .info-box,
    .audio-btn,
    .vocab-category-header,
    .vocab-category-arrow,
    .vocab-drawer-header,
    .favorite-modal-overlay,
    .toast-container {
        display: none !important;
    }
    
    .content-wrapper {
        display: flex !important;
        flex-direction: column !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .content-wrapper.two-column .left-column {
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        display: contents !important;
    }
    
    .content-wrapper.two-column .right-column {
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        order: 2 !important;
        background: none !important;
    }
    
    .title {
        font-size: 24px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        padding: 0 0 15px 0 !important;
        box-shadow: none !important;
        background: none !important;
        border-bottom: 1px solid #eee !important;
        order: 0 !important;
        display: block !important;
    }
    
    .subtitle-container {
        display: block !important;
        max-height: none !important;
        padding: 0 !important;
        background: none !important;
    }
    
    .subtitle-line {
        page-break-inside: avoid;
        margin-bottom: 15px !important;
        padding: 10px !important;
        border-bottom: 1px solid #eee !important;
        background: none !important;
    }
    
    .subtitle-text {
        font-size: 14px !important;
    }
    
    .translation {
        font-size: 12px !important;
        color: #666 !important;
    }
    
    .vocab-cards-box {
        margin-top: 30px !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: none !important;
        border-top: 1px solid #eee !important;
        padding-top: 20px !important;
        order: 3 !important;
        display: block !important;
    }
    
    .vocab-cards-box .section-title {
        font-size: 20px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }
    
    .vocab-category {
        page-break-inside: avoid;
        margin-bottom: 20px !important;
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }
    
    .vocab-category.collapsed .vocab-category-words {
        display: block !important;
        max-height: none !important;
        padding: 16px !important;
    }
    
    .vocab-category-words {
        display: block !important;
        max-height: none !important;
    }
    
    .vocab-drawer {
        page-break-inside: avoid;
        margin-bottom: 15px !important;
        padding: 10px !important;
        border: 1px solid #eee !important;
        border-radius: 8px !important;
    }
    
    .vocab-drawer.open .vocab-drawer-content,
    .vocab-drawer-content {
        display: block !important;
        max-height: none !important;
        padding: 10px 0 0 0 !important;
        border-top: 1px solid #f0f0f0 !important;
    }
    
    .vocab-word {
        font-size: 16px !important;
        font-weight: bold !important;
    }
    
    .phonetic-item {
        font-size: 12px !important;
        color: #666 !important;
    }
    
    .vocab-detail-item {
        margin-bottom: 10px !important;
        padding: 8px !important;
        background: #f8f9ff !important;
        border-left: 3px solid var(--primary) !important;
    }
    
    body.print-en-mode .translation {
        display: none !important;
    }
    
    body.print-no-vocab .vocab-cards-box {
        display: none !important;
    }
    
    .print-modal-overlay {
        display: none !important;
    }
}

.ab-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.ab-selector-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.ab-selector-close {
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-selector-info {
    display: flex;
    gap: 20px;
    padding: 12px 20px;
    background: #f9f9f9;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ab-selector-info strong {
    color: var(--primary);
}

.ab-selector-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
}

.ab-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.ab-item:hover {
    background: #f0f0f0;
}

.ab-item.selected-a {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.ab-item.selected-b {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.ab-item-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 12px;
}

.ab-item-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.ab-item-mark {
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.ab-item-mark.mark-a {
    color: var(--primary);
}

.ab-item-mark.mark-b {
    color: #e74c3c;
}

.ab-selector-controls {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.ab-selector-controls .control-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

#abStartBtn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

#abStopBtn {
    background: #f5f5f5;
    color: var(--text-secondary);
    border: 1px solid #ddd;
}

.speed-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.speed-selector-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.speed-selector-close {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--border-light);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.speed-selector-close:hover {
    background: var(--border);
}

.speed-selector-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 10px;
    padding: 15px;
}

.speed-item {
    width: calc(33.33% - 7px);
    padding: 12px 8px;
    text-align: center;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.speed-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.speed-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.subtitle-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    transition: opacity 0.3s ease;
    max-height: calc(100vh - 350px);
    min-height: 300px;
}

.dictation-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.dictation-lines {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dictation-line {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 15px;
    transition: all 0.3s;
}

.dictation-line:hover {
    background: #f0f1f3;
}

.dictation-line.active {
    background: #e8f4fd;
    border-left: 3px solid var(--primary);
}

.dictation-line-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dictation-line-num {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.dictation-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.dictation-line-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    min-height: 50px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.dictation-line-input:focus {
    outline: none;
    border-color: var(--primary);
}

.dictation-eye-btn {
    width: 40px;
    height: 50px;
    background: var(--card-bg);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.dictation-eye-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.dictation-eye-btn:hover svg {
    stroke: #fff;
}

.dictation-eye-btn svg {
    width: 20px;
    height: 20px;
    stroke: #666;
    transition: stroke 0.3s;
}

.dictation-eye-btn.showing {
    background: var(--primary);
    border-color: var(--primary);
}

.dictation-eye-btn.showing svg {
    stroke: #fff;
}

.dictation-answer {
    display: none;
    margin-top: 10px;
    padding: 12px 15px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid #4caf50;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.dictation-answer.show {
    display: block;
}

.dictation-line-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.dictation-action-btn {
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid #ddd;
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dictation-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.dictation-action-btn svg {
    width: 14px;
    height: 14px;
}

.subtitle-line {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.8;
    min-height: 48px;
    position: relative;
}

.subtitle-line:hover {
    background: #e9ecef;
}

.subtitle-line.active-line {
    background: #e8f4fd;
    border-left: 3px solid var(--primary);
}

.subtitle-line .subtitle-text {
    font-size: 16px;
    color: var(--text);
    line-height: 1.8;
}

.subtitle-line.active-line .subtitle-text {
    color: #1a73e8;
}

.subtitle-line .word {
    display: inline-block;
    min-width: 0;
    margin-right: 4px;
}

.subtitle-line .word.active {
    color: var(--text-muted);
}

.subtitle-line .word.current-word {
    color: #e91e63;
    text-shadow: 
        -0.5px 0 0 currentColor,
        0.5px 0 0 currentColor,
        0 -0.5px 0 currentColor,
        0 0.5px 0 currentColor;
}

.subtitle-line .word.vocab-word {
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-style: wavy;
    cursor: pointer;
    color: var(--primary);
}

.subtitle-line .word.vocab-word:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 2px;
}

.word-span {
    display: inline-block;
    min-width: 0.5em;
    transition: color 0.1s ease, background-color 0.1s ease;
    margin: 0 2px;
}

.word-highlight {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

@keyframes wordPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.word-mode-btn {
    background: #28a745 !important;
    color: #fff !important;
}

.word-mode-btn.active {
    background: #dc3545 !important;
    color: #fff !important;
}

.vocab-card {
    position: fixed;
    z-index: 99999;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    min-width: 380px;
    max-width: 450px;
    padding: 0;
    font-size: 15px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.vocab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px 16px 0 0;
    color: #fff;
}

.vocab-card-word {
    font-size: 24px;
    font-weight: bold;
}

.vocab-card-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.vocab-card-close:hover {
    opacity: 1;
}

.vocab-card-section {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    line-height: 1.8;
}

.vocab-card-section:last-child {
    border-bottom: none;
}

.vocab-card-section strong {
    color: var(--primary);
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.vocab-card-loading,
.vocab-card-error {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
}

.vocab-card-error {
    color: #e74c3c;
}

.no-subtitle {
    text-align: center;
    color: var(--text-muted);
    padding: 50px 20px;
}

.subtitle-line .translation {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #ddd;
}

@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .content-wrapper.two-column .left-column,
    .left-column {
        width: 100%;
        max-height: none;
    }
    
    .subtitle-container {
        padding: 12px;
    }
    
    .subtitle-header {
        padding: 10px 12px;
    }
    
    .subtitle-header h2 {
        font-size: 14px;
    }
    
    .content-wrapper.two-column .right-column,
    .right-column {
        max-height: 280px;
    }
    
    .pc-content {
        display: none;
    }
    
    .mobile-content {
        display: block;
    }
}

@media (min-width: 1025px) {
    .pc-content {
        display: block;
    }
    
    .mobile-content {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        display: none;
    }
    
    .footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    .title {
        font-size: 22px;
    }
    
    .card-list {
        grid-template-columns: 1fr;
    }
    
    .search-section {
        margin: 10px;
        border-radius: var(--radius-sm);
        padding: 15px;
    }
    
    .search-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-item label {
        padding-top: 0;
    }
    
    .star-filter, .tag-filter {
        gap: 8px;
    }
    
    .star-option, .tag-option {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .middle-column {
        max-height: 350px;
    }
    
    .subtitle-line {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .subtitle-line .translation {
        font-size: 12px;
    }
    
    .vocab-card {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .vocab-card-word {
        font-size: 20px;
    }
    
    .vocab-card-section {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .vocab-card-actions {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    
    .vocab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .video-box {
        border-radius: var(--radius-sm);
    }
    
    .audio-box h3 {
        font-size: 14px;
    }
    
    .control-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .subtitle-header {
        padding: 12px 15px;
    }
    
    .subtitle-header h2 {
        font-size: 14px;
    }
    
    .subtitle-container {
        padding: 15px;
    }
}

.subtitle-line .word.mastered {
    background: rgba(76, 175, 80, 0.2);
    border-radius: 2px;
}

.vocab-card-actions {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.vocab-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.vocab-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.vocab-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.vocab-btn-success {
    background: #4caf50;
    color: #fff;
}

.vocab-btn-success:hover {
    background: #45a049;
}

.vocab-btn-default {
    background: #f5f5f5;
    color: var(--text-secondary);
    border: 1px solid #ddd;
}

.vocab-btn-default:hover {
    background: #eee;
}

.pc-layout {
    display: flex;
}

.mobile-layout {
    display: none;
}

.mobile-nav-bar {
    display: none;
}

.mobile-top-nav {
    display: none;
}

.mobile-sidebar-overlay {
    display: none;
}

.mobile-sidebar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-top-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .mobile-top-nav-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
    }
    
    .mobile-menu-btn svg {
        width: 24px;
        height: 24px;
        color: #fff;
    }
    
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .mobile-sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    .mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: var(--card-bg);
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .mobile-sidebar.show {
        left: 0;
    }
    
    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
    }
    
    .mobile-sidebar-header span {
        font-size: 18px;
        font-weight: 600;
    }
    
    .mobile-sidebar-close {
        width: 32px;
        height: 32px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .mobile-sidebar-nav {
        padding: 15px 0;
    }
    
    .mobile-sidebar-nav a {
        display: block;
        padding: 14px 20px;
        color: var(--text);
        text-decoration: none;
        font-size: 15px;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.2s;
    }
    
    .mobile-sidebar-nav a:hover {
        background: #f5f5f5;
        color: var(--primary);
    }
    
    .mobile-sidebar-nav a.active {
        color: var(--primary);
        background: rgba(102, 126, 234, 0.1);
        font-weight: 600;
        border-left: 3px solid var(--primary);
    }
    
    .pc-layout {
        display: none;
    }
    
    .mobile-layout {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    .mobile-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: var(--card-bg);
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
        z-index: 100;
    }
    
    .mobile-nav-back {
        display: flex;
        align-items: center;
        color: var(--primary);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
    }
    
    .mobile-nav-back svg {
        width: 20px;
        height: 20px;
        margin-right: 4px;
    }
    
    .mobile-nav-title {
        flex: 1;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 10px;
    }
    
    .mobile-nav-placeholder {
        width: 60px;
    }
    
    .mobile-video-section {
        width: 100%;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 50;
        background: #000;
    }
    
    .mobile-video-section .video-box {
        border-radius: 0;
    }
    
    .mobile-tabs {
        background: var(--card-bg);
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    .mobile-tab-header {
        display: flex;
        border-bottom: 1px solid #eee;
        background: var(--card-bg);
        flex-shrink: 0;
        z-index: 10;
    }
    
    .mobile-tab-btn {
        flex: 1;
        padding: 12px 0;
        border: none;
        background: none;
        font-size: 14px;
        color: var(--text-secondary);
        cursor: pointer;
        position: relative;
        transition: all 0.3s;
    }
    
    .mobile-tab-btn.active {
        color: var(--primary);
        font-weight: 600;
    }
    
    .mobile-tab-btn.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 2px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: 1px;
    }
    
    .mobile-tab-content {
        display: none;
        padding: 15px;
    }
    
    .mobile-tab-content.active {
        display: block;
    }
    
    .mobile-tab-content#tab-follow {
        display: none;
        flex-direction: column;
        flex: 1;
        padding: 0;
        min-height: 0;
        overflow: hidden;
    }

    .mobile-tab-content#tab-follow.active {
        display: flex;
    }

    #mobileSubtitleContainer {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 15px;
        padding-bottom: 80px;
        min-height: 0;
    }
    
    #mobileSubtitleContainer.no-subtitle-mode {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        font-size: 14px;
    }
    
    .mobile-controls-bar {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 5px;
        background: var(--card-bg);
        border-top: 1px solid #eee;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
    }
    
    .mobile-controls-bar .control-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 8px;
        font-size: 10px;
        border-radius: var(--radius-sm);
        min-width: 48px;
        background: transparent;
        color: var(--text-secondary);
        border: none;
    }
    
    .mobile-controls-bar .control-btn .btn-icon {
        width: 22px;
        height: 22px;
        margin-bottom: 2px;
    }
    
    .mobile-controls-bar .control-btn .btn-text {
        font-size: 10px;
        line-height: 1;
    }
    
    .mobile-controls-bar .play-btn {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
    }
    
    .mobile-controls-bar .play-btn .btn-icon {
        width: 26px;
        height: 26px;
    }
    
    .mobile-controls-bar .play-btn .btn-text {
        font-size: 11px;
    }
    
    .mobile-controls-bar .mode-btn.active,
    .mobile-controls-bar .word-mode-btn.active {
        background: linear-gradient(135deg, #16baaa 0%, #009688 100%);
        color: #fff;
    }
    
    .mobile-controls-bar .single-btn.active,
    .mobile-controls-bar .ab-btn.active {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
        color: #fff;
    }
    
    .mobile-controls-bar .speed-btn.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
    }
    
    .dictation-section {
        padding: 10px 0;
    }
    
    .dictation-current-sentence {
        background: #f5f5f5;
        padding: 15px;
        border-radius: var(--radius-sm);
        margin-bottom: 15px;
        min-height: 60px;
    }
    
    .sentence-hint {
        color: var(--text-muted);
        font-size: 14px;
    }
    
    .dictation-input {
        width: 100%;
        min-height: 120px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: var(--radius-sm);
        font-size: 14px;
        resize: vertical;
        font-family: inherit;
    }
    
    .dictation-input:focus {
        outline: none;
        border-color: var(--primary);
    }
    
    .dictation-result {
        margin-top: 15px;
        padding: 15px;
        background: #f9f9f9;
        border-radius: var(--radius-sm);
        display: none;
    }
    
    .dictation-result.show {
        display: block;
    }
    
    .dictation-result .correct {
        color: #4caf50;
    }
    
    .dictation-result .wrong {
        color: #f44336;
        text-decoration: line-through;
    }
    
    .dictation-result .missing {
        color: #ff9800;
        border-bottom: 2px solid #ff9800;
    }
    
    .dictation-comparison {
        padding: 10px 0;
    }
    
    .comparison-label {
        font-size: 13px;
        color: var(--text-secondary);
        margin-bottom: 8px;
    }
    
    .comparison-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .comparison-text .correct {
        color: #4caf50;
        font-weight: 500;
    }
    
    .comparison-text .wrong {
        color: #f44336;
        text-decoration: line-through;
    }
    
    .accuracy-score {
        margin-top: 15px;
        padding: 10px 15px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 500;
        text-align: center;
    }
    
    .dictation-controls {
        display: flex;
        gap: 10px;
        margin-top: 15px;
    }
    
    .dictation-controls .control-btn {
        flex: 1;
    }
    
    .ab-selector-card {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        height: 80vh;
        background: var(--card-bg);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        z-index: 1000;
        transition: bottom 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    .ab-selector-card.show {
        bottom: 0;
    }
    
    .ab-selector-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
    }
    
    .ab-selector-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--text);
    }
    
    .ab-selector-close {
        width: 30px;
        height: 30px;
        border: none;
        background: #f5f5f5;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .ab-selector-info {
        display: flex;
        gap: 20px;
        padding: 12px 20px;
        background: #f9f9f9;
        font-size: 14px;
        color: var(--text-secondary);
        flex-shrink: 0;
    }
    
    .ab-selector-info strong {
        color: var(--primary);
    }
    
    .ab-selector-list {
        flex: 1;
        overflow-y: auto;
        padding: 10px 15px;
    }
    
    .ab-item {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        margin-bottom: 8px;
        background: #f9f9f9;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.2s;
        border: 2px solid transparent;
    }
    
    .ab-item:hover {
        background: #f0f0f0;
    }
    
    .ab-item.selected-a {
        border-color: var(--primary);
        background: rgba(102, 126, 234, 0.1);
    }
    
    .ab-item.selected-b {
        border-color: #e74c3c;
        background: rgba(231, 76, 60, 0.1);
    }
    
    .ab-item.selected-a.selected-b {
        border-color: var(--primary);
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(231, 76, 60, 0.15) 100%);
    }
    
    .ab-item-num {
        width: 28px;
        height: 28px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
        margin-right: 12px;
    }
    
    .ab-item-text {
        flex: 1;
        font-size: 14px;
        color: var(--text);
        line-height: 1.4;
    }
    
    .ab-item-mark {
        font-size: 12px;
        font-weight: 600;
        margin-left: 8px;
    }
    
    .ab-item-mark.mark-a {
        color: var(--primary);
    }
    
    .ab-item-mark.mark-b {
        color: #e74c3c;
    }
    
    .ab-selector-controls {
        display: flex;
        gap: 15px;
        padding: 15px 20px;
        border-top: 1px solid #eee;
        flex-shrink: 0;
    }
    
    .ab-selector-controls .control-btn {
        flex: 1;
        padding: 12px;
        font-size: 14px;
        border-radius: var(--radius-sm);
    }
    
    #abStartBtn {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
    }
    
    #abStopBtn {
        background: #f5f5f5;
        color: var(--text-secondary);
        border: 1px solid #ddd;
    }
    
    .mobile-controls-bar .single-btn.active,
    .mobile-controls-bar .ab-btn.active {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
        color: #fff;
    }
    
    .mobile-controls-bar .speed-btn.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
    }
    
    .speed-selector-card {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        height: 35vh;
        background: var(--card-bg);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        transition: bottom 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    .speed-selector-card.show {
        bottom: 0;
    }
    
    .speed-selector-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-light);
        flex-shrink: 0;
    }
    
    .speed-selector-title {
        font-family: var(--font-heading);
        font-size: 16px;
        font-weight: 600;
        color: var(--text);
    }
    
    .speed-selector-close {
        width: 30px;
        height: 30px;
        border: none;
        background: var(--border-light);
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background var(--transition);
    }

    .speed-selector-close:hover {
        background: var(--border);
    }
    
    .speed-selector-list {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
        justify-content: center;
        gap: 10px;
        padding: 15px;
    }
    
    .speed-item {
        width: calc(33.33% - 7px);
        padding: 12px 8px;
        text-align: center;
        background: var(--border-light);
        border-radius: var(--radius-sm);
        font-size: 15px;
        font-weight: 500;
        color: var(--text);
        cursor: pointer;
        transition: all var(--transition);
        border: 2px solid transparent;
    }
    
    .speed-item:hover {
        background: var(--primary-bg);
        color: var(--primary);
    }
    
    .speed-item.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        border-color: transparent;
    }
}

.ab-selector-card {
    position: fixed;
    z-index: 1000;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
}

.ab-selector-card.show {
    display: flex;
}

.speed-selector-card {
    position: fixed;
    z-index: 1001;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
}

.speed-selector-card.show {
    display: flex;
}

@media (max-width: 768px) {
    .ab-selector-card {
        bottom: -100%;
        left: 0;
        right: 0;
        height: 80vh;
        border-radius: 16px 16px 0 0;
        transition: bottom 0.3s ease;
    }

    .ab-selector-card.show {
        bottom: 0;
    }

    .speed-selector-card {
        bottom: -100%;
        left: 0;
        right: 0;
        height: 35vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transition: bottom 0.3s ease;
    }

    .speed-selector-card.show {
        bottom: 0;
    }
}

@media (min-width: 769px) {
    .ab-selector-card {
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(0.9);
        height: 70vh;
        width: 500px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .ab-selector-card.show {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    .speed-selector-card {
        position: absolute;
        top: auto;
        left: auto;
        right: auto;
        transform: translateY(-10px) scale(0.95);
        width: 280px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.2s ease;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .speed-selector-card.show {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}
