body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #1a1a1a;
    padding: 10px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.room-list-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.room-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

.room-item {
    padding: 15px;
    border-bottom: 1px solid #333;
    background-color: #1e1e1e;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-item:last-child {
    border-bottom: none;
}

.room-item:hover {
    background-color: #2a2a2a;
}

.room-item .room-name {
    font-weight: bold;
}

.room-item .user-count {
    background-color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.join-btn {
    background-color: #4169E1;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.join-btn:hover {
    background-color: #3151b5;
}

.manual-join {
    margin-top: 20px;
    text-align: center;
}

.manual-join input {
    padding: 10px;
    width: 250px;
    border: 1px solid #333;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #fff;
}

.manual-join button {
    padding: 10px 15px;
    background-color: #4169E1;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #000;
    display: none;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.video-container:hover .controls {
    opacity: 1;
}

.back-btn {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.room-info {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 5px;
    z-index: 10;
}

.fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 10;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 20;
}

.loading-spinner {
    border: 5px solid #333;
    border-top: 5px solid #4169E1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}