/**
 * Video Hosting Platform - Video Player Styles
 */

/* Player Container */
.vhp-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--vhp-radius, 12px);
    overflow: hidden;
}

.vhp-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.vhp-player {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hide native controls when custom controls are visible */
.vhp-video-player.controls-visible .vhp-player::-webkit-media-controls {
    display: none !important;
}

/* Custom Controls */
.vhp-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 40px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vhp-video-player.controls-visible .vhp-player-controls,
.vhp-video-player:hover .vhp-player-controls {
    opacity: 1;
}

/* Progress Bar */
.vhp-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: height 0.1s ease;
}

.vhp-progress-bar:hover {
    height: 6px;
}

.vhp-progress-filled {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    position: relative;
}

.vhp-progress-filled::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    transition: transform 0.1s ease;
}

.vhp-progress-bar:hover .vhp-progress-filled::after {
    transform: translateY(-50%) scale(1);
}

/* Controls Row */
.vhp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vhp-controls-left,
.vhp-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Control Buttons */
.vhp-player-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.vhp-player-controls button:hover {
    background: rgba(255,255,255,0.1);
}

/* Icons (using CSS shapes) */
.vhp-icon-play::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #fff;
}

.vhp-icon-pause::before {
    content: '';
    display: block;
    width: 12px;
    height: 16px;
    border-left: 4px solid #fff;
    border-right: 4px solid #fff;
}

.vhp-icon-volume::before {
    content: '🔊';
    font-size: 16px;
}

.vhp-icon-volume-mute::before {
    content: '🔇';
    font-size: 16px;
}

.vhp-icon-volume-low::before {
    content: '🔉';
    font-size: 16px;
}

.vhp-icon-fullscreen::before {
    content: '⛶';
    font-size: 18px;
}

/* Volume Control */
.vhp-volume-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vhp-volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.vhp-volume-control:hover .vhp-volume-slider {
    width: 60px;
    opacity: 1;
}

.vhp-volume-slider {
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.vhp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Time Display */
.vhp-time-display {
    color: #fff;
    font-size: 13px;
    font-family: monospace;
}

/* Quality Selector */
.vhp-quality-selector {
    position: relative;
}

.vhp-btn-quality {
    font-size: 12px;
    font-weight: 500;
}

.vhp-quality-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(28,28,28,0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 100px;
    display: none;
    list-style: none;
    margin: 0 0 8px;
}

.vhp-quality-menu.visible {
    display: block;
}

.vhp-quality-menu li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    transition: background 0.2s ease;
}

.vhp-quality-menu li:hover {
    background: rgba(255,255,255,0.1);
}

.vhp-quality-menu li.active {
    color: #3ea6ff;
}

/* Buffering State */
.vhp-video-player.buffering::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vhp-spin 1s linear infinite;
}

@keyframes vhp-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Fullscreen */
.vhp-video-player:fullscreen {
    border-radius: 0;
}

.vhp-video-player:fullscreen .vhp-player {
    height: 100vh;
}

/* Radio Player */
.vhp-radio-player-container {
    max-width: 600px;
    margin: 0 auto 40px;
}

.vhp-radio-player {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--vhp-radius, 12px);
    padding: 32px;
    color: #fff;
    text-align: center;
}

.vhp-radio-artwork {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
}

.vhp-radio-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Radio Visualizer */
.vhp-radio-visualizer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    height: 30px;
    align-items: flex-end;
}

.vhp-radio-visualizer span {
    width: 4px;
    background: #fff;
    border-radius: 2px;
    height: 10px;
    transition: height 0.1s ease;
}

.vhp-radio-visualizer.active span {
    animation: vhp-visualizer 0.5s ease-in-out infinite alternate;
}

.vhp-radio-visualizer.active span:nth-child(1) { animation-delay: 0s; }
.vhp-radio-visualizer.active span:nth-child(2) { animation-delay: 0.1s; }
.vhp-radio-visualizer.active span:nth-child(3) { animation-delay: 0.2s; }
.vhp-radio-visualizer.active span:nth-child(4) { animation-delay: 0.3s; }
.vhp-radio-visualizer.active span:nth-child(5) { animation-delay: 0.4s; }

@keyframes vhp-visualizer {
    from { height: 10px; }
    to { height: 30px; }
}

/* Radio Status */
.vhp-radio-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.vhp-radio-status.live {
    background: #ff0000;
}

.vhp-radio-status.offline {
    background: rgba(255,255,255,0.2);
}

.vhp-live-indicator {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: vhp-pulse 1.5s ease-in-out infinite;
}

@keyframes vhp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Now Playing */
.vhp-now-playing {
    margin-bottom: 24px;
}

.vhp-now-playing .vhp-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vhp-program-title {
    font-size: 24px;
    font-weight: 600;
    margin: 8px 0;
}

.vhp-program-host {
    color: rgba(255,255,255,0.8);
}

/* Radio Controls */
.vhp-radio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.vhp-radio-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.vhp-radio-play-btn:hover {
    transform: scale(1.1);
}

.vhp-radio-play-btn .vhp-icon-play::before {
    border-color: transparent transparent transparent #1a1a2e;
}

.vhp-radio-play-btn .vhp-icon-pause::before {
    border-color: #1a1a2e;
}

.vhp-radio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vhp-radio-volume-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
}

.vhp-radio-volume-slider {
    width: 80px;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.vhp-radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Listener Count */
.vhp-listener-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* Radio Schedule */
.vhp-radio-schedule {
    margin-top: 40px;
}

.vhp-radio-schedule h2 {
    margin-bottom: 24px;
}

.vhp-schedule-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.vhp-schedule-day h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--vhp-text);
}

.vhp-programs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vhp-program {
    padding: 12px;
    background: var(--vhp-bg-secondary, #f9f9f9);
    border-radius: 8px;
    margin-bottom: 8px;
}

.vhp-program-time {
    font-size: 12px;
    color: var(--vhp-text-secondary, #606060);
    display: block;
    margin-bottom: 4px;
}

.vhp-program-name {
    font-weight: 500;
    display: block;
}

.vhp-program .vhp-program-host {
    font-size: 12px;
    color: var(--vhp-text-secondary, #606060);
}

/* Offline Message */
.vhp-offline-message {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}

/* Loading State */
.vhp-radio-player.loading .vhp-radio-play-btn {
    opacity: 0.5;
    pointer-events: none;
}
