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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 25px;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #d0d0d0;
}

header p {
    font-size: 1em;
    opacity: 0.8;
    color: #a0a0a0;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.card {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 100%;
}

.card h2 {
    color: #c0c0c0;
    margin-bottom: 30px;
    text-align: center;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #0a0a0a;
    color: #e0e0e0;
}

.form-group input:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.2);
}

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

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    color: #d0d0d0;
    border: 1px solid #4a4a4a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    border-color: #8b4513;
}

.btn-secondary {
    background: #2a2a2a;
    color: #b0b0b0;
    border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
    background: #3a3a3a;
    border-color: #4a4a4a;
    transform: translateY(-2px);
}

.btn-danger {
    background: #8b0000;
    color: white;
    border: 2px solid #a00000;
}

.btn-danger:hover {
    background: #a00000;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    color: #666;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #333;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.error-message {
    background: #2a0000;
    color: #ff6b6b;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #8b0000;
}

footer {
    text-align: center;
    color: #808080;
    margin-top: 40px;
    opacity: 0.7;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: modalFadeIn 0.3s ease-in-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    color: #c0c0c0;
    margin-bottom: 15px;
    text-align: center;
}

.modal-content p {
    color: #a0a0a0;
    margin-bottom: 25px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    font-size: 16px;
    background: #0a0a0a;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.modal-content input:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.2);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.room-header h1 {
    margin: 0;
    color: #d0d0d0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#roomInfo {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(42, 42, 42, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #3a3a3a;
}

#roomIdDisplay {
    color: #b0b0b0;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.room-main {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.room-content .section:last-child {
    grid-column: 1 / -1;
}

.section {
    background: #0a0a0a;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #333;
}

.section h2 {
    color: #c0c0c0;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
}

.user-name {
    font-weight: 600;
    color: #b0b0b0;
}

.admin-badge {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    color: #d0d0d0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #8b4513;
}

.audio-controls {
    display: flex;
    gap: 15px;
}

.file-upload {
    display: flex;
    gap: 15px;
    align-items: center;
}

.file-upload input[type="file"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    background: #0a0a0a;
    color: #b0b0b0;
}

.file-upload input[type="file"]::file-selector-button {
    background: #2a2a2a;
    color: #c0c0c0;
    border: 1px solid #3a3a3a;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

.file-upload input[type="file"]::file-selector-button:hover {
    background: #3a3a3a;
    border-color: #8b4513;
}

.audio-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-file-item {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
}

.audio-file-name {
    font-weight: 600;
    color: #b0b0b0;
}

.audio-file-controls {
    display: flex;
    gap: 10px;
}

.empty-message {
    color: #666;
    text-align: center;
    padding: 20px;
}

.status-messages {
    max-height: 200px;
    overflow-y: auto;
}

.status-messages::-webkit-scrollbar {
    width: 8px;
}

.status-messages::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 10px;
}

.status-messages::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 10px;
}

.status-message {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #1a1a1a;
    border-left: 4px solid #4a4a4a;
    font-size: 14px;
    color: #a0a0a0;
}

.status-message.success {
    border-left-color: #4a7c4a;
    color: #80c080;
}

.status-message.error {
    border-left-color: #7c4a4a;
    background: #1a1010;
    color: #c08080;
}

.status-message.info {
    border-left-color: #8b4513;
    color: #b08060;
}

.chat-messages {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 10px;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 8px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    font-size: 14px;
    word-wrap: break-word;
}

.chat-message-sender {
    font-weight: 600;
    color: #8b4513;
    margin-bottom: 2px;
    font-size: 12px;
}

.chat-message-text {
    color: #b0b0b0;
    line-height: 1.4;
}

.chat-message-time {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

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

.chat-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    font-size: 14px;
    background: #0a0a0a;
    color: #e0e0e0;
}

.chat-input-group input:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.2);
}

.chat-input-group button {
    padding: 10px 20px;
    white-space: nowrap;
}

.chat-empty {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .room-content {
        grid-template-columns: 1fr;
    }
    
    .room-content .section:last-child {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .room-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .audio-controls {
        flex-direction: column;
    }
    
    .file-upload {
        flex-direction: column;
    }
    
    .chat-input-group {
        flex-direction: column;
    }
}
