* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    direction: rtl;
}
.container { max-width: 900px; margin: 0 auto; padding: 20px; }
h1 { text-align: center; margin: 30px 0; font-size: 2em; color: #6c63ff; }
h2 { margin-bottom: 15px; font-size: 1.4em; }
.card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #2a2a4a;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}
.btn-primary { background: #6c63ff; color: #fff; }
.btn-primary:hover { background: #5a52e0; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: #2ecc71; color: #fff; }
.btn-success:hover { background: #27ae60; }
.btn-secondary { background: #3a3a5c; color: #fff; }
.btn-secondary:hover { background: #4a4a6c; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.video-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}
.video-container video {
    width: 100%;
    display: block;
    background: #111;
    object-fit: contain;
}
.video-container.small video { max-height: 300px; }
.video-label {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.status-bar {
    background: #16213e;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 14px;
}
.status-bar .dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-left: 8px;
}
.dot-green { background: #2ecc71; }
.dot-red { background: #e74c3c; }
.dot-yellow { background: #f1c40f; }

.room-url {
    background: #0f0f1a;
    border: 1px solid #3a3a5c;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 18px;
    text-align: center;
    direction: ltr;
    color: #6c63ff;
    word-break: break-all;
}
.copy-btn {
    background: #3a3a5c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
}
.copy-btn:hover { background: #4a4a6c; }

.viewer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.viewer-badge {
    background: #2a2a4a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}
.viewer-badge.connected { background: #2ecc71; color: #fff; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; color: #aaa; }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    background: #0f0f1a;
    border: 1px solid #3a3a5c;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}
.form-group input:focus { outline: none; border-color: #6c63ff; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
}
.alert-error { background: #2c1010; border: 1px solid #e74c3c; color: #e74c3c; }
.alert-success { background: #0a2e1a; border: 1px solid #2ecc71; color: #2ecc71; }
.alert-info { background: #0a1a2e; border: 1px solid #3498db; color: #3498db; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.flex-center { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.loading .spinner {
    display: inline-block;
    width: 40px; height: 40px;
    border: 4px solid #2a2a4a;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}
.step.active { color: #6c63ff; }
.step.done { color: #2ecc71; }
.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a4a;
    font-size: 13px;
    font-weight: bold;
}
.step.active .step-num { background: #6c63ff; color: #fff; }
.step.done .step-num { background: #2ecc71; color: #fff; }

.video-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.video-container .video-controls.show { opacity: 1; }
.video-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-controls button:hover { background: rgba(255,255,255,0.4); }

.video-container:fullscreen, .video-container:-webkit-full-screen {
    width: 100vw !important; height: 100vh !important;
    max-width: none; max-height: none;
    background: #000;
    display: flex; align-items: center; justify-content: center;
}
.video-container:fullscreen video, .video-container:-webkit-full-screen video {
    width: 100%; height: 100%;
    object-fit: contain;
}
.video-container:fullscreen .video-label, .video-container:-webkit-full-screen .video-label {
    display: none;
}

@media (max-width: 600px) {
    .container { padding: 10px; }
    h1 { font-size: 1.5em; }
    .card { padding: 16px; }
    .room-url { font-size: 14px; }
}
