/* styles.css */

/* --- ОБЩИЕ НАСТРОЙКИ И СБРОС --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #333;
}

/* --- БЛОК ЦЕНТРИРОВАНИЯ ДЛЯ АВТОРИЗАЦИИ --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#auth-blocks {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

#form-title {
    margin: 0 0 25px 0;
    font-weight: 600;
    color: #2d3748;
}

input {
    width: calc(100% - 22px);
    padding: 12px 10px;
    margin-bottom: 20px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #667eea;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
button:hover { background: #5a67d8; }
button:active { transform: scale(0.98); }

#toggle-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
}
#toggle-link:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* --- СТИЛИ ДЛЯ ВИДЕОЧАТА (app.html) --- */
#chat-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#log { 
    background: #edf2f7; 
    border: 1px solid #cbd5e0; 
    padding: 10px; 
    height: 120px; 
    overflow-y: scroll; 
    margin-top: 20px; 
    text-align: left;
    border-radius: 6px;
    width: 100%;
    max-width: 500px;
    font-family: Consolas, monospace;
    font-size: 13px;
}
.disconnected { color: #e53e3c; font-weight: bold; }

.video-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    width: 100%;
}
video { 
    width: 100%; 
    max-width: 480px; 
    height: auto; 
    background: #000; 
    border-radius: 8px;
    object-fit: cover;
}

.chat-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}
#msgInput {
    flex-grow: 1;
    margin-bottom: 0;
}