/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2c3e50;
    position: relative;
}

/* 优化的背景 - 减少重绘 */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -2;
    will-change: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 带导航按钮的头部 */
.header-with-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin-bottom: 20px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.header-left {
    flex: 1;
}

.header-left h1 {
    margin-bottom: 8px;
    font-size: 2.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left .subtitle {
    font-size: 1.1em;
    color: #6c757d;
    font-weight: 400;
    margin: 0;
}

.header-right {
    flex-shrink: 0;
    margin-left: 20px;
}

/* 优化的英雄头部样式 */
.hero-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    transform: translateZ(0);
    will-change: auto;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50px;
    margin-bottom: 30px;
    font-size: 0.9em;
    font-weight: 600;
    color: #667eea;
    backdrop-filter: blur(10px);
}

.badge-icon {
    font-size: 1.2em;
}

.hero-title {
    margin-bottom: 15px;
}

.title-gradient {
    font-size: 2.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* 移除复杂动画以提升性能 */

.hero-subtitle {
    font-size: 1.3em;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    font-weight: 500;
    color: #2c3e50;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.feature-icon {
    font-size: 1.5em;
}

/* 操作栏样式 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.action-left {
    flex: 1;
}

.section-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1em;
    color: #7f8c8d;
    font-weight: 400;
}

.btn-upload {
    padding: 15px 30px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-icon {
    font-size: 1.2em;
}

/* 导航返回按钮 */
.nav-back {
    margin-bottom: 20px;
}

/* 右对齐导航按钮 */
.nav-back-right {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    max-width: 1200px;
}

/* 对称布局的头部 */
.list-header-with-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-back-left {
    flex-shrink: 0;
}

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

.list-header-center h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8em;
}

.nav-placeholder {
    flex-shrink: 0;
    width: 120px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 列表页面头部 */
.list-header {
    margin-bottom: 30px;
    padding: 20px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.list-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8em;
}

/* 上传区域 */
.upload-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-box h3 {
    margin: 15px 0;
    color: #2c3e50;
    font-weight: 600;
}

.upload-box p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.upload-box.dragover {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #e8ecff 0%, #f0f3ff 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
}

/* 上传进度 */
.upload-progress {
    margin-top: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.upload-box {
    text-align: center;
    padding: 50px 40px;
    border: 3px dashed #667eea;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #e8ecff 0%, #f0f3ff 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.file-info {
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
    color: #667eea;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* 状态消息 */
.status-message {
    padding: 18px 24px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: center;
    font-weight: 500;
    font-size: 1em;
    animation: slideIn 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.status-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.2);
}

.status-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2);
}

.retry-hint {
    margin-top: 10px;
    padding: 10px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 8px;
    font-size: 0.9em;
    color: #6c757d;
    border-left: 3px solid #6c757d;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.2);
}

/* 字幕列表容器 */
.subtitle-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 字幕卡片 */
.subtitle-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.subtitle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.subtitle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    font-size: 2em;
}

.card-title h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2c3e50;
    word-break: break-word;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.card-info {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95em;
}

.info-label {
    color: #7f8c8d;
    font-weight: 500;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
}

.card-footer {
    padding-top: 15px;
    border-top: 2px solid #ecf0f1;
}

.btn-play {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    text-align: center;
    text-decoration: none;
    display: block;
}

/* 改进的空状态 */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: emptyGlow 12s ease-in-out infinite;
}

@keyframes emptyGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, -10%) scale(1.1); }
}

.empty-illustration {
    position: relative;
    margin-bottom: 40px;
}

.empty-icon {
    font-size: 6em;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.5em;
    opacity: 0.6;
    animation: sparkleFloat 4s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 30%;
    right: 20%;
    animation-delay: 1.3s;
}

.sparkle:nth-child(3) {
    bottom: 20%;
    left: 30%;
    animation-delay: 2.6s;
}

@keyframes sparkleFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-15px) scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

