.video-comparison {
    background: white;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.video-comparison::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.contributors {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    margin-top: -40px;
    text-align: center;
}

.contributors h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contributor-text {
    max-width: 800px;
    margin: 0 auto;
}

.contributor-text p {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 400;
}

.contributor-text sup {
    color: #667eea;
    font-weight: 600;
    font-size: 0.75em;
}

.affiliations {
    font-size: 0.9rem !important;
    color: #666 !important;
    font-weight: 400 !important;
    font-style: italic;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.affiliations sup {
    color: #667eea;
    font-weight: 600;
    font-style: normal;
}

@media (max-width: 768px) {
    .contributors {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .contributors h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .contributor-text p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .affiliations {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 480px) {
    .contributors {
        padding: 12px;
    }
    
    .contributors h2 {
        font-size: 1.2rem;
    }
    
    .contributor-text p {
        font-size: 0.7rem;
    }
    
    .affiliations {
        font-size: 0.6rem !important;
    }
}

.video-comparison h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
}

.video-comparison h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.video-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.video-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transition: left 0.5s ease;
}

.video-panel:hover::before {
    left: 100%;
}

.video-panel:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.video-panel h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #000;
    border-radius: 8px;
}



.upload-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border: 2px dashed #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.upload-area:hover {
    background: linear-gradient(135deg, #667eea30, #764ba230);
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-area.dragover {
    background: linear-gradient(135deg, #667eea40, #764ba240);
    border-color: #f5576c;
    transform: scale(1.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

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

.upload-area div:last-child {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 500;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 1.1rem;
    text-align: center;
    z-index: 1;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f1f3f4;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.play-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
    min-width: 100px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sync-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.sync-btn, .analyze-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.sync-btn::before, .analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sync-btn:hover::before, .analyze-btn:hover::before {
    left: 100%;
}

.sync-btn:hover, .analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.analyze-btn {
    background: linear-gradient(135deg, #010e8b, #7c00b6);
    box-shadow: 0 4px 15px rgba(7, 7, 7, 0.3);
}

.analyze-btn:hover {
    box-shadow: 0 6px 20px rgba(66, 115, 248, 0.4);
}

.keypoints-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.keypoints-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.keypoints-panel:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.1);
}

.keypoints-panel h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.keypoints-content {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.keypoints-content::-webkit-scrollbar {
    width: 6px;
}

.keypoints-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.keypoints-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 3px;
}

.keypoint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.keypoint-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.keypoint-item:hover::before {
    transform: scaleY(1);
}

.keypoint-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.1);
}

.keypoint-name {
    font-weight: 600;
    color: #2c3e50;
}

.keypoint-coords {
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 500;
    background: #f0f4ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.comparison-stats {
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.comparison-stats h4 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feedback-section {
    margin: 60px 0;
    padding: 40px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feedback-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2rem;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feedback-card {
    background: #f1f3f5;
    padding: 25px 30px;
    border-radius: 10px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.feedback-card h3 {
    margin-bottom: 15px;
    color: #5c5c5c;
    font-size: 1.4rem;
}

.feedback-card p {
    line-height: 1.6;
    font-size: 1rem;
    color: #555;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -moz-background-clip: text;

    color: transparent;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}

@media (max-width: 1024px) {
    .video-container,
    .keypoints-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-comparison {
        padding: 40px 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .video-comparison {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    
    .video-comparison h2 {
        font-size: 1.8rem;
    }
    
    .video-wrapper {
        height: 200px;
    }
    
    .video-panel {
        padding: 20px;
    }
    
    .controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sync-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .sync-btn, .analyze-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .video-comparison h2 {
        font-size: 1.5rem;
    }
    
    .video-wrapper {
        height: 150px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-area div:last-child {
        font-size: 0.9rem;
    }
    
    .keypoints-panel,
    .video-panel {
        padding: 15px;
    }
    
    .comparison-stats {
        padding: 20px;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.success {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #28a74510, #20c99710);
}

.error {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #dc354510, #c8254510);
}

.success .stat-value {
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error .stat-value {
    background: linear-gradient(135deg, #dc3545, #c82545);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}