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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
}

.comparison-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 40px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
    border-radius: 4px;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-before {
    clip-path: polygon(0 0, var(--slider-position, 50%) 0, var(--slider-position, 50%) 100%, 0 100%);
    z-index: 1;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Default slider position */
    bottom: 0;
    width: 4px;
    z-index: 3;
    transform: translateX(-50%);
    cursor: ew-resize;
}

.handle-line {
    position: absolute;
    width: 4px;
    height: 100%;
    background-color: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.handle-arrow {
    font-size: 10px;
    color: #555;
    position: absolute;
}

.handle-arrow.left {
    left: 8px;
}

.handle-arrow.right {
    right: 8px;
}

.video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

button {
    padding: 8px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.label-left, .label-right {
    font-weight: bold;
    color: #555;
    font-size: 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .handle-circle {
        width: 30px;
        height: 30px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
}