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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    min-height: 100vh;
    padding: 20px;

    display: flex;
    flex-direction: column;
}


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

    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;

    flex: 1;
    display: flex;
    flex-direction: column;
}


/* Header Styles */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.session-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.join-group {
    display: flex;
    gap: 10px;
}

.session-status {
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.session-status.active {
    display: block;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #fff;
    color: #667eea;
}

.btn-primary:hover {
    background: #f0f0f0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.5);
}

.btn-add {
    width: 100%;
    background: #667eea;
    color: white;
    margin-top: 20px;
}

.btn-add:hover {
    background: #5568d3;
}

/* Input Styles */
input[type="text"],
input[type="url"] {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="url"]:focus {
    outline: none;
    border-color: white;
    background: white;
}

#sessionInput {
    width: 150px;
}

/* App Layout */
.app-layout {
    flex: 1;
    display: flex;
    min-height: 0;
}


/* Sidebar */
.sidebar {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.search-container {
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Song List */
.song-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.song-list::-webkit-scrollbar {
    width: 8px;
}

.song-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.song-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

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

.song-item {
    padding: 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.song-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.song-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.song-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.song-artist {
    font-size: 0.9rem;
    opacity: 0.7;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}


.iframe-container {
    flex: 1;
    position: relative;
    min-height: 0;
}

#placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

#placeholder.hidden {
    display: none;
}

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

.placeholder-icon {
    font-size: 6rem;
    display: block;
    margin-bottom: 20px;
}

.placeholder-content h2 {
    color: #333;
    margin-bottom: 10px;
}

.placeholder-content p {
    color: #666;
    font-size: 1.1rem;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

iframe.active {
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        max-height: 400px;
    }

    .main-content {
        min-height: 500px;
    }

    header h1 {
        font-size: 2rem;
    }

    .session-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .join-group {
        width: 100%;
    }

    #sessionInput {
        flex: 1;
    }
}

/* Icon */
.icon {
    font-size: 1.2rem;
}

.fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;

    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.8);
}
