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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
}

.video-player {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container {
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    max-height: 500px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 20px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    z-index: 10;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.video-info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.video-info p {
    line-height: 1.6;
}

.autoplay-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.autoplay-control label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.autoplay-control input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.list-header {
    margin-bottom: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

@media (max-width: 480px) {
    .header-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .season-selector {
        width: 100%;
    }
    
    .season-selector select {
        flex: 1;
    }
}

.video-container, .video-list {
    min-width: 0;
}

.video-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.video-item:hover {
    background: #cbd3da;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-item.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.video-item.unavailable {
    opacity: 0.6;
}

.video-details {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-status {
    font-size: 1.2rem;
    opacity: 0.6;
    margin-left: 10px;
}

.video-item.active .video-status {
    opacity: 1;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

@media (max-width: 968px) {
    .video-player {
        grid-template-columns: 1fr;
    }
    
    .video-list {
        order: 1;
    }
    
    .video-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 15px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #007bff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .page-numbers {
    display: flex;
    gap: 5px;
}

.pagination .page-numbers button {
    min-width: 32px;
    padding: 8px;
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .video-player {
        padding: 20px;
        gap: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}
