* {
    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;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #4a90e2;
    font-size: 2.5rem;
    font-weight: 700;
}

.header h1 i {
    margin-right: 15px;
    color: #e74c3c;
}

.room-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.room-id {
    font-weight: 600;
    color: #4a90e2;
    font-size: 1.1rem;
}

.user-count {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.share-url {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 10px;
    word-break: break-all;
    border: 2px solid #4a90e2;
}

.hidden {
    display: none !important;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

.ktv-room {
    display: contents;
}

.users-section,
.music-player-section,
.chat-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.users-section h2,
.music-player-section h2,
.chat-section h2 {
    color: #4a90e2;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.mic-btn,
.speaker-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mic-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.mic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.mic-btn.active {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.speaker-btn {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.speaker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.speaker-btn.active {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.users-list {
    max-height: 400px;
    overflow-y: auto;
}

.loading-users {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    padding: 20px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.user-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-item.current-user {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border: 2px solid #4a90e2;
}

.user-avatar {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.user-status {
    font-size: 0.8rem;
    color: #666;
}

.user-mic-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
    position: absolute;
    top: 10px;
    right: 10px;
}

.user-mic-status.active {
    background: #28a745;
    animation: pulse 1.5s infinite;
}

.music-player {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.song-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.song-info img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.song-details h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.song-details p {
    color: #666;
    font-size: 1rem;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-btn {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
}

.music-upload {
    text-align: center;
}

.file-input {
    display: none;
}

.upload-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
}

.welcome-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a90e2;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    padding: 20px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.own {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    margin-left: auto;
}

.chat-message.other {
    background: #e9ecef;
    color: #333;
}

.chat-message.system {
    background: #fff3cd;
    color: #856404;
    text-align: center;
    max-width: 100%;
    font-style: italic;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.message-avatar {
    font-size: 1.2rem;
}

.message-content {
    line-height: 1.4;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #4a90e2;
}

.send-btn {
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
}

.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.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    color: #4a90e2;
    margin-bottom: 30px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.input-group label {
    font-weight: 600;
    color: #333;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #4a90e2;
}

.setup-buttons {
    margin-top: 20px;
}

.join-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.connection-status {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-indicator.connecting {
    background: rgba(255, 193, 7, 0.9);
}

.status-indicator.connected {
    background: rgba(40, 167, 69, 0.9);
}

.status-indicator.disconnected {
    background: rgba(220, 53, 69, 0.9);
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    font-size: 0.9rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .room-info {
        flex-direction: row;
        gap: 20px;
    }
    
    .song-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-controls {
        flex-direction: row;
    }
    
    .chat-container {
        height: 300px;
    }
}

.users-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.users-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.users-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 3px;
}

.users-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #357abd;
} 