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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    min-height: 100vh;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.channel-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.channel-selector label {
    font-weight: bold;
    font-size: 1.1em;
}

#channelSelect {
    padding: 10px 15px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    min-width: 200px;
    cursor: pointer;
}

#channelSelect:focus {
    outline: 2px solid #4CAF50;
}

.channel-info {
    display: flex;
    gap: 15px;
    color: #e0e0e0;
    font-size: 0.9em;
}

.player-container {
    position: relative;
    min-height: 600px;
}

.loading-screen,
.no-channel-screen,
.error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.no-channel-screen .icon {
    font-size: 4em;
    margin-top: 20px;
    opacity: 0.7;
}

.player-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#videoPlayer {
    width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    margin-bottom: 20px;
    background: black;
}

.video-info {
    text-align: center;
}

#currentVideoTitle {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

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

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#autoplayStatus {
    color: #4CAF50;
    font-weight: bold;
    padding: 8px 15px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.error-screen {
    color: #ff6b6b;
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2em;
    }

    .channel-selector {
        flex-direction: column;
        gap: 10px;
    }

    #channelSelect {
        min-width: 100%;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .control-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Loading states */
.player-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.player-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}