:root {
    --primary-color: #5865f2;
    --secondary-color: #424549;
    --dark-color: #36393f;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--light-color);
    overflow-x: hidden;
}

/* Анимированный градиентный фон */
.animated-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Эффект размытия поверх анимированного фона */
.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Анимация для градиента */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.hero-section {
    padding-top: 15rem;
    text-align: center;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: fadeIn 0.8s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-weight: 700;
    color: white;
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-label {
    color: white;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4752c4;
    border-color: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.alert {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s ease-out;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Анимация для волн (дополнительный декоративный элемент) */
.waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 150px;
    opacity: 0.5;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23fff'%3E%3C/path%3E%3C/svg%3E");
    background-size: 1200px 100px;
}

.wave1 {
    animation: wave 8s linear infinite;
    opacity: 0.3;
}

.wave2 {
    animation: wave 10s linear -0.125s infinite;
    opacity: 0.5;
}

.wave3 {
    animation: wave 12s linear -0.25s infinite;
    opacity: 0.7;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1200px;
    }
}

/* Адаптивность */
@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
    }

    .hero-section {
        padding-top: 10rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .waves {
        height: 10vh;
        min-height: 70px;
    }
}

/* ... предыдущие стили ... */

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: white;
}

.glass-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.glass-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.glass-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    color: white;
}

.btn-rounded {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Анимация для карточек участников */
.participant-card {
    transition: all 0.3s ease;
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Стили для скроллбара */
.message-container::-webkit-scrollbar {
    width: 8px;
}

.message-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.message-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.message-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Индикация говорящих пользователей */
.participant-card.speaking {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* Анимация пульсации для говорящих */
@keyframes pulse-speaking {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.participant-card.speaking .participant-avatar {
    animation: pulse-speaking 2s infinite;
}

/* Voice channel specific styles */
.participant-card.connected {
    border-color: rgba(255, 255, 255, 0.2);
}

.participant-card.speaking {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* Animation for speaking indicator */
@keyframes pulse-speaking {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.participant-card.speaking .participant-avatar {
    animation: pulse-speaking 2s infinite;
}

/* Button styles */
.btn-rounded {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}


/* Video element styles */
#local-video {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 160px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
    object-fit: cover;
    background: #000;
}

/* Camera indicator in participant cards */
.camera-indicator {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Responsive design for video */
@media (max-width: 768px) {
    #local-video {
        width: 120px;
        height: 90px;
        bottom: 80px;
        right: 10px;
    }
}