/* Video Detail Page Styles */

.video-detail-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    max-width: 100%;
}

.video-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.video-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-layout {
    display: flex;
    height: 100%;
    position: relative;
}

/* Left Panel */
.left-panel {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
}

/* Right Panel */
.right-panel {
    flex: 1;
    background-color: var(--gray-50);
    overflow-y: auto;
}

/* Resize Handle */
.resize-handle {
    width: 4px;
    background-color: var(--gray-200);
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.resize-handle:hover {
    background-color: var(--primary-color);
}

.resize-handle.dragging {
    background-color: var(--primary-color);
}

.resize-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background-color: var(--gray-400);
    border-radius: 1px;
}

/* Video Player */
.video-player-container {
    background-color: var(--black);
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Content Language Switch */
.video-content-language-switch {
    background-color: var(--white);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.video-content-language-switch span {
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
}

.video-lang-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.video-lang-btn:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-800);
    text-decoration: none;
}

.video-lang-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.video-lang-btn.active:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* Content Tabs */
.content-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-tabs .nav-tabs {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0;
    padding: 0 1rem;
}

.content-tabs .tab-content {
    flex: 1;
    overflow: hidden;
}

.content-tabs .tab-pane {
    height: 100%;
    overflow-y: auto;
}

/* Subtitles */
.subtitles-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.subtitles-header {
    padding: 1rem;
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.subtitles-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.subtitle-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    background-color: var(--gray-50);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subtitle-item:hover {
    background-color: var(--gray-100);
    border-left-color: var(--gray-300);
}

.subtitle-item.active {
    background-color: rgba(0, 122, 255, 0.1);
    border-left-color: var(--primary-color);
}

.subtitle-time {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.subtitle-text {
    margin-top: 0.25rem;
    color: var(--gray-900);
    line-height: 1.5;
}

/* 当前激活字幕样式 - 温和的深蓝色 */
.subtitle-line.current .subtitle-text {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
}

.subtitle-controls {
    display: flex;
    gap: 0.5rem;
}

/* Content */
.content-container {
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
}

.content-item {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.content-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.content-meta {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-body {
    color: var(--gray-700);
    line-height: 1.7;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: var(--gray-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-body h1:first-child,
.content-body h2:first-child,
.content-body h3:first-child {
    margin-top: 0;
}

.content-body p {
    margin-bottom: 1rem;
}

.content-body ul,
.content-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body blockquote {
    background-color: var(--gray-50);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
}

.content-body code {
    background-color: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--gray-800);
}

.content-body pre {
    background-color: var(--gray-900);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
}

.content-body pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-body table th,
.content-body table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.content-body table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-900);
}

/* Annotations */
.annotations-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.annotations-header {
    padding: 1rem;
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.annotations-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    width: 100%;
}



.annotation-item {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.annotation-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.annotation-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125rem rgba(0, 122, 255, 0.25);
}

.annotation-time {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.annotation-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.annotation-content {
    color: var(--gray-700);
    line-height: 1.5;
    font-size: 0.875rem;
}

.annotation-position {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-500);
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-detail-container {
        height: auto;
    }
    
    .video-layout {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .right-panel {
        flex: none;
        height: 400px;
    }
    
    .resize-handle {
        display: none;
    }
    
    .video-header .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .video-header .col-md-4 {
        text-align: left !important;
    }
    
    .video-title {
        font-size: 1.5rem;
    }
    
    .content-tabs .nav-tabs {
        padding: 0 0.5rem;
    }
    
    .subtitles-content,
    .content-container,
    .annotations-content {
        padding: 0.75rem;
    }
    
    .content-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .subtitle-line.current .subtitle-text {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    .video-header {
        padding: 0.5rem 0;
    }
    
    .video-title {
        font-size: 1.25rem;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .subtitle-item,
    .annotation-item {
        padding: 0.75rem;
    }
    
    .content-item {
        padding: 0.75rem;
    }

    .subtitle-line.current .subtitle-text {
        font-size: 0.8rem !important;
    }
} 

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .video-detail-container {
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
    
    body {
        background-color: var(--gray-100);
    }
}