/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 应用加载状态 */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

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

@keyframes loading {
    0% { width: 0%; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0%); }
    100% { width: 100%; transform: translateX(100%); }
}

/* 防止双击缩放 */
*, *:before, *:after {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* 允许文本选择的元素 */
.subtitle-english,
.subtitle-chinese,
.word-meaning,
input,
textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

html {
    height: 100%;
    position: relative;
    overflow-x: hidden;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
}

.app {
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.app[style*="display: none"] {
    display: none !important;
}

/* 页面管理 - 优化版本 */
.page {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    max-width: 100vw;
    min-height: calc(100vh - 60px);
    opacity: 0;
    transform: translateX(100%);
    /* 减少动画时间，避免和字幕卡片动画冲突 */
    transition: all 0.2s ease;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
    visibility: hidden;
    /* 优化GPU加速 */
    will-change: transform, opacity;
}

.page.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 10;
    visibility: visible;
}

.page.prev {
    transform: translateX(-100%);
}

/* 头部样式 */
.header {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(15px) !important;
    padding: 0.4rem 0.5rem 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    max-height: 60px !important;
    min-height: 60px !important;
    height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(78, 205, 196, 0.3);
}

.header-content {
    text-align: center;
    flex: 1;
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header p {
    text-align: center;
    opacity: 0.8;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 0.5rem;
    transform: translateY(-50%);
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) translateX(-2px);
}

/* 设置按钮 */
.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    z-index: 10;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) rotate(180deg);
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-panel:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.settings-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    min-width: 320px;
    max-width: 90vw;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.settings-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-close:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: rotate(180deg);
}

.settings-body {
    padding: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    margin: 0 0 0.25rem 0;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.setting-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.3;
}

/* 开关切换按钮 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border-color: #4ecdc4;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 容器 */
.container {
    padding: 0.5rem;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: calc(100vh - 60px);
    padding-bottom: 4rem;
}

/* 电影网格 */
.movie-grid {
    display: grid;
    gap: 1rem;
    margin-top: 0.5rem;
}

.movie-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.movie-card:hover::before {
    transform: scaleX(1);
}

