/* Main Videoke Styles - Combined & Optimized */
#videoke-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-y: auto;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h2 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

#videoke-search {
    flex: 1;
    padding: 15px;
    border: 2px solid #ff6b6b;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
}

#search-btn {
    padding: 15px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.search-filter {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.search-filter.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.song-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.song-card:hover {
    transform: translateY(-5px);
}

.song-thumbnail {
    font-size: 4em;
    margin-bottom: 15px;
    position: relative;
}

.song-thumbnail img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.quality-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.6em;
}

.song-source {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.6em;
}

.song-info h3 {
    margin: 10px 0 5px;
    color: #333;
}

.artist {
    color: #666;
    font-weight: bold;
}

.song-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.9em;
    margin-top: 10px;
}

.play-song {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.play-song:hover {
    background: #45b7af;
}

#videoke-player {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.player-container {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    color: white;
}

.video-container {
    position: relative;
    background: black;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

#karaoke-video, #camera-preview video {
    width: 100%;
    max-height: 500px;
}

#visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#start-camera { background: #4ecdc4; color: white; }
#start-recording { background: #ff6b6b; color: white; }
#stop-recording { background: #ff0000; color: white; }
#invite-duet { background: #ffd166; color: #333; }

.controls button:disabled {
    background: #666;
    cursor: not-allowed;
}

.featured-content {
    text-align: center;
}

.featured-header h2 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.quick-search-suggestions {
    margin: 40px 0;
}

.suggestion-chips {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.suggestion-chip {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chip:hover {
    background: #ff6b6b;
    color: white;
}

.search-tips {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
    text-align: left;
}

.search-tips ul {
    list-style: none;
    padding: 0;
}

.search-tips li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.search-tips li:before {
    content: "💡";
    position: absolute;
    left: 0;
}

.search-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.search-message {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px 0;
}

.floating-camera {
    position: fixed;
    width: 200px;
    height: 200px;
    background: #1a1a1a;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    top: 80px;
    right: 20px;
    border: 3px solid #4ecdc4;
    overflow: hidden;
    transition: all 0.3s ease;
    resize: both;
    min-width: 200px;
    min-height: 200px;
}

.floating-camera.expanded {
    width: 400px;
    height: 300px;
    border-radius: 15px;
}

.floating-camera.minimized {
    width: 60px !important;
    height: 60px !important;
}

.camera-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    cursor: move;
}

.camera-controls {
    display: flex;
    gap: 5px;
}

.camera-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s ease;
}

.camera-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.camera-feed {
    width: 100%;
    height: calc(100% - 60px);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-placeholder {
    text-align: center;
    color: #666;
    padding: 20px;
}

.camera-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.camera-placeholder button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 12px;
}

.camera-placeholder button:hover {
    background: #45b7af;
}

.camera-footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 5px;
    text-align: center;
    border-top: 1px solid #333;
}

.drag-handle {
    color: rgba(255, 255, 255, 0.5);
    cursor: move;
    font-size: 16px;
    line-height: 1;
}

.floating-camera video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: border-radius 0.3s ease;
}

.floating-camera.expanded video {
    border-radius: 10px;
}

.floating-camera.recording::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 12px;
    height: 12px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulse 1s infinite;
    z-index: 10002;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

#floating-camera {
    z-index: 10001 !important;
}

#partner-camera-feed:not(.duet-mode) {
    display: none !important;
}

.featured-content,
.search-results,
.playlist-results {
    overflow-y: auto;
    position: static;
    height: auto;
}

body:not(.videoke-fullscreen) {
    overflow: auto;
    position: static;
    height: auto;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #videoke-search, #search-btn {
        border-radius: 25px;
        margin-bottom: 10px;
    }
    
    .suggestion-chips {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-chip {
        width: 200px;
    }

    .floating-camera {
        width: 120px !important;
        height: 120px !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 10002 !important;
    }
    
    .floating-camera.expanded {
        width: 280px !important;
        height: 210px !important;
    }
    
    .floating-camera.minimized {
        width: 60px !important;
        height: 60px !important;
    }
    
    .camera-header {
        padding: 4px 8px !important;
        font-size: 9px !important;
    }
    
    .camera-btn {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
    }
}