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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 30px;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    min-width: 200px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

select {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

select:hover {
    border-color: #667eea;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

#joinBtn {
    background: #667eea;
    color: white;
}

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

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

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.status p {
    margin: 5px 0;
    font-size: 16px;
    color: #555;
}

.status span {
    font-weight: bold;
    color: #667eea;
}

.status .info {
    margin-top: 10px;
    padding: 10px;
    background: #e6f7ff;
    border-left: 4px solid #1890ff;
    border-radius: 4px;
    color: #0050b3;
    font-size: 14px;
}

.videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.video-section {
    display: flex;
    flex-direction: column;
}

.video-label {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    padding: 0 5px;
}

.video-container {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
}

.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 16px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-controls.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

#volumeSlider {
    width: 100px;
    height: 5px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.video-container.web-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
}

.video-container.web-fullscreen video {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    object-fit: cover;
}

video {
    width: 100%;
    height: auto;
    min-height: 400px;
    display: block;
    background: #1a202c;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .videos {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.8em;
    }

    .controls {
        flex-direction: column;
    }

    input[type="text"], button {
        width: 100%;
    }
}
