/* Основные переменные в стиле "Сытый Дядя" */
:root {
    --primary-color: #FF6B35;
    --primary-hover: #E55A2B;
    --secondary-color: #2C3E50;
    --background-color: #F8F9FA;
    --surface-color: #F8F9FA;
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --border-color: #E9ECEF;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --warning-color: #FFC107;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--background-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

main {
    width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #C82333;
}

/* Заголовок */
.header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.logo-image {
    width: 47px;
    height: 47px;
    object-fit: contain;
    border-radius: 6px;
}

.logo-text {
    color: var(--primary-color);
}

.page-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.page-header .logo {
    justify-content: center;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Главная секция */
.hero {
    padding: 80px 0;
    background: var(--surface-color);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.join-meeting {
    display: flex;
    gap: 12px;
}

.meeting-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.meeting-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-number.infinity {
    font-size: 40px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    transform: translateY(-4px);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Баннер в hero секции */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Скрываем мобильную картинку на десктопе */
.hero-image-mobile {
    display: none;
}

.hero-banner {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.hero-banner:hover {
    transform: scale(1.02);
}

.video-preview {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

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

.video-participant {
    aspect-ratio: 4/3;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-participant.active {
    border: 2px solid var(--primary-color);
}

.participant-avatar {
    font-size: 32px;
    margin-bottom: 8px;
}

.participant-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.controls-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.control-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

.control-btn:hover {
    background: var(--border-color);
}

.control-btn.active {
    background: var(--primary-color);
    color: white;
}

.control-btn.end-call {
    background: var(--danger-color);
    color: white;
}

.control-btn.muted {
    background: var(--danger-color);
    color: white;
    position: relative;
    opacity: 0.8;
}

.control-btn.muted::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 2px;
    background: white;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Секция возможностей */
.features {
    padding: 80px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Подвал */
.footer {
    background: var(--surface-color);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Исправление отзеркаливания видео с камеры */
.main-video video:not([data-screen-share="true"]),
.participant-video video {
    transform: scaleX(-1);
}

/* Для демонстрации экрана отзеркаливание не нужно */
.main-video video[data-screen-share="true"] {
    transform: none;
}

/* Mobile: replace screen share with camera switch */
#cameraSwitchBtn {
  display: none;
}

@media (max-width: 768px) {
  #screenBtn {
    display: none !important;
  }
  #cameraSwitchBtn {
    display: inline-flex !important;
  }
  
  /* Предотвращение зума при фокусе на поля ввода */
  .meeting-input,
  .name-input,
  .chat-input,
  .link-input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea {
    font-size: 16px !important;
  }
  
  /* Исправление отображения на мобильных устройствах */
  html {
    overflow-x: hidden !important;
  }
  
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  .main-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .join-meeting {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  .meeting-input {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Предотвращение переполнения для всех элементов на мобильных */
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .stats {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Скрытие горизонтального изображения на мобильных */
  .hero-image {
    display: none !important;
  }
  
  .hero-image-mobile {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 20px 0 !important;
  }
  
  .hero-banner {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Модальное окно успешного создания встречи */
.meeting-created-modal {
    max-width: 550px;
    width: 95%;
}

.meeting-created-modal .success-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-bottom: none;
}

.meeting-created-modal .success-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.meeting-created-modal .success-header .modal-close {
    color: white;
    opacity: 0.8;
}

.meeting-created-modal .success-header .modal-close:hover {
    opacity: 1;
}

.meeting-created-modal .modal-welcome {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.meeting-created-modal .modal-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.meeting-created-modal .meeting-info {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
}

.meeting-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.meeting-detail:last-child {
    margin-bottom: 0;
}

.meeting-detail label {
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

.meeting-detail .value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.share-section {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.share-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.share-section .icon {
    font-size: 18px;
}

.link-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--background-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-buttons .btn {
    flex: 1;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.share-buttons .btn svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Исправления для модального окна создания встречи */
#meetingCreatedModal .modal-content {
    max-height: none;
    overflow: visible;
}

#meetingCreatedModal .modal-body {
    max-height: none;
    overflow-y: visible;
}

/* Адаптивность для модального окна создания встречи */
@media (max-width: 768px) {
    .meeting-created-modal {
        width: 95%;
        max-width: none;
        margin: 10px;
        /* Убираем ограничение высоты модала на мобильных */
        max-height: none;
    }
    
    /* Включаем прокрутку для оверлея, чтобы содержимое не обрезалось */
    #meetingCreatedModal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
        padding: 20px 0;
    }
    
    #meetingCreatedModal .modal-content {
        max-height: none;
        overflow: visible;
        margin: auto;
    }
    
    .meeting-created-modal .modal-body {
        padding: 20px;
        /* Убираем ограничение высоты содержимого модала */
        max-height: none;
        overflow-y: visible;
    }
    
    .meeting-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .meeting-detail .value {
        width: 100%;
        justify-content: space-between;
    }
    
    .link-input-group {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-buttons .btn {
        min-width: auto;
        flex: none;
    }
}

/* Стили для страницы встречи */
.meeting-body {
    background: #1a1a1a;
    color: white;
    overflow: hidden;
    height: 100vh;
}

.meeting-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.meeting-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.meeting-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meeting-info .logo {
    font-size: 16px;
}

.meeting-info .logo-image {
    width: 42px;
    height: 42px;
}

.meeting-info .logo-text {
    color: white;
}

.meeting-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.meeting-time {
    background: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.meeting-actions {
    display: flex;
    gap: 12px;
}

.meeting-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.video-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.main-video {
    flex: 1;
    background: #000;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.main-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Для обычного видео с камеры используем cover */
.main-video video:not([data-screen-share="true"]) {
    object-fit: cover;
}

/* CSS-based полноэкранный режим для мобильных устройств */
.mobile-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-fullscreen-overlay.active {
    display: flex;
}

.mobile-fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Исправление отзеркаливания для камеры в полноэкранном режиме */
.mobile-fullscreen-video:not([data-screen-share="true"]) {
    transform: scaleX(-1);
}

/* Для демонстрации экрана отзеркаливание не нужно */
.mobile-fullscreen-video[data-screen-share="true"] {
    transform: none;
}

.mobile-fullscreen-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.mobile-fullscreen-exit {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-fullscreen-exit:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Скрытие интерфейса в полноэкранном режиме */
body.mobile-fullscreen-active {
    overflow: hidden;
}

body.mobile-fullscreen-active .sidebar,
body.mobile-fullscreen-active .bottom-controls,
body.mobile-fullscreen-active .video-overlay-top,
body.mobile-fullscreen-active .main-video-overlay {
    display: none !important;
}

.main-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: end;
    pointer-events: none;
}

.speaker-name {
    color: white;
    font-weight: 600;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.35);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    opacity: 0.85;
    transition: opacity 0.3s ease, background 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    pointer-events: auto;
}

.speaker-name:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.video-controls {
    position: absolute;
    bottom: 80px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.video-control {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.video-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.participants-grid {
    display: flex;
    gap: 12px;
    height: 120px;
}

.participant-video {
    width: 160px;
    height: 120px;
    background: #333;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.participant-video:hover {
    transform: scale(1.05);
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.participant-video:active {
    transform: scale(0.98);
}

.participant-video.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.8);
}

.participant-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--surface-color);
}

.participant-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.participant-name {
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.participant-status {
    display: flex;
    gap: 4px;
}

.mic-status {
    font-size: 12px;
}

.mic-status.muted {
    opacity: 0.5;
    position: relative;
    color: var(--danger-color);
}

.mic-status.muted::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1px;
    background: var(--danger-color);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Боковая панель */
.sidebar {
    width: 320px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-tab.active {
    color: white;
    background: rgba(255, 107, 53, 0.1);
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-content {
    flex: 1;
    overflow: hidden;
}

.tab-content {
    height: 100%;
    display: none;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.participant-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--surface-color);
}

.participant-details {
    flex: 1;
}

.participant-details .participant-name {
    color: white;
    font-weight: 500;
    margin-bottom: 2px;
}

.participant-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.participant-controls {
    display: flex;
    gap: 4px;
}

.control-btn.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* Чат */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-message {
    margin-bottom: 16px;
}

.message-author {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 4px;
}

.message-text {
    color: white;
    font-size: 14px;
    margin-bottom: 4px;
}

.message-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    color: white;
    font-size: 14px;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.send-btn {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.send-btn:hover {
    background: var(--primary-hover);
}

/* Панель управления встречей */
.meeting-controls {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.controls-center {
    display: flex;
    gap: 16px;
}

.meeting-id-display {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.meeting-controls .control-btn {
    width: 56px;
    height: 56px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid transparent;
}

.meeting-controls .control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.meeting-controls .control-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.meeting-controls .control-btn.muted {
    background: var(--danger-color);
    border-color: var(--danger-color);
    position: relative;
    opacity: 0.9;
}

.meeting-controls .control-btn.muted::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 3px;
    background: white;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-group select,
.setting-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.setting-group input[type="checkbox"] {
    margin-right: 8px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Стили для модального окна завершенной конференции */
.ended-meeting-modal {
    text-align: center;
    max-width: 450px;
}

.modal-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 24px 16px;
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ended-meeting-modal .modal-header {
    border-bottom: none;
    padding: 16px 24px 8px;
    justify-content: center;
}

.ended-meeting-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.ended-meeting-modal .modal-body {
    padding: 16px 32px 24px;
}

.ended-meeting-modal .modal-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.ended-meeting-modal .modal-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.ended-meeting-modal .modal-footer {
    border-top: none;
    padding: 0 24px 32px;
    justify-content: center;
}

.ended-meeting-modal .btn-primary {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* Стили для модального окна ввода имени */
.modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-welcome {
    margin: 0 0 16px 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.modal-description {
    margin: 0 0 24px 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    margin-right: 6px;
    position: relative;
    background-color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.name-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.modal-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #fdf2f2;
    border-radius: var(--border-radius);
    border-left: 3px solid #e74c3c;
}

/* Стили для модального окна выхода из встречи */
.leave-modal-content {
    max-width: 480px;
    background: linear-gradient(145deg, var(--surface-color) 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.15), 0 8px 25px rgba(44, 62, 80, 0.1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.leave-modal-content .modal-header {
    background: #FF6B35;
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.leave-modal-content .modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.leave-modal-content .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.leave-modal-content .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.leave-modal-text {
    margin: 0 0 28px 0;
    color: var(--text-primary);
    font-size: 17px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

.leave-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leave-option-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px 24px;
    text-align: left;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 85px;
    justify-content: flex-start;
    gap: 16px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.leave-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.leave-option-btn .icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.leave-option-btn .content-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.leave-option-btn .option-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.leave-option-btn .leave-option-desc {
    font-size: 12px;
    opacity: 0.75;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    transition: opacity 0.3s ease;
}

/* Стили для кнопки "Выйти из встречи" */
.leave-option-btn.btn-secondary {
    background: linear-gradient(135deg, var(--surface-color) 0%, #ffffff 100%);
    border-color: var(--border-color);
}

.leave-option-btn.btn-secondary .icon-container {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #34495e 100%);
    color: white;
}

.leave-option-btn.btn-secondary .option-title {
    color: var(--text-primary);
}

.leave-option-btn.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.15);
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #ffffff 0%, var(--surface-color) 100%);
}

.leave-option-btn.btn-secondary:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.05) 0%, rgba(52, 73, 94, 0.05) 100%);
}

.leave-option-btn.btn-secondary:hover .icon-container {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
}

/* Стили для кнопки "Завершить для всех" */
.leave-option-btn.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    border-color: var(--danger-color);
}

.leave-option-btn.btn-danger .icon-container {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.leave-option-btn.btn-danger .option-title {
    color: #ffffff;
}

.leave-option-btn.btn-danger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(220, 53, 69, 0.25);
    border-color: var(--danger-color);
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}

.leave-option-btn.btn-danger:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(200, 35, 51, 0.08) 100%);
}

.leave-option-btn.btn-danger:hover .icon-container {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    background: rgba(255, 255, 255, 0.3);
}

.leave-option-btn svg {
    width: 24px;
    height: 24px;
    margin: 0;
}

@media (max-width: 480px) {
    .leave-modal-content {
        max-width: 95%;
        margin: 20px;
        border-radius: 16px;
    }
    
    .leave-modal-content .modal-header {
        padding: 20px 24px;
        border-radius: 16px 16px 0 0;
    }
    
    .leave-modal-content .modal-header h3 {
        font-size: 20px;
    }
    
    .leave-modal-text {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .leave-options {
        gap: 16px;
    }
    
    .leave-option-btn {
        padding: 20px 24px;
        min-height: 80px;
        gap: 16px;
        border-radius: 12px;
    }
    
    .leave-option-btn .icon-container {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .leave-option-btn .icon-container svg {
        width: 20px;
        height: 20px;
    }
    
    .leave-option-btn .option-title {
        font-size: 15px;
    }
    
    .leave-option-btn .leave-option-desc {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .leave-modal-content {
        margin: 16px;
        border-radius: 14px;
    }
    
    .leave-modal-content .modal-header {
        padding: 18px 20px;
        border-radius: 14px 14px 0 0;
    }
    
    .leave-option-btn {
        padding: 18px 20px;
        min-height: 75px;
        gap: 14px;
    }
    
    .leave-option-btn .icon-container {
        width: 44px;
        height: 44px;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Header - минималистичный и незаметный */
    .header {
        padding: 10px 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        position: sticky;
        top: 0;
        z-index: 100;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .header .container {
        padding: 0 20px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo-image {
        width: 30px;
        height: 30px;
    }
    
    .logo-text {
        font-weight: 600;
    }
    
    .nav {
        display: none;
    }
    
    /* Hero секция - чистый и современный дизайн */
    .hero {
        padding: 48px 0 40px;
        background: #ffffff;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 1.15;
        margin-bottom: 20px;
        color: #1a1a1a;
        font-weight: 800;
        letter-spacing: 0.2px;
        text-align: center;
    }
    
    /* Убираем <br> на мобильных для более компактного вида */
    .hero-title br {
        display: none;
    }
    
    /* Показываем подзаголовок на мобильных с адаптивными стилями */
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 12px;
        text-align: center;
        line-height: 1.5;
    }
    
    /* Мобильная картинка - компактная между заголовком и кнопками */
    .hero-image-mobile {
        display: block;
        order: 1;
        margin: 8px auto 20px;
        width: 100%;
        max-height: 220px;
        overflow: hidden;
        border-radius: 12px;
    }
    
    .hero-image-mobile .hero-banner {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    /* Скрываем десктопную картинку на мобильных */
    .hero-image {
        display: none;
    }
    
    /* Кнопки - крупные, яркие и удобные */
    .hero-actions {
        gap: 14px;
        margin-bottom: 24px;
        order: 2;
    }
    
    .btn-primary {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 700;
        border-radius: 12px;
        background: linear-gradient(135deg, #FF6B35 0%, #FF8A65 100%);
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
        transition: all 0.3s ease;
        border: none;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    }
    
    .join-meeting {
        flex-direction: row;
        gap: 8px;
        align-items: stretch;
    }
    
    .meeting-input {
        flex: 1;
        min-width: 0;
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 8px;
        border: 2px solid #E9ECEF;
        transition: all 0.2s ease;
        background: #F8F9FA;
    }
    
    .meeting-input:focus {
        border-color: #FF6B35;
        box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
        background: #ffffff;
    }
    
    .btn-secondary {
        flex-shrink: 0;
        width: auto;
        min-width: 100px;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 8px;
        font-weight: 600;
        white-space: nowrap;
    }
    
    /* Статистика - яркая и заметная */
    .stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        padding: 20px 16px;
        border-radius: 16px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
        order: 3;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 26px;
        font-weight: 800;
        background: linear-gradient(135deg, #FF6B35 0%, #FF8A65 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .stat-label {
        font-size: 12px;
        font-weight: 600;
        color: #495057;
        margin-top: 4px;
    }
    
    /* Скрываем баннер на мобильных - экономим место */
    .hero-image {
        display: none;
    }
    
    /* Контейнер контента */
    .hero-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Features - минималистичные карточки */
    .features {
        padding: 40px 0;
        background: #F8F9FA;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
        padding: 0 24px;
        font-weight: 700;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 24px;
    }
    
    .feature-card {
        padding: 20px;
        border-radius: 14px;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
        transition: all 0.3s ease;
    }
    
    /* Скрываем лишние карточки на мобильных */
    .feature-card:nth-child(n+4) {
        display: none;
    }
    
    .feature-card:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .feature-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .feature-card h3 {
        font-size: 16px;
        margin-bottom: 6px;
        font-weight: 600;
    }
    
    .feature-card p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* FAQ - скрываем на мобильных для чистоты интерфейса */
    .faq {
        display: none;
    }
    
    .faq-list details p {
        padding: 0 20px 20px;
        font-size: 14px;
    }
    
    /* Footer - минималистичный */
    .footer {
        padding: 24px 0 16px;
        background: #F8F9FA;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 0 24px;
    }
    
    .footer-links {
        flex-direction: row;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-link {
        font-size: 13px;
        color: #6C757D;
    }
    
    /* SEO контент - скрываем на мобильных */
    .seo-content {
        display: none;
    }
    
    /* Скрыть на мобильных для экономии места */
    .sidebar {
        width: 280px;
    }
    
    .participants-grid {
        flex-wrap: wrap;
        height: auto;
    }
    
    .participant-video {
        width: 120px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    /* Компактная версия для маленьких экранов */
    .header {
        padding: 8px 0;
    }
    
    .header .container {
        padding: 0 16px;
    }
    
    .logo-image {
        width: 26px;
        height: 26px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .hero {
        padding: 36px 0 32px;
    }
    
    .hero .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .hero-actions {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .btn-primary {
        padding: 15px 22px;
        font-size: 15px;
    }
    
    .join-meeting {
        gap: 6px;
    }
    
    .meeting-input {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .btn-secondary {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 6px;
        min-width: 90px;
    }
    
    /* Статистика */
    .stats {
        padding: 16px 12px;
        gap: 8px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Features */
    .features {
        padding: 32px 0;
    }
    
    .features-grid {
        padding: 0 16px;
        gap: 10px;
    }
    
    .section-title {
        font-size: 22px;
        padding: 0 16px;
    }
    
    /* Footer */
    .footer {
        padding: 20px 0 14px;
    }
    
    .footer-content {
        padding: 0 16px;
    }
    
    .footer-link {
        font-size: 12px;
    }
    
    /* Карточки возможностей */
    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .features {
        padding: 40px 0;
    }
    
    .features-grid {
        gap: 12px;
        padding: 0 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .feature-card h3 {
        font-size: 16px;
    }
    
    .feature-card p {
        font-size: 13px;
    }
    
    /* FAQ */
    .faq {
        padding: 40px 0;
    }
    
    .faq h2 {
        font-size: 24px;
    }
    
    .faq-list {
        padding: 0 16px;
    }
    
    .faq-list summary {
        padding: 16px 18px;
        font-size: 14px;
    }
    
    .faq-list details p {
        padding: 0 18px 18px;
        font-size: 13px;
    }
    
    /* SEO контент */
    .seo-content {
        padding: 40px 0;
    }
    
    .seo-text {
        padding: 0 16px;
    }
    
    .seo-text h2 {
        font-size: 22px;
    }
    
    .seo-text h3 {
        font-size: 18px;
    }
    
    /* Footer */
    .footer {
        padding: 28px 0 16px;
    }
    
    .footer-content {
        padding: 0 16px;
    }
    
    /* Meeting controls */
    .meeting-header {
        padding: 12px 16px;
    }
    
    .meeting-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .controls-center {
        gap: 12px;
    }
    
    .meeting-controls .control-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Оптимизация окна встречи/* Стили для отключенной камеры */
.camera-off {
    filter: grayscale(100%) brightness(0.3);
    opacity: 0.5;
}

.camera-off::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff4444'%3E%3Cpath d='M21 6.5l-4 4V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11zM9.5 16L8 14.5l1.5-1.5L8 11.5 9.5 10 11 11.5 12.5 10 14 11.5 12.5 13 14 14.5 12.5 16 11 14.5 9.5 16z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
    z-index: 10;
}

/* Стили для SVG иконок */
.icon-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: all 0.2s ease;
}

.control-btn .icon-svg {
    width: 18px;
    height: 18px;
}

.control-btn.small .icon-svg {
    width: 14px;
    height: 14px;
}

/* Иконка микрофона */
.mic-icon {
    fill: #4CAF50;
}

.mic-icon-muted {
    fill: #f44336;
}

/* Иконка камеры */
.camera-icon {
    fill: #2196F3;
}

.camera-icon-off {
    fill: #f44336;
}

/* Состояния кнопок с иконками */
.control-btn.active .mic-icon {
    fill: #ffffff;
}

.control-btn.muted .mic-icon-muted {
    fill: #ffffff;
}

.control-btn.active .camera-icon {
    fill: #ffffff;
}

.control-btn.muted .camera-icon-off {
    fill: #ffffff;
}

/* Анимация при наведении */
.control-btn:hover .icon-svg {
    transform: scale(1.1);
}

/* Статус микрофона в шапке */
.mic-status .icon-svg {
    width: 12px;
    height: 12px;
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
  /* Убираем header на мобильных */
  .meeting-header {
    display: none;
  }
  
  .meeting-body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    touch-action: none; /* Отключаем все touch жесты */
    overscroll-behavior: none; /* Отключаем overscroll */
  }
  
  /* Дополнительная защита от прокрутки только для страницы встречи */
  body.meeting-page html, 
  body.meeting-page {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: manipulation; /* Разрешаем только zoom и pan */
    overscroll-behavior: none;
  }
  
  .meeting-container {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
  }
  
  .meeting-main {
    position: relative;
    padding-bottom: 0;
    height: 100%;
  }
  
  .video-area {
    padding: 0;
    gap: 8px;
    height: 100%;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
  
  /* Главное видео на весь экран */
  .main-video {
    flex: 1;
    min-height: auto;
    border-radius: 0;
    position: relative;
  }
  
  /* Оверлеи поверх видео */
  .main-video-overlay {
    background: transparent;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: end;
  }
  
  /* Добавляем информацию поверх видео */
  .video-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: max(env(safe-area-inset-top), 12px) 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
  }
  
  .video-overlay-top > * {
    pointer-events: auto;
  }
  
  /* Кнопка полноэкранного режима на мобильных - над миниатюрами */
  .video-controls {
    bottom: auto;
    top: auto;
    right: 12px;
    opacity: 0.95;
    /* Позиционируем над миниатюрами участников */
    position: fixed;
    bottom: 180px;
    z-index: 15;
  }
  
  .video-control {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .meeting-timer-mobile {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .participants-count-mobile {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .speaker-name {
    bottom: 80px;
    max-width: 80%;
    font-size: 16px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.85;
    transition: opacity 0.3s ease;
  }
  
  .speaker-name:hover {
    opacity: 1;
  }
  
  /* Компактная сетка участников */
  .participants-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    height: 75px;
    padding: 0 8px 8px;
    scrollbar-width: none;
  }
  
  .participants-grid::-webkit-scrollbar {
    display: none;
  }
  
  .participant-video {
    flex: 0 0 auto;
    width: 100px;
    height: 75px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
  }
  
  .participant-video:hover {
    transform: scale(1.05);
    border-color: rgba(255, 107, 53, 0.5);
  }
  
  .participant-video:active {
    transform: scale(0.98);
  }
  
  .participant-video.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.6);
  }
  
  .participant-overlay {
    padding: 4px 8px;
  }
  
  .participant-name {
    font-size: 10px;
  }
  
  /* Боковая панель выдвижная */
  .sidebar {
    position: fixed !important;
    top: auto !important;
    bottom: -100vh !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 70% !important;
    max-height: 500px !important;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.5) !important;
    transition: bottom 0.3s ease-in-out !important;
    transform: translateY(0) !important;
  }

  .sidebar.open {
    bottom: 0 !important;
    right: 0 !important;
  }

  .sidebar-handle {
    width: 40px;
    height: 5px;
    background: var(--border-color);
    border-radius: 2.5px;
    margin: 10px auto;
    cursor: pointer;
  }
  
  /* Оверлей для закрытия sidebar */
  .sidebar-overlay,
  #sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
  }
  
  .sidebar-overlay.active,
  #sidebarOverlay.active {
    display: block;
  }

  .main-content {
    padding-bottom: 0; /* Изначально отступ отсутствует */
    transition: padding-bottom 0.3s ease-in-out;
  }

  .sidebar.open ~ .main-content {
    padding-bottom: 280px; /* Отступ, когда панель открыта */
  }
  
  /* Панель управления */
  .meeting-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    gap: 0;
  }
  
  .controls-left, .controls-right {
    display: none;
  }
  
  .controls-center {
    width: 100%;
    justify-content: center;
    gap: 14px;
  }
  
  /* Большие кнопки для касания */
  .meeting-controls .control-btn {
    width: 64px;
    height: 64px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
  }
  
  .meeting-controls .control-btn:active {
    transform: scale(0.95);
  }
  
  .meeting-controls .control-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .meeting-controls .control-btn.muted {
    background: var(--danger-color);
    border-color: var(--danger-color);
  }
  
  .meeting-controls .control-btn.end-call {
    background: var(--danger-color);
    border-color: var(--danger-color);
  }
}

@media (max-width: 480px) {
  .meeting-timer-mobile {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .participants-count-mobile {
    font-size: 11px;
    padding: 6px 10px;
  }
  
  .participants-grid {
    height: 65px;
    padding: 0 6px 6px;
  }
  
  .participant-video {
    width: 90px;
    height: 65px;
    border-radius: 10px;
  }
  
  .speaker-name {
    font-size: 14px;
    padding: 8px 20px;
    bottom: 70px;
  }
  
  .meeting-controls .control-btn {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }
  
  .controls-center {
    gap: 10px;
  }
}

/* SEO контент */
.seo-content {
    padding: 80px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.seo-text {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
}

.seo-text h2 {
    color: #1a1a1a;
    margin-bottom: 24px;
    font-size: 32px;
    font-weight: 600;
}

.seo-text p {
    color: #4a4a4a;
    margin-bottom: 20px;
    font-size: 16px;
}

.seo-text ul {
    margin: 20px 0;
    padding-left: 20px;
}

.seo-text li {
    color: #4a4a4a;
    margin-bottom: 8px;
    font-size: 16px;
}

.seo-text strong {
    color: #FF6B35;
    font-weight: 600;
}

@media (max-width: 768px) {
    .seo-content {
        padding: 60px 0;
    }
    
    .seo-text h2 {
        font-size: 24px;
    }
    
    .seo-text p,
    .seo-text li {
        font-size: 14px;
    }
}

/* Стили для страниц Privacy и Terms */
.page-section {
    padding: 60px 0 80px;
    background-color: var(--background-color);
    min-height: calc(100vh - 140px);
}

.page-section .container {
    max-width: 800px;
}

.page-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.page-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.page-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.page-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.page-section ul {
    margin: 20px 0;
    padding-left: 0;
}

.page-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    list-style: none;
}

.page-section li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 8px;
    font-size: 1.2rem;
}

.page-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.page-section a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.text-secondary {
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 32px !important;
}


/* FAQ Section Styles */
.faq {
    padding: 80px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.faq h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #333;
    position: relative;
}

.faq h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #FF8A65);
    border-radius: 2px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-list details {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.faq-list details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.faq-list details[open] {
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

.faq-list summary {
    padding: 25px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    list-style: none;
    position: relative;
    background: var(--background-color);
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.faq-list summary:hover {
    background: #f8f9fa;
    color: #FF6B35;
}

.faq-list details[open] summary {
    border-bottom-color: #e9ecef;
    background: var(--background-color);
    color: #FF6B35;
}

.faq-list summary::after {
    content: '+';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: #FF6B35;
    transition: transform 0.3s ease;
}

.faq-list details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list details p {
    padding: 0 30px 30px 30px;
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq {
        padding: 60px 0;
    }
    
    .faq h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .faq-list {
        margin: 0 20px;
    }
    
    .faq-list summary {
        padding: 20px 25px;
        font-size: 1rem;
    }
    
    .faq-list summary::after {
        right: 25px;
    }
    
    .faq-list details p {
        padding: 0 25px 25px 25px;
        font-size: 0.95rem;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
}

