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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header Styles */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Video Player Section */
.video-player-section {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-controls-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    border-radius: 10px;
    padding: 20px 20px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.video-controls-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* Barra de progreso */
.progress-container {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 5px;



}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(218, 214, 214, 0.875);
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 5px;
}

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

.progress-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #667eea;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.time-display {
    color: #fff;
    font-size: 14px;
    text-align: right;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}


.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-controls-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 20;
    opacity: 1;
    pointer-events: all;
}

.video-controls-wrapper.hide-controls {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Custom Controls */
.custom-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.control-btn.play {
    background: linear-gradient(135deg, #007bff 0%, #00bcd4 100%);
}

.control-btn.pause {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.control-btn.stop {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.control-btn.prev {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.control-btn.next {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Video List Section */
.video-list-section {
    background: #8ec5fc;
    /* Soft blue-gray background */
    border-radius: 20px;
    padding: 30px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.video-list-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2d3436;
    font-size: 2em;
    font-weight: 700;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-card {
    background: white;
    /* Changed from #f8f9fa to white for better contrast against the new section background */
    border-radius: 12px;
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    border-color: #667eea;
}

.video-card.selected {
    background: #1e9c2f;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.video-info {
    padding: 15px;
    background: white;
}

.video-info h3 {
    margin: 0;
    font-size: 1.1em;
    color: #2d3436;
    font-weight: 600;
}

.video-desc {
    margin: 0;
    font-size: 0.9em;
    color: #636e72;
    line-height: 1.4;
}

.video-info p {
    font-size: 0.9em;
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive Design */
.video-player-section {
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 15px 15px;
    margin-bottom: 20px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.video-container {
    border-radius: 8px;
}

.container {
    padding: 0;
}

header {
    padding: 20px 10px 10px;
    margin-bottom: 0;
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .video-controls-wrapper {
        padding: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .custom-controls {
        gap: 4px;
        margin-top: 5px;
    }

    .time-display {
        font-size: 11px;
    }

    .progress-container {
        margin-top: 5px;
        margin-bottom: 2px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-list-section h2 {
        font-size: 1.2em;
    }

    .video-info h3 {
        font-size: 1em;
    }

    .video-info p {
        font-size: 0.8em;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .control-btn:active {
        transform: scale(0.95);
    }

    .video-card {
        cursor: default;
    }

    .video-card:active {
        transform: scale(0.98);
    }
}