.player-section {
    flex-shrink: 0;
    background: #000;
    position: relative;
}

.player-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: #000;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

#videoPlayer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    cursor: pointer;
    background: #000;
}

/* ===== FULLSCREEN FIX ===== */
/* Video will NEVER rotate or stretch */
.player-wrapper:fullscreen,
.player-wrapper:-webkit-full-screen,
.player-wrapper:-moz-full-screen {
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.player-wrapper:fullscreen .video-container,
.player-wrapper:-webkit-full-screen .video-container,
.player-wrapper:-moz-full-screen .video-container {
    padding-top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}

.player-wrapper:fullscreen #videoPlayer,
.player-wrapper:-webkit-full-screen #videoPlayer,
.player-wrapper:-moz-full-screen #videoPlayer {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}

/* Player Overlay */
.player-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.9));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.player-wrapper:hover .player-overlay,
.player-wrapper.controls-visible .player-overlay {
    opacity: 1;
    pointer-events: auto;
}
.player-wrapper.hide-overlay .player-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

.now-playing {
    padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
}
.now-playing-logo {
    width: 36px; height: 36px; border-radius: 6px;
    object-fit: contain; background: #222;
}
.now-playing-info h3 { margin: 0 0 2px 0; font-size: 13px; }
.now-playing-info span { color: var(--text-muted); font-size: 10px; }

.live-badge {
    background: var(--danger); color: white;
    padding: 2px 6px; border-radius: 3px;
    font-size: 9px; font-weight: bold;
    animation: pulse 2s infinite; margin-left: auto;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.custom-controls {
    padding: 8px 10px;
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}

.ctrl-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    border: none; color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    font-size: 12px;
}
.ctrl-btn:hover { background: var(--primary); color: #000; }
.ctrl-btn.active { background: var(--primary); color: #000; }

.volume-wrapper {
    display: flex; align-items: center; gap: 6px;
    flex: 1; min-width: 80px;
}
.volume-slider {
    flex: 1; height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 10px; outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.time-display {
    font-size: 10px; color: var(--text-muted);
    font-family: monospace;
}

.stats-overlay {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,0.85);
    padding: 8px; border-radius: var(--radius-sm);
    font-family: monospace; font-size: 9px;
    display: none; z-index: 10;
}
.stats-overlay.visible { display: block; }
.stats-overlay div {
    display: flex; justify-content: space-between;
    gap: 12px; margin-bottom: 2px;
}
.stats-overlay span:first-child { color: var(--text-muted); }
.stats-overlay span:last-child { color: var(--primary); }

.quality-badge {
    position: absolute; top: 8px; right: 8px;
    background: linear-gradient(135deg, var(--gold), #ff8c00);
    color: #000; padding: 2px 6px;
    border-radius: 4px; font-size: 9px; font-weight: bold;
}

/* Player States */
.player-state {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 5;
}
.player-state.hidden { display: none; }

.loading-spinner {
    position: relative; width: 60px; height: 60px;
}
.loading-spinner .circle {
    position: absolute; width: 100%; height: 100%;
    border: 3px solid transparent; border-radius: 50%;
}
.loading-spinner .circle:nth-child(1) { border-top-color: var(--primary); animation: spin3d 1.5s linear infinite; }
.loading-spinner .circle:nth-child(2) { border-right-color: var(--secondary); animation: spin3d 1.5s linear infinite 0.2s; }
.loading-spinner .circle:nth-child(3) { border-bottom-color: var(--accent); animation: spin3d 1.5s linear infinite 0.4s; }
.loading-spinner .circle:nth-child(4) {
    width: 40px; height: 40px; top: 10px; left: 10px;
    border-left-color: var(--gold);
    animation: spin3d 1s linear infinite reverse;
}
@keyframes spin3d {
    0% { transform: rotate(0deg) rotateX(30deg); }
    100% { transform: rotate(360deg) rotateX(30deg); }
}

.loading-dots {
    display: flex; gap: 6px; margin-top: 20px;
}
.loading-dots span {
    width: 8px; height: 8px;
    background: var(--primary); border-radius: 50%;
    animation: dotPulse 1.4s infinite;
}
.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--secondary); }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; background: var(--accent); }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.player-state p {
    margin: 15px 0 0 0;
    color: var(--text-muted);
    text-align: center; font-size: 12px;
}

.player-state.error .big-icon {
    font-size: 40px; color: var(--danger); margin-bottom: 10px;
}

.retry-btn {
    margin-top: 12px; padding: 8px 20px;
    background: var(--primary); color: #000;
    border: none; border-radius: var(--radius-sm);
    font-weight: bold; cursor: pointer; font-size: 12px;
}

.player-state.idle-state {
    background: linear-gradient(135deg, rgba(10,10,15,0.95), rgba(26,26,46,0.95));
}
.idle-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #000;
    animation: floatIcon 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(0,255,136,0.3);
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
