/* styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    overflow-x: auto;
    overflow-y: auto;
}

.container {
    background-color: #111;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
    padding: 40px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    border: 1px solid #333;
    margin: 20px auto;
    min-height: auto;
}

/* Mode selection buttons */
.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.mode-btn {
    background: linear-gradient(135deg, #444, #666);
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
}

.mode-btn:hover {
    background: linear-gradient(135deg, #555, #777);
}

h1 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 32px;
}

h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 24px;
}

h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 20px;
}

p {
    color: #ccc;
    margin-bottom: 15px;
}

button {
    background: linear-gradient(135deg, #333, #555);
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(135deg, #444, #666);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

button:disabled {
    background: #222;
    border-color: #222;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

select, input {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 16px;
    background-color: #222;
    color: #fff;
}

select option {
    background-color: #222;
    color: #fff;
}

input::placeholder {
    color: #666;
}

.hidden {
    display: none;
}

.code-display {
    font-size: 28px;
    font-weight: bold;
    padding: 20px;
    margin: 20px 0;
    background-color: #222;
    border-radius: 10px;
    letter-spacing: 3px;
    border: 1px solid #333;
}

#participants, #online-participants {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
    gap: 20px;
}

.participant {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #333;
}

.participant.speaking {
    border: 4px solid #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.participant-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.mute-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.kick-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.participant:hover .kick-btn {
    display: flex;
}

.kick-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

.report-btn {
    position: absolute;
    top: 5px;
    right: 35px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 165, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.participant:hover .report-btn {
    display: flex;
}

.report-btn:hover {
    background-color: rgba(255, 165, 0, 1);
}

/* Admin button styles */
.delete-room-btn {
    background-color: #d32f2f;
    border-color: #c62828;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
}

.delete-room-btn:hover {
    background-color: #f44336;
}

.ban-btn {
    position: absolute;
    top: 5px;
    left: 35px;
    width: 24px;
    height: 24px;
    background-color: #9C27B0;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.participant:hover .ban-btn {
    display: flex;
}

.ban-btn:hover {
    background-color: #7B1FA2;
}

.room-buttons {
    display: flex;
    align-items: center;
}

.ban-btn:hover {
    background-color: rgba(128, 0, 128, 1);
}

.controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

#mute-btn, #online-mute-btn {
    background: linear-gradient(135deg, #555, #777);
}

#mute-btn.muted, #online-mute-btn.muted {
    background: linear-gradient(135deg, #d32f2f, #f44336);
}

#leave-btn, #online-leave-btn {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    border-color: #c62828;
}

#leave-btn:hover, #online-leave-btn:hover {
    background: linear-gradient(135deg, #f44336, #ff6659);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    animation: notificationSlide 0.3s ease-out;
    border: 1px solid #555;
}

@keyframes notificationSlide {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.notification.hiding {
    animation: notificationSlideOut 0.3s ease-out forwards;
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

/* Online mode specific styles */
.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.room-info {
    text-align: left;
}

.room-info h3 {
    color: #fff;
    margin-bottom: 5px;
}

.room-info p {
    color: #999;
    font-size: 14px;
}

.join-room-btn {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: #4CAF50;
    padding: 8px 16px;
    margin: 0;
}

.join-room-btn:hover {
    background: linear-gradient(135deg, #66BB6A, #81C784);
}

.loading, .no-rooms {
    text-align: center;
    padding: 40px;
    color: #999;
}

#rooms-container, #admin-rooms-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

/* Smooth scrolling for room list */
#rooms-container::-webkit-scrollbar, #admin-rooms-container::-webkit-scrollbar {
    width: 6px;
}

#rooms-container::-webkit-scrollbar-track, #admin-rooms-container::-webkit-scrollbar-track {
    background: #111;
}

#rooms-container::-webkit-scrollbar-thumb, #admin-rooms-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

#rooms-container::-webkit-scrollbar-thumb:hover, #admin-rooms-container::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Input styles for room name */
#room-name-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 16px;
    background-color: #222;
    color: #fff;
}

#room-name-input::placeholder {
    color: #666;
}

/* Online mode button styles */
#online-mute-btn {
    background: linear-gradient(135deg, #555, #777);
}

#online-mute-btn.muted {
    background: linear-gradient(135deg, #d32f2f, #f44336);
}

#online-leave-btn {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    border-color: #c62828;
}

#online-leave-btn:hover {
    background: linear-gradient(135deg, #f44336, #ff6659);
}

/* Admin specific styles */
.admin-note {
    color: #ff5722;
    font-weight: bold;
    margin: 10px 0 20px;
}

#admin-login {
    max-width: 400px;
    margin: 0 auto;
}

#admin-panel {
    text-align: left;
}

#admin-panel h2 {
    text-align: center;
    margin-bottom: 25px;
}

#admin-panel h3 {
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin: 20px 0 15px;
}

#admin-ip-ban {
    margin: 30px 0;
}

#ip-to-ban {
    margin-bottom: 10px;
}

#ban-ip-btn {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
    border-color: #7B1FA2;
}

#ban-ip-btn:hover {
    background: linear-gradient(135deg, #673AB7, #9C27B0);
}

#admin-login-submit {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
    border-color: #1976D2;
}

#admin-login-submit:hover {
    background: linear-gradient(135deg, #03A9F4, #2196F3);
}

#admin-logout-btn {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    border-color: #c62828;
}

#admin-logout-btn:hover {
    background: linear-gradient(135deg, #f44336, #ff6659);
}

.admin-room-controls {
    display: flex;
    flex-direction: column;
}

.admin-join-btn {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: #4CAF50;
    padding: 8px 16px;
    margin: 0 0 5px 0;
}

.admin-join-btn:hover {
    background: linear-gradient(135deg, #66BB6A, #81C784);
}

.admin-delete-btn {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    border-color: #c62828;
    padding: 8px 16px;
    margin: 5px 0 0 0;
}

.admin-delete-btn:hover {
    background: linear-gradient(135deg, #f44336, #ff6659);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .participant {
        width: 80px;
        height: 80px;
    }
    
    .participant-name {
        bottom: -20px;
        font-size: 10px;
    }
    
    .code-display {
        font-size: 24px;
    }
    
    .controls {
        gap: 10px;
    }
    
    button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .room-item {
        flex-direction: column;
        text-align: center;
    }
    
    .join-room-btn, .admin-join-btn, .admin-delete-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .report-btn {
        right: 30px;
    }
    
    .admin-room-controls {
        width: 100%;
    }
}
