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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #5a67d8;
    margin-bottom: 20px;
}

.room-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-info input {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    min-width: 200px;
}

.room-info button {
    padding: 10px 20px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.room-info button:hover {
    background: #4c51bf;
}

#currentRoom {
    background: #48bb78;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

main {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.controls button {
    padding: 12px 24px;
    margin: 0 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#startShare {
    background: #48bb78;
    color: white;
}

#startShare:hover:not(:disabled) {
    background: #38a169;
}

#stopShare {
    background: #f56565;
    color: white;
}

#stopShare:hover:not(:disabled) {
    background: #e53e3e;
}

.controls button:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
}

.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.status.connected {
    background: #c6f6d5;
    color: #22543d;
}

.status.sharing {
    background: #bee3f8;
    color: #2a4365;
}

.status.error {
    background: #fed7d7;
    color: #742a2a;
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.local-video, .remote-videos {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.local-video h3, .remote-videos h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

video {
    width: 100%;
    height: 300px;
    background: #2d3748;
    border-radius: 6px;
    object-fit: contain;
}

.video-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.fullscreen-video {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain;
    background: black;
}

.remote-video {
    margin-bottom: 15px;
}

.remote-video h4 {
    margin-bottom: 10px;
    color: #718096;
    font-size: 14px;
}

#remoteVideos:empty::after {
    content: "No remote screens connected";
    display: block;
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

.participants {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.participants h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

.participants ul {
    list-style: none;
}

.participants li {
    background: white;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #5a67d8;
}

@media (max-width: 768px) {
    .room-info {
        flex-direction: column;
    }
    
    .room-info input {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    .video-container {
        grid-template-columns: 1fr;
    }
    
    .controls button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}