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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Стили для аутентификации */
.auth-section {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.auth-form input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.user-info {
    background: rgba(76, 175, 80, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #4CAF50;
}

.status {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.connected { background: rgba(76, 175, 80, 0.3); border: 2px solid #4CAF50; }
.disconnected { background: rgba(244, 67, 54, 0.3); border: 2px solid #F44336; }
.connecting { background: rgba(255, 193, 7, 0.3); border: 2px solid #FFC107; }

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

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

.video-box {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
}

.video-box h3 {
    margin-bottom: 10px;
    color: #fff;
}

video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    background: #000;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

button {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: linear-gradient(45deg, #FF6B6B, #FFA726);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.btn-success { background: linear-gradient(45deg, #4CAF50, #8BC34A); }
.btn-danger { background: linear-gradient(45deg, #F44336, #FF5252); }
.btn-info { background: linear-gradient(45deg, #2196F3, #03A9F4); }
.btn-warning { background: linear-gradient(45deg, #FF9800, #FFB74D); }

.device-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.device-btn {
    padding: 10px 15px;
    font-size: 14px;
}

.logs {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.log-entry {
    margin-bottom: 8px;
    padding: 5px;
    border-left: 3px solid;
    padding-left: 10px;
}

.log-info { border-color: #2196F3; color: #90CAF9; }
.log-success { border-color: #4CAF50; color: #A5D6A7; }
.log-warning { border-color: #FFC107; color: #FFE082; }
.log-error { border-color: #F44336; color: #EF9A9A; }

.users-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.user-item {
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.call-btn {
    padding: 5px 10px;
    font-size: 12px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
}

.hidden {
    display: none !important;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    margin-right: 8px;
}

.offline-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F44336;
    margin-right: 8px;
}
