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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 0;
}

.video-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.video-id, .timestamp {
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #64748b;
}

/* Main Content */
main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.video-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#videoPlayer {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.control-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.progress-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #64748b;
    min-width: 80px;
}

/* Transcript */
.transcript-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.transcript-header h3 {
    color: #1e3c72;
    font-weight: 600;
}

.transcript-controls {
    display: flex;
    gap: 8px;
}

.transcript-controls button {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.transcript-controls button:hover,
.transcript-controls button.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.transcript-segment {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.transcript-segment:hover {
    background: #f8fafc;
    border-left-color: #3b82f6;
}

.transcript-segment.active {
    background: #eff6ff;
    border-left-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.segment-time {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    cursor: pointer;
}

.segment-time:hover {
    text-decoration: underline;
}

.segment-speaker {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
}

.segment-text {
    color: #374151;
    line-height: 1.5;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #1e3c72;
}

.share-options {
    display: flex;
    gap: 12px;
    align-items: center;
}

#shareUrl {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    header {
        padding: 20px;
    }
    
    .video-container,
    .transcript-container {
        padding: 20px;
    }
    
    .video-controls {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .transcript-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .transcript-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
}