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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #2a2a2a;
    color: #f2f2f2;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Заставка с видео анимацией */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    overflow: hidden;
}

.splash-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Специальные настройки для iOS */
    -webkit-playsinline: true;
    playsinline: true;
    /* Предотвращаем полноэкранный режим на iOS */
    -webkit-fullscreen: none;
}

body::before {
    content: "";
    position: fixed;
    inset: -25%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15), transparent 45%),
        radial-gradient(circle at 70% 20%, rgba(180, 180, 180, 0.25), transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(220, 220, 220, 0.18), transparent 45%),
        radial-gradient(circle at 30% 80%, rgba(140, 140, 140, 0.3), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 100, 100, 0.2), transparent 60%);
    filter: blur(70px);
    opacity: 0.95;
    animation: waveBg 6s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes waveBg {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1) translate(-3%, 4%) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.15) translate(3%, -4%) rotate(-6deg);
        opacity: 0.95;
    }
}

/* Общие плавные переходы для интерактивных элементов */
input, select, textarea {
    transition: transform 0.2s ease, opacity 0.2s ease, scale 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* Время вверху в неоморфном стиле */
.time-display {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 80px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 35px 70px;
    border-radius: 24px;
    background: #E8E8E8;
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 1;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.1),
        -6px -6px 12px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    letter-spacing: 6px;
    min-width: 300px;
    text-align: center;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease, font-size 0.3s ease, padding 0.3s ease, letter-spacing 0.3s ease, min-width 0.3s ease, border-radius 0.3s ease;
}

.time-display.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Скрываем часы везде */
.time-display {
    display: none !important;
}

/* Таймер встречи - скрыт, используется Dynamic Island */
.meeting-timer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 20px;
    /* Эффект стекла iOS - glassmorphism */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    z-index: 1000;
    cursor: pointer;
    /* Множественные тени для эффекта глубины и преломления */
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    /* Градиент для эффекта преломления света */
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    /* Эффект свечения */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.meeting-timer.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hover эффект для таймера на ПК */
@media (min-width: 769px) {
    .meeting-timer:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    }
}

.timer-text {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    min-width: 90px;
    text-align: center;
}

/* Dynamic Island для таймера звонка */
.dynamic-island {
    position: fixed;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dynamic-island-content {
    position: relative;
    background: #000;
    border-radius: 32px;
    padding: 8px 20px;
    min-width: 160px;
    max-width: 160px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dynamic-island-content:active,
.dynamic-island-content:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.dynamic-island.expanded .dynamic-island-content {
    min-width: 320px;
    max-width: 320px;
    padding: 14px 24px;
    border-radius: 36px;
}

.dynamic-island-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.dynamic-island-compact.hidden {
    display: none;
}

.dynamic-island-expanded {
    display: none !important;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.dynamic-island.expanded .dynamic-island-expanded {
    display: flex !important;
}

.dynamic-island.expanded .dynamic-island-compact {
    display: none !important;
}

.call-time,
.phone-time {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.call-time {
    flex: 1;
    text-align: left;
}

.phone-time {
    text-align: right;
    opacity: 0.7;
}

.expanded-symbols {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
}

.expanded-symbols .symbol {
    font-size: 32px;
    line-height: 1;
    animation: symbolPulse 2s ease-in-out infinite;
    display: inline-block;
}

.expanded-symbols .symbol:nth-child(1) {
    animation-delay: 0s;
}

.expanded-symbols .symbol:nth-child(2) {
    animation-delay: 0.2s;
}

.expanded-symbols .symbol:nth-child(3) {
    animation-delay: 0.4s;
}

.expanded-symbols .symbol:nth-child(4) {
    animation-delay: 0.6s;
}

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

.dynamic-island.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Главный экран */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.main-screen {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 120px;
}

.main-actions {
    display: grid;
    grid-template-columns: repeat(2, 110px);
    gap: 18px;
    width: max-content;
    justify-content: center;
    padding: 28px 32px;
    border-radius: 36px;
    background: linear-gradient(160deg, #090909, #151515);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
}

.action-btn {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 20px;
    cursor: pointer;
    transition: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 0;
}

.action-btn svg {
    width: 28px;
    height: 28px;
}

.action-icon {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-label {
    display: none;
    font-size: 15px;
    font-weight: 600;
    margin-left: 0;
    }

.action-create {
    background: #FF9D1C;
    color: #1a1a1a;
}

.action-join {
    background: #5B63FF;
}

.action-history {
    background: #ffffff;
    color: #1a1a1a;
}

.action-history svg {
    width: 38px;
    height: 38px;
}

.action-help {
    background: #CFCFCF;
    color: #1a1a1a;
}

.action-hover-indicator {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .action-hover-indicator {
        display: block;
        position: absolute;
        pointer-events: none;
        opacity: 0;
        z-index: 2;
        transition: opacity 0.25s ease;
    }
    
    .action-hover-indicator.visible {
        opacity: 1;
    }
    
    /* Индикатор для кнопок (внутри контейнера) */
    .action-hover-indicator-button {
        top: 0;
        left: 0;
        width: 44px;
        height: 44px;
        border-radius: 28px;
        border: 2px solid rgba(76, 138, 255, 0.9);
    box-shadow: 
            0 0 25px rgba(76, 138, 255, 0.35),
            inset 0 0 18px rgba(76, 138, 255, 0.2);
        transform: translate(-999px, -999px);
        transition:
            transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            width 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            height 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            opacity 0.25s ease;
    }
    
    /* Индикатор-дуга для края контейнера (вне контейнера) */
    .action-hover-indicator-edge {
        top: 0;
        left: 0;
        width: 70px;
        height: 70px;
        border: 3px solid transparent;
        border-top-color: rgba(76, 138, 255, 0.95);
        border-right-color: rgba(76, 138, 255, 0.7);
        border-radius: 50%;
        box-shadow:
            0 0 26px rgba(76, 138, 255, 0.35);
        transform-origin: center center;
        clip-path: polygon(30% 0%, 100% 0%, 100% 70%, 50% 50%);
        transition:
            transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
            opacity 0.25s ease;
    }
}

@media (max-width: 768px) {
    .main-actions {
        width: calc(90px * 2 + 14px + 32px * 2) !important;
        max-width: 90vw;
        grid-template-columns: repeat(2, 90px);
        grid-template-rows: repeat(2, 90px);
        justify-items: center;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 28px 32px;
        aspect-ratio: 1 / 1;
        margin: 0 auto !important;
        /* Эффект стекла iOS - glassmorphism */
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.15);
        /* Градиент для эффекта преломления света */
        background-image: 
            linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
    }

    .action-btn {
        border-radius: 20px;
        font-size: 18px;
    }
}


.btn-tertiary {
    background: #9E9E9E;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.15),
        -4px -4px 8px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(255, 255, 255, 0.4);
}

.btn-tertiary:hover {
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.12),
        -2px -2px 6px rgba(255, 255, 255, 0.25),
        inset 1px 1px 2px rgba(255, 255, 255, 0.4);
    transform: translateY(1px);
}

.btn-tertiary:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -2px -2px 4px rgba(255, 255, 255, 0.3);
    transform: translateY(2px);
}

.btn {
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-submit {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #888;
    color: #333;
    width: 100%;
    margin-top: 12px;
    padding: 16px 28px;
    font-size: 18px;
    min-width: auto;
    border-radius: 14px;
}

.btn-submit:hover {
    background: #777;
}

.btn-back {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #e8e8e8;
    color: #333;
    width: 100%;
    margin-top: 12px;
    padding: 16px 28px;
    font-size: 18px;
    min-width: auto;
    border-radius: 14px;
}

.btn-back:hover {
    background: #d8d8d8;
}

/* Иконки внизу слева */
.bottom-icons {
    display: none !important;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #E8E8E8;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.1),
        -6px -6px 12px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
    color: #4a4a4a;
}

.icon-circle svg {
    width: 32px;
    height: 32px;
}

.icon-circle:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.08),
        -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transform: translateY(1px);
}

.icon-circle:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    transform: translateY(2px);
}

/* Экраны создания и входа */
.create-meeting-screen,
.join-meeting-screen {
    background: #E8E8E8;
    padding: 50px;
    border-radius: 24px;
    min-width: 450px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(80px);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.15),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    display: block;
}