.movie-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.movie-poster {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.movie-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.movie-year {
    opacity: 0.7;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.movie-genre {
    opacity: 0.8;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.movie-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.movie-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 当前卡片容器 */
.current-card-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: auto;
    padding: 1rem 0 3rem 0;
}

/* 完成消息 */
.completion-message {
    text-align: center;
    padding: 3rem 2rem;
    opacity: 1;
    transition: all 0.3s ease;
}

.completion-message.hidden {
    display: none !important;
}

.completion-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

.completion-message h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-message p {
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-restart {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 进度条 */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    margin: 0;
    transition: opacity 0.3s ease;
}

.progress-bar[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 0;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -18px;
    right: 8px;
    font-size: 0.65rem;
    opacity: 0.8;
    z-index: 10;
}

/* 过滤器 */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-bar select {
    flex: 1;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    padding: 0.8rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.filter-bar select option {
    background: #1a1a2e;
    color: white;
}

/* 卡片容器 */
.card-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 6rem;
}

/* 单词卡片 */
.word-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.word-card.learned {
    opacity: 0.5;
    transform: scale(0.95);
    pointer-events: none;
}

.word-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.word-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4ecdc4;
}

.word-frequency {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.word-meaning {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.word-details {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.word-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.word-detail-label {
    font-weight: 500;
    color: #ff6b6b;
    min-width: 60px;
}

.word-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-learned {
    flex: 1;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-learned:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.btn-skip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 字幕卡片 */
.subtitle-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.2rem;
    /* 简化transition，减少卡顿 */
    transition: transform 0.2s ease, opacity 0.2s ease;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    margin: 0 auto 2rem auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    overflow-x: hidden;
    max-height: none;
    /* 强制GPU加速 */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.subtitle-card.completed {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    pointer-events: none;
    /* 加快退出动画 */
    transition: all 0.15s ease;
}

/* 字幕时间容器 */
.subtitle-time-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.subtitle-time-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 1;
    max-width: 200px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.subtitle-time {
    font-size: 0.7rem;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
    text-align: center;
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

.audio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* 固定宽度，防止抖动 */
    height: 20px;
    flex-shrink: 0; /* 防止压缩 */
    cursor: pointer;
    transition: color 0.3s ease;
}

.audio-icon i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.audio-icon:hover i {
    color: rgba(255, 255, 255, 0.8);
}

/* 播放状态样式 */
.audio-icon.playing i {
    color: #4ecdc4;
    animation: pulse 1s infinite;
}

/* 字幕导航按钮 */
.btn-prev-subtitle,
.btn-next-subtitle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.btn-prev-subtitle:hover:not(:disabled),
.btn-next-subtitle:hover:not(:disabled) {
    background: rgba(78, 205, 196, 0.3);
    border-color: rgba(78, 205, 196, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.btn-prev-subtitle:active:not(:disabled),
.btn-next-subtitle:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-prev-subtitle:disabled,
.btn-next-subtitle:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-prev-subtitle:disabled:hover,
.btn-next-subtitle:disabled:hover {
    transform: none;
    box-shadow: none;
}

.subtitle-english {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #4ecdc4;
    font-weight: 500;
    text-align: center;
    padding: 0.8rem;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 12px;
    border-left: 3px solid #4ecdc4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.subtitle-chinese {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 常用搭配 */
.subtitle-collocations {
    margin-bottom: 1.2rem;
}

.subtitle-collocations h4 {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    opacity: 0.8;
    color: #ff6b6b;
}

.collocation-item {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 0.4rem;
}

.collocation-text {
    color: #ff6b6b;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.collocation-meaning {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 单词详情 */
.subtitle-words {
    margin-bottom: 1.5rem;
}

.subtitle-words h4 {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
    color: #4ecdc4;
}

.word-grid {
    display: grid;
    gap: 0.6rem;
}

.word-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    word-break: break-word;
}

.word-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.word-item.expanded {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
    transform: none;
}

/* 展开的详细信息区域 */
.word-detail-expanded {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

.word-detail-section {
    margin-bottom: 1rem;
}

.word-detail-section:last-child {
    margin-bottom: 0;
}

.word-detail-section h5 {
    font-size: 0.9rem;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.detail-grid-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.detail-grid-horizontal .detail-item {
    /* 继承父级样式即可 */
}

.detail-label {
    color: #ff6b6b;
    font-weight: 500;
    display: block;
    margin-bottom: 0.2rem;
}

.detail-value {
    color: white;
    font-weight: 400;
}

.example-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 8px;
    font-style: italic;
    line-height: 1.4;
    border-left: 3px solid #4ecdc4;
}

.common-meaning-text {
    background: rgba(255, 107, 107, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    line-height: 1.4;
    border-left: 3px solid #ff6b6b;
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}



.word-text {
    font-size: 1rem;
    font-weight: 600;
    color: #4ecdc4;
}

.word-level {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 500;
}

.word-phonetic {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.4rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    overflow-wrap: break-word;
}

.word-meaning {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.word-pos {
    font-size: 0.7rem;
    opacity: 0.6;
    font-style: italic;
}

.subtitle-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.btn-complete {
    flex: 1;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 205, 196, 0.3);
}

.btn-skip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 浮动统计 */
.floating-stats {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    z-index: 1000;
}

/* 键盘快捷键提示 */
.keyboard-shortcuts-hint {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.keyboard-shortcuts-hint:hover {
    opacity: 1;
}

.shortcuts-content {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.shortcuts-content i {
    color: #4ecdc4;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 1rem;
        width: 100%;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.25rem;
    }
    
    .subtitle-card {
        padding: 1rem;
    }
    
    /* 移动端字幕时间容器优化 */
    .subtitle-time-container {
        gap: 0.8rem;
    }
    
    .subtitle-time-wrapper {
        max-width: 160px;
        gap: 0.4rem;
        padding: 0.3rem 0.6rem;
    }
    
    .subtitle-time {
        font-size: 0.65rem;
    }
    
    .audio-icon {
        width: 16px;
        height: 16px;
    }
    
    .audio-icon i {
        font-size: 0.7rem;
    }
    
    /* 移动端导航按钮优化 */
    .btn-prev-subtitle,
    .btn-next-subtitle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        /* 增加触摸区域 */
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-prev-subtitle:hover:not(:disabled),
    .btn-next-subtitle:hover:not(:disabled) {
        /* 移动端减少hover效果，避免触摸问题 */
        transform: scale(1.05);
    }
    
    .word-phonetic {
        font-size: 0.7rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    .detail-grid-horizontal {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .word-detail-section h5 {
        font-size: 0.8rem;
    }
    
    .detail-item {
        padding: 0.4rem;
    }
    
    .example-text,
    .common-meaning-text {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* 移动端隐藏键盘快捷键提示 */
    .keyboard-shortcuts-hint {
        display: none;
    }
}

/* 动画 - 优化版本 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle-card {
    /* 减少动画时间，提升响应速度 */
    animation: slideIn 0.2s ease forwards;
    /* 确保动画完成后保持正确的高度 */
    animation-fill-mode: both;
    /* 优化性能 */
    will-change: transform, opacity;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff5252, #26a69a);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #ff4444, #20a085);
}

/* 确保滚动区域 - 优化版本 */
.page {
    /* 默认禁用smooth滚动，避免和强制滚动冲突 */
    scroll-behavior: auto;
    overscroll-behavior: contain;
}

.container {
    overscroll-behavior: contain;
}

/* 滚动时禁用动画，避免冲突 */
.scrolling * {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
}

/* 移动端滚动优化 */
@supports (-webkit-overflow-scrolling: touch) {
    .page,
    .container {
        -webkit-overflow-scrolling: touch;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
} 