/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 15px;
    color: #34495e;
}

/* Sections */
.section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

/* Username Display */
.username-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.display-input {
    font-weight: bold;
    color: #2c3e50;
    background-color: transparent;
    border: none;
    width: auto;
    flex-grow: 1;
}

.display-input:disabled {
    opacity: 1;
    cursor: default;
}

#current-username {
    font-weight: bold;
    color: #2c3e50;
}

.icon-btn {
    background-color: transparent;
    color: #666;
    padding: 5px 8px;
    font-size: 16px;
    box-shadow: none;
}

.icon-btn:hover {
    background-color: #e0e0e0;
}

.secondary-btn {
    background-color: #95a5a6;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

/* Username Control */
.username-control {
    margin-bottom: 15px;
}

.username-control span {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

/* Form Elements */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* Room List */
.rooms-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.room-info {
    flex: 1;
}

.room-name {
    font-weight: bold;
    font-size: 18px;
}

.room-participants {
    color: #666;
    font-size: 14px;
}

#no-rooms-message {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Video Elements */
.video-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.video-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: black;
    width: 300px;
    height: 225px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.remote-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#toggle-video-btn, #toggle-audio-btn {
    background-color: #2ecc71;
}

#toggle-video-btn.off, #toggle-audio-btn.off {
    background-color: #e74c3c;
}

#leave-room-btn {
    background-color: #e74c3c;
}

#leave-room-btn:hover {
    background-color: #c0392b;
}