.create-meeting-screen:not(.hidden),
.join-meeting-screen:not(.hidden) {
    display: block;
}

.create-meeting-screen.showing,
.join-meeting-screen.showing {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(80px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.create-meeting-screen h2,
.join-meeting-screen h2 {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-size: 22px;
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 24px 28px;
    border: 1px solid #ddd;
    border-radius: 14px;
    font-size: 20px;
    margin-bottom: 24px;
    background: #f5f5f5;
    min-height: 70px;
    box-sizing: border-box;
}

.input-field:focus {
    outline: none;
    border-color: #4285f4;
    background: white;
}

/* Кнопки управления медиа */
.media-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 24px;
}

.media-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 14px;
    background: #E8E8E8;
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    color: #4a4a4a;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    min-width: 120px;
}

.media-btn:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.08),
        -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transform: translateY(1px);
}

.media-btn:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    transform: translateY(2px);
}

.media-btn.muted {
    background: #ff6b6b;
    color: white;
    box-shadow: 
        4px 4px 8px rgba(255, 107, 107, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.5),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.media-btn.muted:hover {
    background: #ff5252;
    box-shadow: 
        2px 2px 4px rgba(255, 107, 107, 0.3),
        -2px -2px 4px rgba(255, 255, 255, 0.5),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.media-btn svg {
    width: 28px;
    height: 28px;
}

.media-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* Страница встречи */
.meeting-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: white !important; /* Белый фон по умолчанию для одиночной встречи */
    position: relative;
}

/* Плашки статуса устройств */
.device-status-notifications {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.status-notification {
    background: rgba(0, 0, 0, 0.75) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
    visibility: hidden;
    position: relative;
    z-index: 999;
}

.status-notification:not(.hidden) {
    opacity: 1 !important;
    transform: translateY(0) scale(1);
    visibility: visible !important;
    display: block !important;
}

.status-notification.hidden {
    opacity: 0;
    visibility: hidden;
    display: none !important;
}

/* Панель управления внизу */
.meeting-controls-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #2C2C2C;
    gap: 12px;
    z-index: 100;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px;
    flex-wrap: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.meeting-controls-bottom.faded {
    opacity: 0.3;
}

.meeting-id-container {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    background: #3C3C3C;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    text-align: center;
}

.meeting-id-container:hover {
    background: #4C4C4C;
}

.control-buttons-bottom {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-control-bottom {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #E8E8E8;
    color: #4a4a4a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.15),
        -2px -2px 4px rgba(255, 255, 255, 0.5),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0;
    font-size: 0;
    line-height: 1;
}

.btn-control-bottom svg {
    width: 24px;
    height: 24px;
}

.btn-control-bottom:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.12),
        -1px -1px 2px rgba(255, 255, 255, 0.4),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(1px);
}

.btn-control-bottom:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    transform: translateY(2px);
}