.empty-state h3 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.empty-state p {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.btn-get-started {
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-get-started:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 状态消息 */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 控制面板 */
.controls-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.playback-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.control-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #3498db;
}

.stats {
    display: flex;
    justify-content: space-around;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    border-radius: 16px;
    flex-wrap: wrap;
    gap: 20px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.stats span {
    font-size: 1em;
    color: #666;
}

.stats strong {
    color: #3498db;
    font-size: 1.2em;
}

/* 内容区域 - Flexbox 布局 */
.content-section {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.main-content h2 {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
    font-weight: 700;
}

.subtitle-container {
    height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.subtitle-item {
    padding: 18px;
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #e1e4e8;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.subtitle-item:hover {
    border-left-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    transform: translateX(3px);
}

.subtitle-item.active {
    border-left-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.subtitle-time {
    display: inline-block;
    font-size: 0.8em;
    color: #95a5a6;
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

/* 英文字幕样式 */
.subtitle-english {
    font-size: 1.2em;
    line-height: 1.8;
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
}

/* 中文字幕样式 */
.subtitle-chinese {
    font-size: 1em;
    line-height: 1.6;
    color: #666;
    font-style: italic;
    padding-left: 5px;
    border-left: 3px solid #e0e0e0;
}

.highlight-word {
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-block;
}

/* 数据库中的单词 */
.highlight-word.db-word {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
    border-bottom: 2px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.highlight-word.db-word:hover {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: white;
    transform: scale(1.08) translateY(-2px);
    border-bottom-color: #e0a800;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* 智能识别的单词 */
.highlight-word.smart-word {
    background: #f8d7da;
    color: #721c24;
    border-bottom: 2px solid #f5c6cb;
}

.highlight-word.smart-word:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.05);
    border-bottom-color: #c0392b;
}

/* 词汇侧边栏 */
.vocabulary-sidebar {
    width: 340px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.vocabulary-sidebar h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.4em;
    text-align: center;
    font-weight: 700;
}

.vocab-stats {
    text-align: center;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 6px;
    margin-bottom: 20px;
}

.vocab-stats span {
    font-size: 0.95em;
    color: #666;
}

.vocab-stats strong {
    color: #3498db;
    font-size: 1.3em;
    font-weight: 700;
}

.vocabulary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 600px;
    overflow-y: auto;
    padding-right: 5px;
}

.vocab-item {
    padding: 12px 15px;
    background: #fafbfc;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e1e4e8;
}

.vocab-item:hover {
    background: #e8f4f8;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
    border-left-color: #2980b9;
}

.vocab-item:hover .vocab-word {
    color: white !important;
}

.vocab-item:hover .vocab-translate {
    color: white;
}

.vocab-word {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* 数据库单词 */
.vocab-word.db-word {
    color: #2c3e50;
}

/* 智能识别单词 */
.vocab-word.smart-word {
    color: #e74c3c;
}

.vocab-translate {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    line-height: 1.4;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #667eea;
}

#modalWord {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

#modalTranslate {
    font-size: 1.3em;
    color: #555;
    line-height: 1.6;
}

/* 滚动条样式 */
.subtitle-container::-webkit-scrollbar,
.vocabulary-list::-webkit-scrollbar {
    width: 6px;
}

.subtitle-container::-webkit-scrollbar-track,
.vocabulary-list::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.subtitle-container::-webkit-scrollbar-thumb,
.vocabulary-list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.subtitle-container::-webkit-scrollbar-thumb:hover,
.vocabulary-list::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-section {
        flex-direction: column;
    }
    
    .vocabulary-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .upload-section,
    .controls-section,
    .main-content {
        padding: 20px;
    }
    
    .playback-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
        text-align: center;
    }
    
    .subtitle-english {
        font-size: 1.1em;
    }
    
    .subtitle-chinese {
        font-size: 0.95em;
    }
    
    .vocabulary-sidebar {
        padding: 15px;
    }
}

/* 管理页面样式 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.admin-content {
    margin-top: 30px;
}

.list-stats {
    margin-left: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.list-stats strong {
    color: #3498db;
    font-size: 1.2em;
}

.admin-subtitle-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e4e8;
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ecf0f1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

/* 模态框大尺寸 */
.modal-large {
    max-width: 800px;
    margin: 5% auto;
}

.modal-body {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
}

.form-text {
    color: #7f8c8d;
    font-size: 0.95em;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.detail-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-info p {
    margin: 10px 0;
    font-size: 1em;
    color: #2c3e50;
}

.detail-info strong {
    color: #3498db;
    margin-right: 10px;
}

.detail-content,
.detail-vocabulary {
    margin-top: 25px;
}

.detail-content h3,
.detail-vocabulary h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.subtitle-preview {
    max-height: 400px;
    overflow-y: auto;
    background: #fafbfc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.subtitle-index {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle-text {
    margin-left: 10px;
}

.vocabulary-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.warning-text {
    color: #e74c3c;
    font-weight: 600;
    margin: 15px 0;
    font-size: 1.1em;
}

/* Loading 状态 */
.loading {
    color: #3498db;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 文件选择相关样式 */
.selected-files {
    margin-top: 20px;
}

.file-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.file-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.file-list ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.file-list li {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95em;
    border-left: 3px solid #3498db;
}

.info-text {
    color: #3498db;
    font-weight: 600;
    padding: 12px;
    background: #e8f4f8;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
}

.group-name-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.group-name-section label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.word-display h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-list .btn {
    margin-top: 15px;
    width: 100%;
}

/* 学习模式选择页面样式 */

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

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

.btn-back-home,
.btn-back-group {
    display: inline-block;
    padding: 12px 24px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 10px;
    border: 2px solid #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.btn-back-home:hover,
.btn-back-group:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.learning-mode-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.mode-card {
    background: white;
    border-radius: 16px;
    padding: 35px;
    border: 2px solid #e8ecf1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.mode-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    text-align: center;
}

.mode-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
    font-weight: 700;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.mode-features li {
    padding: 6px 0;
    font-size: 0.9em;
    color: #5a6c7d;
    display: flex;
    align-items: center;
}

.mode-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* 底部统计框 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e8ecf1;
}

.stat-box {
    background: white;
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    border: 2px solid #e8ecf1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.6em;
    color: #2c3e50;
    font-weight: 700;
}

.mode-btn:active {
    transform: translateY(0);
}

.mode-btn:disabled {
    opacity: 0.4;
}

.btn-know-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(46, 204, 113, 0.4);
}

.btn-dont-know-modern {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.btn-dont-know-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(231, 76, 60, 0.4);
}

/* 单词导航控制样式 */
.word-navigation {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin: 0 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.4);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.word-dots {
    display: flex;
    gap: 8px;
    margin: 0 20px;
    max-width: 200px;
    overflow-x: auto;
    padding: 5px;
}

.word-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.word-dot.active {
    background: #4a90e2;
    transform: scale(1.3);
}

.word-dot.completed {
    background: #2ecc71;
}

.word-dot:hover {
    transform: scale(1.2);
}



/* 响应式 - 管理页面 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn-sm {
        width: 100%;
    }
    
    .modal-large {
        max-width: 95%;
        margin: 10% auto;
    }
    
    .vocabulary-preview {
        grid-template-columns: 1fr;
    }
    
    .learning-mode-container {
        grid-template-columns: 1fr;
    }
    
    .mode-card {
        padding: 30px 20px;
    }
    
    .learning-mode-container {
        grid-template-columns: 1fr;
    }
    
    .stats-card {
        grid-template-columns: 1fr;
    }
    
    .word-card {
        padding: 30px 20px;
        min-height: 300px;
    }
    
    .word-display {
        font-size: 2.5em;
    }
    
    .word-translation {
        font-size: 1.4em;
    }
    
    .word-controls {
        flex-direction: column;
    }
}
