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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

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

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    font-size: 2em;
    text-align: center;
}

.main-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.playlist-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.playlist-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.load-options {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.or-text {
    color: #666;
    font-weight: 500;
}

.url-input-group {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

#fileInput {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
}

#urlInput {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

#urlInput:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

.player-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: 500px;
}

@media (max-width: 968px) {
    .player-layout {
        grid-template-columns: 1fr;
    }
}

.channel-list {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.channel-list h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.search-box {
    margin-bottom: 15px;
}

#searchInput {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
}

.channels {
    overflow-y: auto;
    flex: 1;
    max-height: 600px;
}

.channels::-webkit-scrollbar {
    width: 8px;
}

.channels::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.channels::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.channels::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.no-channels {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.channel-item:hover {
    background: #f0f0ff;
    transform: translateX(5px);
}

.channel-item.active {
    background: #667eea;
    color: white;
    border-color: #5568d3;
}

.channel-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #f5f5f5;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-group {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.channel-item.active .channel-group {
    color: rgba(255, 255, 255, 0.8);
}

.player-section {
    display: flex;
    flex-direction: column;
}

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

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
}

.current-channel {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.unmute-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    font-size: 18px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    border: 3px solid white;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    pointer-events: auto;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.unmute-btn:hover {
    background: rgba(85, 104, 211, 0.95);
    transform: translate(-50%, -50%) scale(1.05);
}

.player-info {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
}

.status {
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.status.info {
    background: #e3f2fd;
    color: #1976d2;
}

.status.success {
    background: #e8f5e9;
    color: #388e3c;
}

.status.warning {
    background: #fff3e0;
    color: #f57c00;
}

.status.error {
    background: #ffebee;
    color: #d32f2f;
}