.btn-control-bottom.muted {
    background: #ff6b6b;
    color: white;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-control-bottom.muted:hover {
    background: #ff5252;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.15),
        -1px -1px 2px rgba(255, 255, 255, 0.2),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-control-bottom.btn-exit {
    background: #ff6b6b;
    color: white;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-control-bottom.btn-exit:hover {
    background: #ff5252;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.15),
        -1px -1px 2px rgba(255, 255, 255, 0.2),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-control-bottom.active {
    background: #6A6AFF;
    color: white;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-control-bottom.active:hover {
    background: #5a5aff;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.15),
        -1px -1px 2px rgba(255, 255, 255, 0.2),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Меню выхода */
.exit-menu {
    position: fixed;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.exit-menu:not(.hidden) {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.exit-menu-content {
    position: relative;
}

.exit-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.exit-menu-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #E8E8E8;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.15),
        -2px -2px 4px rgba(255, 255, 255, 0.5),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.exit-menu-btn:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.12),
        -1px -1px 2px rgba(255, 255, 255, 0.4),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(1px);
}

.exit-menu-btn:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    transform: translateY(2px);
}

.exit-menu-btn.exit-end {
    background: #ff6b6b;
    color: white;
}

.exit-menu-btn.exit-end:hover {
    background: #ff5252;
}

.exit-menu-btn.exit-leave {
    background: #ffa726;
    color: white;
}

.exit-menu-btn.exit-leave:hover {
    background: #ff9800;
}

.exit-menu-btn.exit-cancel {
    background: #E8E8E8;
    color: #1a1a1a;
}

.exit-menu-btn.exit-cancel:hover {
    background: #d8d8d8;
}

/* На десктопе - меню рядом с кнопкой */
@media (min-width: 769px) {
    .exit-menu {
        bottom: 90px;
        left: 50%;
        transform: translateX(calc(-50% + 100px)) scale(0.8) translateY(10px);
    }
    
    .exit-menu:not(.hidden) {
        transform: translateX(calc(-50% + 100px)) scale(1) translateY(0);
    }
    
    .exit-menu-buttons {
        flex-direction: column;
    }
    
    .exit-menu-content {
        background: #E8E8E8;
        padding: 12px;
        border-radius: 16px;
        box-shadow: 
            6px 6px 12px rgba(0, 0, 0, 0.2),
            -4px -4px 8px rgba(255, 255, 255, 0.3);
    }
}

/* На мобильных - модальное окно */
@media (max-width: 768px) {
    .exit-menu {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    }
    
    .exit-menu:not(.hidden) {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .exit-menu-content {
        background: #E8E8E8;
        padding: 30px;
        border-radius: 20px;
        max-width: 90%;
        width: 100%;
        max-width: 400px;
        box-shadow: 
            6px 6px 12px rgba(0, 0, 0, 0.2),
            -4px -4px 8px rgba(255, 255, 255, 0.3);
        transform: scale(0.9);
        transition: transform 0.2s ease;
    }
    
    .exit-menu:not(.hidden) .exit-menu-content {
        transform: scale(1);
    }
    
    .exit-menu-buttons {
        min-width: auto;
    }
}

.meeting-main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    background: white !important; /* Белый фон для основной области */
}

/* Надпись "Ожидание участников" */
.waiting-participants-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 16px;
    font-weight: 500;
    z-index: 99;
    pointer-events: none;
    opacity: 0;
    scale: 0.9;
    transition: opacity 0.3s ease, scale 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.waiting-participants-message:not(.hidden) {
    opacity: 1;
    scale: 1;
}

.waiting-participants-message.hidden {
    display: none;
}

.waiting-help-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(102, 102, 102, 0.2);
    border: 1px solid rgba(102, 102, 102, 0.3);
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.waiting-help-btn:hover {
    background: rgba(102, 102, 102, 0.3);
    transform: scale(1.1);
}

.waiting-help-btn svg {
    width: 14px;
    height: 14px;
}

/* Модальное окно помощи для ожидания участников */
.waiting-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.waiting-help-modal:not(.hidden) {
    pointer-events: auto;
}

.waiting-help-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.waiting-help-modal:not(.hidden) .waiting-help-overlay {
    opacity: 1;
}

.waiting-help-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.waiting-help-modal:not(.hidden) .waiting-help-content {
    transform: scale(1);
    opacity: 1;
}

.waiting-help-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.waiting-help-close:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.waiting-help-content p {
    margin: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    padding-right: 20px;
}

.pending-approval-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 152, 0, 0.95);
    color: white;
    padding: 30px 50px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    z-index: 1001;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pending-approval-message:not(.hidden) {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.pending-approval-message.hidden {
    display: none;
}

.pending-user-message {
    background: #FF9800 !important;
    border: 2px solid #F57C00 !important;
    margin: 10px 0;
    padding: 15px;
    border-radius: 12px;
    max-width: 100% !important;
}

.pending-user-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-user-text {
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

.pending-user-text strong {
    font-weight: 700;
    font-size: 15px;
}

.pending-user-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.approve-btn,
.reject-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.approve-btn {
    background: #4CAF50;
    color: white;
}

.approve-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.reject-btn {
    background: #f44336;
    color: white;
}

.reject-btn:hover {
    background: #da190b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.video-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    background: white !important; /* Белый фон */
    min-height: 0;
    overflow: hidden;
}

/* Для двух участников - один участник на весь экран */
.meeting-main.two-participants .video-grid {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    gap: 0 !important;
    background: #2a2a2a !important;
}

.video-item {
    position: relative;
    background: white !important; /* Белый фон для видео */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    min-height: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Красная обводка когда микрофон выключен */
.video-item.mic-muted {
    border: 3px solid #ff4444 !important;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

/* Размытый фон для видео участников */
.video-item .video-background-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) brightness(0.5);
    z-index: 0 !important;
    opacity: 0.7;
    pointer-events: none;
    transform: scale(1.5);
    will-change: transform;
}

.video-item video:not(.video-background-blur) {
    position: relative;
    z-index: 2 !important;
    background: transparent;
}

.video-item:empty::before {
    content: 'Ожидание...';
    color: #999;
    font-size: 14px;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Показываем весь обзор камеры без обрезки */
    transition: opacity 0.1s ease;
}

.video-item .participant-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    font-weight: 500;
}

/* Индикатор загрузки */
.video-item.loading {
    background: #f0f0f0 !important;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 5;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.video-item .participant-name.creator {
    color: #ff4444;
    font-weight: 600;
}

.local-video-container {
    position: absolute;
    top: 60px; /* Опущено ниже для телефонов */
    right: 10px;
    width: 240px;
    height: 180px;
    background: #f0f0f0;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: move;
    touch-action: none;
    user-select: none;
}

/* Когда только один участник - нельзя перетаскивать */
.meeting-main.single-participant .local-video-container {
    cursor: default !important;
    touch-action: auto !important;
}

.local-video-container.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Локальное видео на весь экран когда только один участник (только для десктопа) */
@media (min-width: 769px) {
    .meeting-main.single-participant .local-video-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        right: auto;
        bottom: auto;
        border: none;
        border-radius: 0;
        z-index: 1;
        overflow: visible;
        background: transparent;
    }
}

/* Размытый фон для полноэкранного режима */
.meeting-main.single-participant .video-background-blur {
    position: fixed;
    top: 50%;
    left: 50%;
    /* Зеркальное отражение + масштабирование + центрирование */
    transform: translate(-50%, -50%) scale(1.5) scaleX(-1);
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    filter: blur(50px) brightness(0.4);
    z-index: 1;
    opacity: 0.8;
}

.meeting-main.single-participant .local-video-container video:not(.video-background-blur) {
    z-index: 2;
}

.local-video-container video:not(.video-background-blur) {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Показываем весь обзор камеры без обрезки */
    background: transparent;
    position: relative;
    z-index: 2;
    /* Зеркальное отражение камеры (как в селфи) */
    transform: scaleX(-1);
}

/* Размытый фон-дубляж для локального видео */
.video-background-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) brightness(0.5);
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
    /* Зеркальное отражение + масштабирование для фона */
    transform: scale(1.5) scaleX(-1);
}

.video-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 10px;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Чат - выдвигается слева */
.chat-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    height: 100vh;
    background: #1E1E1E;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%) scale(0.98);
    transition: transform 0.3s ease;
}

.chat-panel:not(.hidden) {
    transform: translateX(0) scale(1);
}

.chat-header {
    padding: 20px;
    background: #252525;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* На десктопе скрываем кнопку закрытия */
@media (min-width: 769px) {
    .chat-close-btn {
        display: none;
    }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    scroll-behavior: smooth;
    background: #1E1E1E;
}

/* Кастомный скроллбар для чата */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1E1E1E;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chat-scroll-to-bottom {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    z-index: 201;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Скрываем кнопку когда чат закрыт */
.chat-panel.hidden ~ .chat-scroll-to-bottom {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Скрываем кнопку если она имеет класс hidden */
.chat-scroll-to-bottom.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.chat-scroll-to-bottom:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-scroll-to-bottom:hover {
    background: linear-gradient(135deg, #357ae8 0%, #2968d1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.5);
}

.chat-scroll-to-bottom svg {
    display: block;
}

/* Предотвращаем скролл страницы при скролле чата */
.chat-messages {
    overscroll-behavior: contain;
}

.chat-messages:focus {
    outline: none;
}

/* Предотвращаем скролл страницы при взаимодействии с чатом */
.chat-panel * {
    overscroll-behavior: contain;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    word-wrap: break-word;
    word-break: break-word;
    flex-shrink: 0;
    animation: messageSlideIn 0.3s ease;
    margin-bottom: 8px;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-message.own {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.chat-message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-message.own .chat-message-content {
    background: transparent;
    color: white;
    border: 2px solid #4285f4;
    border-bottom-right-radius: 4px;
}

.chat-message.other .chat-message-content {
    background: transparent;
    color: white;
    border: 2px solid #4285f4;
    border-bottom-left-radius: 4px;
}

.chat-message-author {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-message.own .chat-message-author {
    color: #4285f4;
    text-align: right;
}

.chat-message.other .chat-message-author {
    color: #BA68C8;
    text-align: left;
}

.chat-input-container {
    display: flex;
    padding: 16px;
    gap: 10px;
    border-top: 1px solid #333;
    background: #252525;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 12px;
    background: #1E1E1E;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
}

.chat-input::placeholder {
    color: #666;
}

.chat-input:focus {
    outline: none;
    border-color: #4285f4;
    background: #252525;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.btn.btn-send,
.btn-send {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%) !important;
    color: white;
    border: none;
    border-radius: 12px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
    flex-shrink: 0;
    font-size: 0;
}

.btn-send:hover {
    background: linear-gradient(135deg, #357ae8 0%, #2968d1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.4);
}

.btn-send:active {
    transform: translateY(0);
}

.btn-send svg {
    display: block;
}

/* Старые контролы внизу - скрыты, оставлены для совместимости */
.meeting-controls {
    display: none;
}

/* Адаптация для одного участника - белый фон как на скриншоте */
.meeting-main.single-participant .video-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: white !important;
}

.meeting-main.single-participant .video-item {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: none;
    background: white !important;
}

/* Адаптация для двух участников - собеседник на весь экран, своё видео в уголке */
.meeting-main.two-participants .video-item {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
    position: relative;
    overflow: hidden;
}

.meeting-main.two-participants .video-item video:not(.video-background-blur) {
    object-fit: contain;
    z-index: 2 !important;
    position: relative;
}

.meeting-main.two-participants .video-item .video-background-blur {
    z-index: 0 !important;
}

/* Показываем локальное видео в уголке когда два участника */
.meeting-main.two-participants .local-video-container {
    display: block;
    position: fixed;
    top: 60px; /* Опущено ниже для телефонов */
    right: 10px;
    width: 240px;
    height: 180px;
    z-index: 100;
}

/* Раскладка для 3 участников (десктоп) - 2 участника рядом, локальное видео внизу справа */
.meeting-main.three-participants .video-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr !important;
    gap: 10px;
    padding: 10px;
    background: #2a2a2a !important;
}

.meeting-main.three-participants .video-item {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
    overflow: hidden;
}

.meeting-main.three-participants .video-item video:not(.video-background-blur) {
    object-fit: contain;
    z-index: 2 !important;
    position: relative;
}

.meeting-main.three-participants .local-video-container {
    display: block;
    position: fixed;
    bottom: 100px;
    right: 10px;
    width: 240px;
    height: 180px;
    z-index: 100;
}

/* Когда только один участник, весь экран белый */
.meeting-main.single-participant {
    background: white !important;
}

/* Планшеты и мобильные устройства */
@media (max-width: 1024px) {
    /* Скрываем размытый фон для всех устройств до 1024px (планшеты и телефоны) */
    .video-item .video-background-blur,
    .meeting-main.two-participants .video-item .video-background-blur,
    .meeting-main.single-participant .local-video-container .video-background-blur {
        display: none !important;
    }
    
    /* Убеждаемся, что основное видео правильно отображается */
    .video-item video:not(.video-background-blur),
    .meeting-main.two-participants .video-item video:not(.video-background-blur) {
        z-index: 2 !important;
        position: relative !important;
        object-fit: contain !important;
    }
}

/* Адаптация для разных размеров экрана на ПК */
@media (max-width: 1400px) and (min-width: 769px) {
    .time-display {
        top: 100px;
        font-size: 70px;
        padding: 30px 60px;
        letter-spacing: 5px;
        min-width: 280px;
        border-radius: 22px;
    }
    
    .btn {
        padding: 32px 100px;
        font-size: 26px;
        min-width: 420px;
        border-radius: 22px;
    }
    
    .main-screen {
        margin-top: 180px;
        gap: 18px;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .time-display {
        top: 120px;
        font-size: 60px;
        padding: 25px 50px;
        letter-spacing: 4px;
        min-width: 260px;
        border-radius: 20px;
    }
    
    .btn {
        padding: 28px 80px;
        font-size: 24px;
        min-width: 360px;
        border-radius: 20px;
    }
    
    .main-screen {
        margin-top: 160px;
        gap: 16px;
    }
}

@media (max-width: 1000px) and (min-width: 769px) {
    .time-display {
        top: 140px;
        font-size: 50px;
        padding: 20px 40px;
        letter-spacing: 3px;
        min-width: 240px;
        border-radius: 18px;
    }
    
    .btn {
        padding: 24px 60px;
        font-size: 22px;
        min-width: 320px;
        border-radius: 18px;
    }
    
    .main-screen {
        margin-top: 140px;
        gap: 14px;
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .time-display {
        top: 160px;
        font-size: 42px;
        padding: 18px 36px;
        letter-spacing: 2.5px;
        min-width: 220px;
        border-radius: 16px;
    }
    
    .btn {
        padding: 20px 50px;
        font-size: 20px;
        min-width: 280px;
        border-radius: 16px;
    }
    
    .main-screen {
        margin-top: 130px;
        gap: 12px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    /* Dynamic Island на мобильных - определяет позицию камеры */
    .dynamic-island {
        top: calc(env(safe-area-inset-top, 8px) - 3px);
        left: 50%;
        transform: translateX(-50%);
    }
    
    .dynamic-island-content {
        padding: 6px 18px;
        min-width: 150px;
        max-width: 150px;
        border-radius: 28px;
    }
    
    .dynamic-island.expanded .dynamic-island-content {
        min-width: 300px;
        max-width: 300px;
        padding: 12px 22px;
        border-radius: 32px;
    }
    
    .call-time,
    .phone-time {
        font-size: 15px;
    }
    
    .expanded-symbols {
        gap: 16px;
    }
    
    .expanded-symbols .symbol {
        font-size: 28px;
    }
    
    /* Таймер встречи на мобильных - скрыт, используется Dynamic Island */
    .meeting-timer {
        display: none !important;
    }
    
    .timer-text {
        min-width: 70px !important;
        font-size: 14px !important;
    }
    
    /* Уменьшаем размеры часиков на мобильных */
    .time-display {
        font-size: 32px !important;
        padding: 12px 24px !important;
        top: 20px !important;
        border-radius: 16px !important;
        letter-spacing: 2px !important;
        min-width: 150px !important;
        box-shadow: 
            3px 3px 6px rgba(0, 0, 0, 0.1),
            -3px -3px 6px rgba(255, 255, 255, 0.9),
            inset 1px 1px 2px rgba(255, 255, 255, 0.8) !important;
    }
    
    /* Уменьшаем размеры кнопок главного меню на мобильных */
    .btn {
        padding: 16px 32px !important;
        font-size: 16px !important;
        min-width: 200px !important;
        border-radius: 16px !important;
    }
    
    .main-screen {
        margin-top: 0 !important;
        gap: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100vh !important;
        width: 100% !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    /* Скрываем нижние иконки на мобильных */
    .bottom-icons {
        display: none !important;
    }
    
    /* Уменьшаем размеры форм на мобильных */
    .create-meeting-screen,
    .join-meeting-screen {
        padding: 30px 25px !important;
        min-width: auto !important;
        width: 90% !important;
        max-width: 400px !important;
        border-radius: 20px !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) translateY(80px) !important;
    }
    
    .create-meeting-screen.showing,
    .join-meeting-screen.showing {
        transform: translate(-50%, -50%) translateY(0) !important;
    }
    
    .create-meeting-screen h2,
    .join-meeting-screen h2 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    
    .input-field {
        padding: 18px 20px !important;
        font-size: 16px !important;
        min-height: 55px !important;
        margin-bottom: 18px !important;
        border-radius: 12px !important;
    }
    
    .btn-submit,
    .btn-back {
    border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 14px 24px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        margin-top: 10px !important;
    }
    
    /* Основной контейнер - белый фон */
    .meeting-container {
        background: white !important;
    }
    
    .meeting-main {
        background: white !important;
    }
    
    /* Видео сетка - белый фон, всегда скрыта когда один участник */
    .video-grid {
        background: white !important;
    }
    
    /* Скрываем видео сетку когда один участник */
    .meeting-main.single-participant .video-grid {
        display: none !important;
    }
    
    /* Скрываем все видео элементы в сетке на мобильных когда один участник */
    .meeting-main.single-participant .video-item {
        display: none !important;
    }
    
    /* Локальное видео в правом верхнем углу - компактное и перетаскиваемое */
    .local-video-container {
        position: fixed !important;
        top: 80px !important; /* Опущено ниже для телефонов */
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        width: 100px !important;
        height: 140px !important;
        max-width: 100px !important;
        max-height: 140px !important;
        min-width: 100px !important;
        min-height: 140px !important;
        z-index: 1000 !important;
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        background: #f0f0f0;
        transform: none !important;
        cursor: move;
        touch-action: none;
        user-select: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* Когда только один участник - нельзя перетаскивать */
    .meeting-main.single-participant .local-video-container {
        cursor: default !important;
        touch-action: auto !important;
    }
    
    .local-video-container.dragging {
        opacity: 0.8;
        transform: scale(1.05) !important;
        z-index: 10000 !important;
    }
    
    .meeting-main.single-participant .local-video-container video:not(.video-background-blur) {
        object-fit: cover !important;
        border-radius: 8px;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Скрываем размытый фон на мобильных */
    .meeting-main.single-participant .local-video-container .video-background-blur {
        display: none !important;
    }
    
    /* Скрываем метку "Твоя камера" на мобильных */
    .meeting-main.single-participant .local-video-container .video-label {
        display: none;
    }
    
    /* Убеждаемся, что локальное видео не на весь экран на мобильных */
    .meeting-main.single-participant .local-video-container {
        width: 120px !important;
        height: 160px !important;
    }
    
    /* Плашки статуса на мобильных */
    .device-status-notifications {
        bottom: 90px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        position: fixed !important;
    }
    
    .status-notification {
        font-size: 12px !important;
        padding: 10px 20px !important;
        z-index: 9999 !important;
        position: relative !important;
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .status-notification:not(.hidden) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .status-notification.hidden {
        display: none !important;
    }
    
    /* Чат на мобильных - на весь экран */
    .chat-panel {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-messages {
        flex: 1 !important;
        padding-bottom: 90px !important; /* Отступ снизу чтобы строка ввода не перекрывала сообщения */
        overflow-y: auto !important;
        min-height: 0 !important;
    }
    
    .chat-input-container {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 12px 16px !important;
        background: #252525 !important;
        border-top: 1px solid #333 !important;
        z-index: 10001 !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3) !important;
        display: flex !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }
    
    .chat-input {
        font-size: 16px !important; /* Увеличиваем для мобильных чтобы не было зума при фокусе */
        padding: 14px 16px !important;
        flex: 1 !important;
        min-width: 0 !important; /* Важно для правильной работы flex */
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .chat-input::placeholder {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    /* Панель управления внизу - адаптивная */
    .meeting-controls-bottom {
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        padding: 10px 15px;
        flex-direction: column !important;
        transform: none !important;
        align-items: stretch !important;
    }
    
    .meeting-id-container {
        width: 100%;
        order: 1;
        padding: 8px 12px;
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .control-buttons-bottom {
        display: flex;
        gap: 8px;
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .btn-control-bottom {
        width: 50px;
        height: 50px;
    }
    
    .btn-control-bottom svg {
        width: 22px;
        height: 22px;
    }
    
    /* Скрываем кнопки только для ПК на мобильных */
    .desktop-only {
        display: none !important;
    }
}

/* Горизонтальная ориентация на телефонах */
@media (max-width: 768px) and (orientation: landscape) {
    /* Панель управления справа вертикально */
    .meeting-controls-bottom {
        position: fixed !important;
        top: 50% !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
        transform: translateY(-50%) !important;
        flex-direction: column !important;
        width: auto !important;
        padding: 15px 10px !important;
        border-radius: 16px !important;
        gap: 12px !important;
        align-items: center !important;
    }
    
    /* Скрываем ID встречи в панели управления (он будет показан отдельно вверху) */
    .meeting-controls-bottom .meeting-id-container {
        display: none !important;
    }
    
    /* Кнопки управления вертикально */
    .control-buttons-bottom {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }
    
    .btn-control-bottom {
        width: 50px !important;
        height: 50px !important;
        margin: 0 !important;
    }
    
    /* Локальное видео внизу слева */
    .meeting-main.single-participant .local-video-container,
    .local-video-container {
        position: fixed !important;
        bottom: 10px !important;
        left: 10px !important;
        top: auto !important;
        right: auto !important;
        width: 140px !important;
        height: 100px !important;
        z-index: 100 !important;
        border-radius: 12px !important;
    }
    
    /* Основной экран - белый фон */
    .meeting-main.single-participant {
        background: white !important;
    }
    
    .meeting-main.single-participant .video-grid {
        background: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Таймер сверху по центру */
    .meeting-timer {
        top: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    /* ID встречи рядом с таймером */
    .meeting-id-container {
        position: fixed !important;
        top: 80px !important; /* Опущено ниже для телефонов */
        left: 120px !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
        z-index: 1000 !important;
    }
    
    /* Плашки статуса внизу по центру */
    .device-status-notifications {
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
    }
    
    /* Основной экран видео - белый фон, по центру */
    .meeting-main {
        background: white !important;
    }
    
    .video-grid {
        background: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
    }
    
    /* Видео участника занимает большую часть экрана */
    .video-item {
        width: 100% !important;
        height: 100% !important;
        max-width: calc(100% - 200px) !important;
        max-height: calc(100vh - 20px) !important;
    }
    
    /* Для двух участников - также перестраиваем */
    .meeting-main.two-participants .local-video-container {
        position: fixed !important;
        bottom: 10px !important;
        left: 10px !important;
        width: 140px !important;
        height: 100px !important;
    }
    
    /* Для трех участников - перестраиваем layout */
    .meeting-main.three-participants .local-video-container {
        position: fixed !important;
        bottom: 10px !important;
        left: 10px !important;
        width: 140px !important;
        height: 100px !important;
    }
    
    /* Скрываем надпись "Ожидание участников" на мобильных */
    .waiting-participants-message {
        display: none !important;
    }
    
    /* Для двух участников на мобильных - собеседник на весь экран */
    .meeting-main.two-participants .video-grid {
        background: white !important;
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .meeting-main.two-participants .video-item {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Скрываем размытый фон на мобильных для удаленных участников */
    .meeting-main.two-participants .video-item .video-background-blur,
    .video-item .video-background-blur {
        display: none !important;
    }
    
    /* Убеждаемся, что основное видео правильно отображается на мобильных */
    .meeting-main.two-participants .video-item video:not(.video-background-blur) {
        z-index: 2 !important;
        position: relative !important;
        object-fit: contain !important;
    }
    
    .meeting-main.two-participants .local-video-container {
        width: 100px !important;
        height: 140px !important;
        top: 80px !important; /* Опущено ниже для телефонов */
        right: 10px !important;
        position: fixed !important;
    }
    
    /* Раскладка для 3 участников на мобильных - локальное видео сверху справа, 2 участника ниже */
    .meeting-main.three-participants .video-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px !important;
        background: white !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow-y: auto;
    }
    
    .meeting-main.three-participants .video-item {
        width: 100% !important;
        flex: 1 !important;
        min-height: 0 !important;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .meeting-main.three-participants .video-item video:not(.video-background-blur) {
        object-fit: contain !important;
        z-index: 2 !important;
        position: relative !important;
    }
    
    .meeting-main.three-participants .local-video-container {
        position: fixed !important;
        top: 80px !important; /* Опущено ниже для телефонов */
        right: 10px !important;
        width: 100px !important;
        height: 140px !important;
        z-index: 100 !important;
        border-radius: 8px;
        border: 1px solid #ddd;
        background: #f0f0f0;
    }
    
    /* Скрываем размытый фон на мобильных для 3 участников */
    .meeting-main.three-participants .video-item .video-background-blur {
        display: none !important;
    }
}

.meeting-container:not(:has(.video-item)) {
    background: white !important;
}

/* Когда нет участников, показываем пустой экран */
.video-grid:empty::before {
    content: 'Ожидание участников...';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
    height: 100%;
}

/* Звуковая панель */
.soundboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.soundboard-modal:not(.hidden) {
    pointer-events: auto;
}

.soundboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.soundboard-modal.soundboard-open .soundboard-overlay {
    opacity: 1;
}

.soundboard-content {
    position: relative;
    background: #2a2a2a;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    padding-bottom: 40px;
    transform: translateY(100%) scale(0.95);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
    will-change: transform;
}

.soundboard-modal.soundboard-open .soundboard-content {
    transform: translateY(0) scale(1);
}

.soundboard-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d0d0d0;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
}

.sound-btn-play,
.sound-btn-edit,
.sound-btn-download,
.sound-btn-stop {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sound-btn-play svg,
.sound-btn-edit svg,
.sound-btn-download svg,
.sound-btn-stop svg {
    width: 20px;
    height: 20px;
}

.sound-btn-play:hover:not(:disabled),
.sound-btn-edit:hover:not(:disabled),
.sound-btn-download:hover:not(:disabled),
.sound-btn-stop:hover:not(:disabled) {
    background: #333;
    transform: scale(1.05);
}

.sound-btn-play:active:not(:disabled),
.sound-btn-edit:active:not(:disabled),
.sound-btn-download:active:not(:disabled),
.sound-btn-stop:active:not(:disabled) {
    transform: scale(0.95);
}

/* Состояние загрузки */
.sound-btn-play:disabled,
.sound-btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sound-btn-play.uploading,
.sound-btn-download.uploading {
    position: relative;
    opacity: 0.6;
}

.sound-btn-play.uploading::after,
.sound-btn-download.uploading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sound-label.uploading {
    color: #666;
    font-style: italic;
    position: relative;
}

.sound-label.uploading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.sound-btn-download {
    border-radius: 8px;
    margin-left: auto;
}

.sound-label {
    flex: 1;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sound-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(42, 42, 42, 0.95);
    border-radius: 12px;
    padding: 12px 16px;
}

.sound-progress:not(.hidden) {
    display: flex;
}

.sound-progress-bar {
    flex: 1;
    height: 4px;
    background: #555;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.sound-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #6A6AFF;
    border-radius: 2px;
    transition: width 0.1s linear;
    width: var(--progress, 0%);
}

.soundboard-close {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background: #ff4444;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.soundboard-close:hover {
    background: #ff3333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.soundboard-close:active {
    background: #ff2222;
    transform: translateY(0);
}

/* Редактирование названия звука */
.sound-label.editing {
    display: none;
}

.sound-label-input {
    flex: 1;
    background: white;
    border: 2px solid #6A6AFF;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 16px;
    color: #1a1a1a;
    outline: none;
    min-width: 0;
}

.sound-label-input:focus {
    border-color: #5a5aff;
}

/* Модальное окно настроек */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.settings-modal:not(.hidden) {
    pointer-events: auto;
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-modal:not(.hidden) .settings-overlay {
    opacity: 1;
}

.settings-content {
    position: relative;
    background: #2a2a2a;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    padding: 24px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.settings-modal:not(.hidden) .settings-content {
    transform: scale(1);
    opacity: 1;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.settings-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-body {
    margin-bottom: 24px;
}

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

.settings-group label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.settings-select {
    width: 100%;
    padding: 12px 16px;
    background: #3a3a3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.settings-select:hover {
    background: #404040;
    border-color: rgba(255, 255, 255, 0.2);
}

.settings-select:focus {
    border-color: #6A6AFF;
    background: #404040;
}

.settings-select option {
    background: #3a3a3a;
    color: #fff;
}

.settings-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.settings-save-btn,
.settings-cancel-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-save-btn {
    background: #6A6AFF;
    color: white;
}

.settings-save-btn:hover {
    background: #5a5aff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(106, 106, 255, 0.3);
}

.settings-save-btn:active {
    transform: translateY(0);
}

.settings-cancel-btn {
    background: #3a3a3a;
    color: #fff;
}

.settings-cancel-btn:hover {
    background: #404040;
}

/* Адаптивность для настроек на мобильных (хотя кнопка скрыта) */
@media (max-width: 768px) {
    .settings-content {
        width: 95%;
        padding: 20px;
    }
    
    .settings-header h3 {
        font-size: 18px;
    }
}

/* Модальное окно информации о встрече */
.timer-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.timer-info-modal:not(.hidden) {
    pointer-events: auto;
}

.timer-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timer-info-modal:not(.hidden) .timer-info-overlay {
    opacity: 1;
}

.timer-info-content {
    position: relative;
    background: #4a4a4a;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timer-info-modal:not(.hidden) .timer-info-content {
    transform: scale(1);
    opacity: 1;
}

.timer-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.timer-info-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    flex: 1;
}

.timer-info-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.timer-info-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.timer-info-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timer-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.timer-info-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.timer-info-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.timer-info-date-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.timer-info-date-time > div {
    text-align: center;
}

.timer-info-symbols-display {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-info-symbols-display .symbol-display {
    font-size: 32px;
    line-height: 1;
    animation: symbolPulse 2s ease-in-out infinite;
}

.timer-info-symbols-display .symbol-display:nth-child(1) {
    animation-delay: 0s;
}

.timer-info-symbols-display .symbol-display:nth-child(2) {
    animation-delay: 0.2s;
}

.timer-info-symbols-display .symbol-display:nth-child(3) {
    animation-delay: 0.4s;
}

.timer-info-symbols-display .symbol-display:nth-child(4) {
    animation-delay: 0.6s;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .timer-info-content {
        width: 95%;
        padding: 20px;
    }
    
    .timer-info-header h3 {
        font-size: 18px;
    }
    
    .timer-info-value {
        font-size: 16px;
    }
}

/* Кнопка рисования в чате */
.btn.btn-draw,
.btn-draw {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    background: #3a3a3a !important;
    color: white;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0;
}

.btn-draw:hover {
    background: #4a4a4a !important;
    border-color: #444 !important;
}

.btn-draw:active {
    transform: scale(0.95);
}

.btn-draw svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Мобильные устройства - уменьшаем кнопку рисования */
@media (max-width: 768px) {
    .btn.btn-draw,
    .btn-draw {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 8px !important;
    }
    
    .btn-draw svg {
        width: 18px;
        height: 18px;
    }
}

/* Модальное окно совместного рисования */
.paint-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: #E8E8E8;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    opacity: 0;
    scale: 0.98;
    transition: opacity 0.3s ease, scale 0.3s ease;
}

.paint-modal:not(.hidden) {
    opacity: 1;
    scale: 1;
}

.paint-modal.hidden {
    display: none;
}

.paint-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Левая панель управления слайдами */
.paint-sidebar {
    width: 60px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
}

.paint-sidebar-btn {
    width: 44px;
    height: 44px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.paint-sidebar-btn:hover {
    background: #3a3a3a;
    border-color: #444;
}

.paint-sidebar-btn:active {
    transform: scale(0.95);
}

.paint-slides-list {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.paint-slide-thumb {
    width: 48px;
    height: 44px;
    background: white;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.paint-slide-thumb.active {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
}

.paint-slide-thumb canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Основная область */
.paint-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #E8E8E8;
}

/* Верхняя панель инструментов */
.paint-toolbar {
    background: #D0D0D0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #B0B0B0;
    gap: 16px;
}

.paint-sidebar-btn.paint-close-btn {
    background: #ff4444 !important;
    border-color: #ff3333 !important;
    color: white !important;
}

.paint-sidebar-btn.paint-close-btn:hover {
    background: #ff3333 !important;
    border-color: #ff2222 !important;
}

.paint-sidebar-btn.paint-close-btn:active {
    background: #ff2222 !important;
}

.paint-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.paint-tool-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #B0B0B0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #1a1a1a;
}

.paint-tool-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.paint-tool-btn.active {
    background: #4285f4;
    border-color: #357ae8;
    color: white;
}

.paint-tool-btn:active {
    transform: scale(0.95);
}

.paint-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.paint-brush-size {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #B0B0B0;
}

.paint-brush-size-label {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

#paintBrushSize {
    width: 80px;
    height: 6px;
    cursor: pointer;
}

.paint-brush-size-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.paint-action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #B0B0B0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #1a1a1a;
}

.paint-action-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.paint-action-btn:active {
    transform: scale(0.95);
}

.paint-color-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #B0B0B0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 4px;
}

.paint-color-btn:hover {
    border-color: #999;
}

.paint-color-preview {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: #000000;
}

/* Canvas область */
.paint-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    background: #E8E8E8;
}

#paintCanvas {
    background: white;
    border: 1px solid #B0B0B0;
    border-radius: 4px;
    cursor: crosshair;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Цветовая палитра */
.paint-color-picker {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    border: 1px solid #B0B0B0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 3001;
}

.paint-color-picker.hidden {
    display: none;
}

.paint-color-picker-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#paintColorInput {
    width: 100%;
    height: 40px;
    border: 1px solid #B0B0B0;
    border-radius: 8px;
    cursor: pointer;
}

.paint-color-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.paint-color-preset {
    width: 32px;
    height: 32px;
    border: 1px solid #B0B0B0;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.paint-color-preset:hover {
    transform: scale(1.1);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .paint-sidebar {
        width: 50px;
        padding: 8px 0;
    }
    
    .paint-sidebar-btn {
        width: 40px;
        height: 40px;
    }
    
    .paint-slide-thumb {
        width: 40px;
        height: 30px;
    }
    
    .paint-toolbar {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    
    .paint-tool-btn {
        width: 40px;
        height: 40px;
    }
    
    .paint-color-btn {
        width: 40px;
        height: 40px;
    }
    
    .paint-canvas-container {
        padding: 10px;
    }
    
    .paint-brush-size {
        padding: 4px 8px;
        gap: 6px;
    }
    
    .paint-brush-size-label {
        font-size: 12px;
    }
    
    #paintBrushSize {
        width: 60px;
    }
}

/* Модальное окно выбора слайдов для скачивания */
.paint-download-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.paint-download-modal:not(.hidden) {
    pointer-events: auto;
}

.paint-download-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.paint-download-modal:not(.hidden) .paint-download-overlay {
    opacity: 1;
}

.paint-download-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 0;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 4001;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.paint-download-modal:not(.hidden) .paint-download-content {
    transform: scale(1);
    opacity: 1;
}

.paint-download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.paint-download-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
}

.paint-download-close {
    background: none;
    border: none;
    color: #1a1a1a;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.paint-download-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.paint-download-body {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 24px;
    margin: 0;
}

.paint-download-slide-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.paint-download-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #4285f4;
}

.paint-download-slide-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.paint-download-slide-thumb {
    width: 120px;
    height: 90px;
    background: white;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.paint-download-slide-thumb:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
    transform: translateY(-2px);
}

.paint-download-slide-thumb canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.paint-download-slide-number {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.paint-download-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.paint-download-btn-select-all,
.paint-download-btn-deselect-all,
.paint-download-btn-download,
.paint-download-btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.paint-download-btn-select-all,
.paint-download-btn-deselect-all {
    background: #3a3a3a;
    color: white;
}

.paint-download-btn-select-all:hover,
.paint-download-btn-deselect-all:hover {
    background: #4a4a4a;
}

.paint-download-btn-download {
    background: #4285f4;
    color: white;
}

.paint-download-btn-download:hover {
    background: #357ae8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.paint-download-btn-cancel {
    background: #E8E8E8;
    color: #1a1a1a;
    border: 1px solid #B0B0B0;
}

.paint-download-btn-cancel:hover {
    background: #D0D0D0;
}

/* Сообщение о подготовке файла */
.paint-download-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    color: white;
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    z-index: 5000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.paint-download-progress.hidden {
    display: none;
}

/* Модальное окно истории встреч */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-modal.hidden {
    display: none;
}

.history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.history-content {
    position: relative;
    background: #E8E8E8;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.2),
        -4px -4px 8px rgba(255, 255, 255, 0.3);
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.history-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.history-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.history-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.history-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-clear-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: #E8E8E8;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.history-clear-btn:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.08),
        -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transform: translateY(1px);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 16px 20px;
    border-radius: 12px;
    background: #E8E8E8;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.08),
        -2px -2px 4px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    transform: translateY(1px);
}

.history-item-id {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
}

.history-item-date {
    color: #666;
    font-size: 14px;
}

.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Новые всплывающие панели */
.history-panel,
.help-panel {
    position: fixed;
    bottom: 40px;
    width: min(460px, 92vw);
    background: #101011;
    color: #fff;
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    z-index: 1500;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.history-panel {
    left: 40px;
}

.help-panel {
    right: 40px;
}

.history-panel.panel-hidden,
.help-panel.panel-hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}


.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
}

.panel-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.history-panel-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-panel-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
}

.history-panel .history-item {
    background: linear-gradient(120deg, #202022, #1a1a1c);
    border: none;
    border-radius: 28px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.history-panel .history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.history-item-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item-date-large {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.history-item-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

.history-item-open {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
}

.history-clear-btn-small {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.history-clear-btn-small:hover {
    background: rgba(255, 255, 255, 0.15);
}

.help-content {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.4;
}

/* Модальное окно детальной информации о встрече */
.meeting-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meeting-details-modal.hidden {
    display: none;
}

.meeting-details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.meeting-details-content {
    position: relative;
    background: #E8E8E8;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.2),
        -4px -4px 8px rgba(255, 255, 255, 0.3);
    z-index: 2101;
    max-height: 80vh;
    overflow-y: auto;
}

.meeting-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.meeting-details-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.meeting-details-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.meeting-details-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.meeting-details-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

.detail-participants {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.detail-participant {
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .main-actions {
        width: calc(90px * 2 + 14px + 32px * 2) !important;
        max-width: 90vw;
        grid-template-columns: repeat(2, 90px);
        grid-template-rows: repeat(2, 90px);
        justify-items: center;
        align-items: center;
        justify-content: center;
        padding: 28px 32px;
        aspect-ratio: 1 / 1;
        margin: 0 auto !important;
        /* Эффект стекла iOS - glassmorphism */
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.15);
        /* Градиент для эффекта преломления света */
        background-image: 
            linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
    }
    
    .actions-row {
        gap: 12px;
    }
    
    .action-btn {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
        border-radius: 20px;
        font-size: 18px;
    }
    
    .meeting-details-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    
    .meeting-details-header h2 {
        font-size: 20px;
    }
    
    .history-panel,
    .help-panel {
        left: 5%;
        right: 5%;
        width: 90%;
        bottom: 20px;
    }
}



/* ==========================================
   МОДАЛЬНОЕ ОКНО УЧАСТНИКОВ
   ========================================== */

/* Оверлей модального окна */
.participants-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.participants-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

/* Контент модального окна */
.participants-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.participants-modal:not(.hidden) .participants-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Заголовок модального окна */
.participants-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.participants-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.participants-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.participants-modal-close:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* Список участников */
.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Элемент участника */
.participant-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.participant-item:hover {
    background: #f5f5f5;
}

.participant-item.active {
    background: #e8f4ff;
}

/* Аватарка участника */
.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Информация об участнике */
.participant-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.participant-info .participant-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    
    position: static;
    background: transparent;
    padding: 0;
    border-radius: 0;
    z-index: auto;
}

/* Иконка короны для создателя */
.participant-crown {
    font-size: 16px;
    margin-left: 4px;
}

/* ==========================================
   МЕНЮ ДЕЙСТВИЙ УЧАСТНИКА
   ========================================== */

.participant-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.participant-item.active .participant-actions {
    opacity: 1;
    max-height: 300px;
}

.participant-action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Кнопка личного сообщения */
.participant-action-btn.action-dm {
    background: #e3f2fd;
    color: #1976d2;
}

.participant-action-btn.action-dm:hover {
    background: #bbdefb;
    transform: translateX(4px);
}

/* Кнопка кика */
.participant-action-btn.action-kick {
    background: #ffebee;
    color: #c62828;
}

.participant-action-btn.action-kick:hover {
    background: #ffcdd2;
    transform: translateX(4px);
}

/* Кнопка мута */
.participant-action-btn.action-mute {
    background: #ffebee;
    color: #d32f2f;
}

.participant-action-btn.action-mute:hover {
    background: #ffcdd2;
    transform: translateX(4px);
}

/* Кнопка передачи админки */
.participant-action-btn.action-transfer {
    background: #fff9c4;
    color: #f57f17;
}

.participant-action-btn.action-transfer:hover {
    background: #fff59d;
    transform: translateX(4px);
}

/* ==========================================
   ЛИЧНЫЕ СООБЩЕНИЯ В ЧАТЕ
   ========================================== */

/* Стили для личных сообщений */
.chat-message.private {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%) !important;
    border-left: 4px solid #7b1fa2;
    position: relative;
    padding-left: 16px;
}

.chat-message.private .chat-message-user {
    color: #fff !important;
    font-weight: 600;
}

.chat-message.private .chat-message-text {
    color: #fff !important;
}

.chat-message.private .chat-message-time {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Индикатор личного сообщения */
.private-message-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* ==========================================
   ИНДИКАТОР ПОЛУЧАТЕЛЯ ЛИЧНЫХ СООБЩЕНИЙ
   ========================================== */

.private-recipient-indicator {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 -2px 8px rgba(156, 39, 176, 0.3);
    animation: slideUpFadeIn 0.3s ease;
}

.private-recipient-indicator.hidden {
    display: none !important;
}

.private-recipient-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.private-recipient-text .lock-icon {
    font-size: 16px;
}

.private-recipient-cancel {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.private-recipient-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ==========================================
   КНОПКА УЧАСТНИКОВ В ПАНЕЛИ УПРАВЛЕНИЯ
   ========================================== */

.btn-participants {
    width: 56px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #5B63FF;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.15),
        -2px -2px 4px rgba(255, 255, 255, 0.5),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0;
    font-size: 0;
    line-height: 1;
}

.btn-participants svg {
    width: 24px;
    height: 24px;
}

.btn-participants:hover {
    box-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.12),
        -1px -1px 2px rgba(255, 255, 255, 0.4),
        inset 1px 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(1px);
}

.btn-participants:active {
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    transform: translateY(2px);
}

.btn-participants.active {
    background: #6A6AFF;
    color: white;
    box-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-participants.active:hover {
    background: #5a5aff;
    box-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.15),
        -1px -1px 2px rgba(255, 255, 255, 0.2),
        inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================== */

@media (max-width: 768px) {
    /* Модальное окно на всю высоту на мобильных */
    .participants-modal-content {
        max-width: 100%;
        max-height: 100vh;
        width: 100%;
        border-radius: 20px 20px 0 0;
        /* Glassmorphism для мобильных */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }

    /* Меню действий на мобильных */
    .participant-actions {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Индикатор получателя на мобильных */
    .private-recipient-indicator {
        border-radius: 0;
        padding: 12px 16px;
    }
}

/* ==========================================
   ДОПОЛНИТЕЛЬНЫЕ АНИМАЦИИ
   ========================================== */

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

/* Плавное появление элементов списка */
.participant-item {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== УЧАСТНИКИ И ЛИЧНЫЕ СООБЩЕНИЯ ===== */
.participants-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.participants-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}
.participants-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
.participants-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}
.participants-modal:not(.hidden) .participants-content {
    transform: scale(1);
}
.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.participants-header h3 {
    margin: 0;
    color: #ffffff;
}
.participants-close {
    background: #E8E8E8;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.15), -2px -2px 4px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    color: #666;
}
.participant-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.participant-item:hover {
    background: #f5f5f5;
}
.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}
.participant-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}
.participant-crown {
    margin-left: 5px;
}
.participant-you {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}
.participant-actions {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-top: 8px;
}
.participant-item.active .participant-actions {
    display: flex;
}
.participant-action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.action-dm {
    background: #e3f2fd;
    color: #1976d2;
}
.action-kick {
    background: #ffebee;
    color: #c62828;
}
.action-mute {
    background: #fff3e0;
    color: #e65100;
}
.action-transfer {
    background: #fff9c4;
    color: #f57f17;
}
.chat-message.private {
    background: linear-gradient(135deg, #9c27b0, #ba68c8) !important;
    border-left: 4px solid #7b1fa2;
    color: white !important;
}
.chat-message.private .chat-author {
    color: rgba(255,255,255,0.9) !important;
}
.private-badge {
    font-size: 10px;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}
.private-recipient-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #9c27b0;
    color: white;
    font-size: 13px;
    border-radius: 8px 8px 0 0;
}
.private-recipient-indicator button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}
.btn-participants {
    background: #E8E8E8;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-participants {
    background: #5B63FF !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    width: 44px;
    height: 44px;
}
.btn-participants:hover {
    background: #4a50e6 !important;
}
.participants-content {
    background: #2C2C2C !important;
    color: #fff !important;
}
.participants-header {
    border-bottom: 1px solid #444 !important;
}
.participants-header h3 {
    color: #fff !important;
}
.participants-close {
    background: #E8E8E8 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.15), -2px -2px 4px rgba(255, 255, 255, 0.5) !important;
    color: #aaa !important;
}
.participant-item {
    color: #fff;
}
.participant-item:hover {
    background: #3C3C3C !important;
}
.participant-name {
    color: #fff !important;
}
.participant-actions {
    background: #1a1a1a !important;
}
