* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Селектор языка */
.language-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.language-selector-container label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.language-selector {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.language-selector:focus {
    border-color: #667eea;
}

/* Форма создания комнаты */
.room-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Результат создания комнаты */
.room-result {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.result-content h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.room-link {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #333;
    font-family: 'Courier New', monospace;
}

.btn-copy {
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.btn-copy:hover {
    background: #2980b9;
}

.password-display {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
}

.password-display strong {
    color: #2c3e50;
    margin-right: 10px;
}

.password-display span {
    color: #e74c3c;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.btn-join {
    display: block;
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* Информация */
.info-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.info-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.info-steps {
    padding-left: 20px;
    color: #34495e;
    line-height: 2;
}

.info-steps li {
    margin-bottom: 8px;
}

/* Секция планирования */
.schedule-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.schedule-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 20px;
}

.schedule-subtitle {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
}

.schedule-form {
    margin-bottom: 20px;
}

.btn-schedule {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-schedule:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.schedule-result {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #27ae60;
}

.schedule-result h4 {
    margin-bottom: 15px;
    color: #27ae60;
    font-size: 16px;
}

.schedule-hint {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .language-selector-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .language-selector-container label {
        width: 100%;
    }
    
    .language-selector {
        width: 100%;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .room-link {
        font-size: 12px;
        word-break: break-all;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .info-steps {
        padding-left: 15px;
        font-size: 14px;
    }
    
    .schedule-section {
        padding: 20px;
    }
    
    .schedule-section h3 {
        font-size: 18px;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .form-input,
    .btn-primary,
    .btn-schedule {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}

/* Улучшенная видимость элементов на мобильных */
@media (max-width: 768px) {
    .language-selector-container,
    .form-group,
    .btn-primary,
    .btn-schedule,
    .btn-copy,
    .btn-join {
        visibility: visible !important;
        display: block !important;
        opacity: 1 !important;
    }
}

/* Предотвращение перекрытия адресной строкой на мобильных */
@media (max-width: 768px) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .main-content {
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }
}




