/* Player Styles */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --gray-color: #636e72;
}

/* Player Container */
.player-container {
    background: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

/* Video Player */
#video-player {
    width: 100%;
    height: auto;
    min-height: 500px;
    background: #000;
}

/* Player Controls */
.player-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
    cursor: pointer;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-btn.active {
    background: var(--primary-color);
}

.control-btn.primary {
    background: var(--primary-color);
    color: white;
}

.control-btn.primary:hover {
    background: var(--secondary-color);
}

/* Volume Slider */
.volume-slider {
    width: 100px;
    -webkit-appearance: none;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

/* Channel Info */
.channel-info {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
}

.channel-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.channel-meta {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.channel-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.channel-card.active {
    border: 2px solid var(--primary-color);
}

.channel-logo {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    overflow: hidden;
}

.channel-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.channel-content {
    padding: 10px;
}

.channel-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-category {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.channel-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.channel-favorite.active {
    background: var(--warning-color);
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Quality Selector */
.quality-selector {
    position: relative;
}

.quality-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 120px;
    display: none;
    z-index: 1000;
}

.quality-menu.show {
    display: block;
}

.quality-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.quality-option:hover {
    background: var(--light-color);
}

.quality-option.active {
    background: var(--primary-color);
    color: white;
}

/* Ad Overlay */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    text-align: center;
}

.ad-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

/* Fullscreen */
body.fullscreen {
    overflow: hidden;
}

body.fullscreen .player-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0;
    border-radius: 0;
}

body.fullscreen #video-player {
    height: 100vh;
    min-height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    #video-player {
        min-height: 300px;
    }
    
    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}