/* Estilos globales */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Funnel Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    overflow: hidden;
}

/* Cookie policy banner */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    z-index: 9999;
    transition: bottom 0.5s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
    flex: 1;
    padding-right: 20px;
}

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

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn.accept {
    background: #4285f4;
    color: white;
}

.cookie-btn.accept:hover {
    background: #3367d6;
}

.cookie-btn.exit {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn.exit:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-content p {
        margin-bottom: 15px;
        padding-right: 0;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* Logo principal en esquina superior izquierda */
.main-logo {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1001;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.main-logo img {
    height: 22px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Ocultar logo cuando se inicia la reunión */
.main-logo.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Dialog de controles con tema oscuro y efecto glass */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Clase para fade out */
.dialog-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#controls-dialog .dialog-content {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 64px;
    position: relative;
    overflow: hidden;
    width: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Efecto glass adicional con pseudo-elemento */
#controls-dialog .dialog-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

.dialog-content {
    text-align: center;
    color: #ffffff;
}

.dialog-content h2 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.beta-text {
    margin: 0 0 30px 0;
    color: #888888;
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
    opacity: 0.8;
}

.dialog-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Guest counter */
.guest-counter {
    margin-top: 60px;
    margin-bottom: 15px;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0.9;
}

/* Overlay description text */
.overlay-description {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    opacity: 0.8;
    pointer-events: none;
}

/* Estilos para botones circulares */
.circular-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, #00d4aa 0%, #00a3e0 100%);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Botón principal más grande */
.circular-btn.main-btn {
    width: 80px;
    height: 80px;
    font-size: 32px;
    background: linear-gradient(135deg, #00d4aa 0%, #00a3e0 100%);
    animation: ringAnimation 3s infinite;
}

/* Animación de ring para simular llamada entrante */
@keyframes ringAnimation {

    0%,
    70%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    5%,
    15% {
        transform: scale(1.1);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 0 10px rgba(0, 160, 133, 0.3),
            0 0 0 20px rgba(0, 160, 133, 0.1);
    }

    10% {
        transform: scale(1.05);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 0 15px rgba(0, 160, 133, 0.2),
            0 0 0 30px rgba(0, 160, 133, 0.05);
    }

    25%,
    35% {
        transform: scale(1.1);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 0 10px rgba(0, 160, 133, 0.3),
            0 0 0 20px rgba(0, 160, 133, 0.1);
    }

    30% {
        transform: scale(1.05);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 0 15px rgba(0, 160, 133, 0.2),
            0 0 0 30px rgba(0, 160, 133, 0.05);
    }
}

/* Efectos hover para botones circulares */
.circular-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.circular-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.circular-btn.main-btn:hover {
    background: linear-gradient(135deg, #008f75 0%, #005f8a 100%);
}

.circular-btn.support-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 50%, #ff7675 100%);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.circular-btn.support-btn:hover {
    background: linear-gradient(135deg, #e63946 0%, #d62d20 50%, #c1121f 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 71, 87, 0.5);
}

/* Support button in top right corner */
.support-btn-corner {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 50%, #ff7675 100%);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-btn-corner:hover {
    background: linear-gradient(135deg, #e63946 0%, #d62d20 50%, #c1121f 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* Info button in top right corner */
.info-btn-corner {
    position: fixed;
    top: 20px;
    right: 70px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-btn-corner:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.circular-btn:not(.main-btn):hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Iconos de Tabler dentro de botones */
.circular-btn i {
    font-size: inherit;
    line-height: 1;
}

/* Tooltips personalizados */
.circular-btn {
    position: relative;
}

.circular-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.circular-btn::before {
    content: '';
    position: absolute;
    bottom: -37px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid rgba(0, 0, 0, 0.75);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.circular-btn:hover::after,
.circular-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Ocultar tooltips nativos del navegador */
.circular-btn[title] {
    position: relative;
}

.circular-btn[title]:hover {
    /* Esto previene que aparezca el tooltip nativo */
}

/* Botón flotante de settings */
.floating-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-settings-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Settings Drawer */
.settings-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-drawer.open {
    transform: translateY(0);
}

.drawer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.drawer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 100px;
    margin: 0 8px;
}

.drawer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Support Drawer */
.support-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.support-drawer.open {
    right: 0;
}

.support-drawer .drawer-content {
    padding: 2rem;
    text-align: left;
    color: white;
    position: relative;
    display: block;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    min-height: 100%;
}

.support-drawer h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.support-drawer p {
    margin: 0;
    opacity: 0.8;
    font-size: 1rem;
}

/* Close button for support drawer */
.close-drawer-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

/* Info Drawer */
.info-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.info-drawer.open {
    right: 0;
}

.info-drawer .drawer-content {
    padding: 2rem;
    color: white;
    position: relative;
    display: block;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    min-height: 100%;
}

.info-content,
.support-content {
    margin-top: 2rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section h3 i {
    font-size: 1.2rem;
}

.info-section p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
    line-height: 1.6;
}

.info-section .links {
    margin-top: 1rem;
}

.info-section .link-item {
    display: block;
    margin-bottom: 0.2rem;
    padding: 0.2rem 0;
}

.info-section .link-item a {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info-section .link-item a:hover {
    color: #00a3e0;
}

.info-section .link-description {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.info-section .email-contact {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.info-section .email-contact a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.info-section .email-contact a:hover {
    color: #5a6fd8;
}

.info-section .sub-section {
    margin-top: 1.5rem;
}

.info-section .sub-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #00d4aa;
}

.info-section .sub-section p {
    margin: 0;
    font-size: 0.95rem;
}

.info-section ul {
    margin: 0;
    padding-left: 1.2rem;
    list-style-type: disc;
}

.info-section li {
    margin: 0;
    padding: 0.2rem 0;
    line-height: 1.4;
}

.info-section li .link-item {
    margin-bottom: 0;
    padding: 0;
}

/* Estilos específicos para enlaces de la sección support */
.support-links-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.support-link-module {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.support-link-module:hover {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
}

.support-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

.support-link-name {
    color: #00d4aa;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.support-link-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.support-link-module:hover .support-link-name {
    color: #4dffc7;
}

.support-link-module:hover .support-link-description {
    color: rgba(255, 255, 255, 0.9);
}

.drawer-btn i {
    font-size: 24px;
    margin-bottom: 8px;
}

#finish-meeting-btn i {
    color: #ff7875;
}

.drawer-btn span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Estilos adicionales para botones específicos - todos con el mismo color violeta */
#add-participant,
#remove-participant {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#add-participant:hover,
#remove-participant:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Contenedor principal */
.meeting-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    transition: right 0.3s ease;
}

.meeting-container.chat-open {
    right: 350px;
}

/* Grid de videos */
.meeting-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    height: 100%;
    width: 100%;
    background: #1a1a1a;
    transition: all 0.3s ease;
}

.meeting-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Contenedor de participante */
.participant-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #2a2a2a;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.participant-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.participant-container.speaking {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Video element */
.participant-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Overlay de nombre */
.participant-name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Indicador de speaker */
.speaker-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #00ff88;
    border: 3px solid white;
    border-radius: 50%;
    z-index: 10;
    animation: pulse 1.5s infinite;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

/* Fallback para videos que no cargan */
.participant-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
    color: white;
    font-weight: bold;
    border-radius: 10px;
}

.fallback-initials {
    font-size: 2.5em;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fallback-name {
    font-size: 0.9em;
    opacity: 0.9;
    text-align: center;
}



/* Animaciones */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.grid-rendered .participant-container {
    animation: fadeInScale 0.5s ease forwards;
}

.grid-rendered .participant-container:nth-child(1) {
    animation-delay: 0.1s;
}

.grid-rendered .participant-container:nth-child(2) {
    animation-delay: 0.2s;
}

.grid-rendered .participant-container:nth-child(3) {
    animation-delay: 0.3s;
}

.grid-rendered .participant-container:nth-child(4) {
    animation-delay: 0.4s;
}

.grid-rendered .participant-container:nth-child(5) {
    animation-delay: 0.5s;
}

/* Chat Drawer */
.chat-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.chat-drawer.open {
    right: 0;
}

.chat-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 60px 20px 20px;
    border-bottom: 1px solid #444;
    background: #333;
    z-index: 10;
    height: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-header .close-drawer-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid #666;
    border-radius: 50%;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.chat-header .close-drawer-btn:hover {
    background: #555;
    border-color: #888;
    color: white;
}

.chat-header h3 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-participants {
    color: #888;
    font-size: 0.9rem;
}

.chat-messages {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 80px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

.chat-message {
    background: #333;
    border-radius: 8px;
    padding: 12px;
}

.chat-message.own-message {
    background: #1a4d3a;
    margin-left: 20px;
}

.chat-message.own-message .message-author {
    color: #00d474;
}

.message-author {
    color: #00ff88;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.message-content {
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.message-content a {
    color: #00ff88;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.message-content a:hover {
    color: #00d474;
    text-decoration: none;
}

.message-time {
    color: #888;
    font-size: 0.8rem;
}

.chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid #444;
    display: flex;
    gap: 10px;
    background: #333;
    z-index: 10;
    height: 80px;
    box-sizing: border-box;
}

.chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #2a2a2a;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.chat-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.send-message-btn {
    padding: 12px;
    background: #00ff88;
    border: none;
    border-radius: 6px;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.send-message-btn:hover {
    background: #00d474;
    transform: translateY(-1px);
}

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

/* Estados responsivos */
@media (max-width: 1200px) {
    .meeting-container {
        right: 0;
    }

    .meeting-container.chat-open {
        right: 300px;
    }

    .chat-drawer {
        width: 300px;
        right: -300px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .info-drawer {
        width: 80vw;
        right: -80vw;
    }

    .support-drawer {
        width: 80vw;
        right: -80vw;
    }

    .settings-drawer {
        width: 100vw;
        left: 0;
        right: 0;
    }

    /* Botones de info y support más grandes en tablets */
    .info-btn-corner {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 18px;
        right: 80px;
    }

    .support-btn-corner {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 18px;
        right: 18px;
    }
}

@media (max-width: 768px) {

    /* Chat drawer en móvil */
    .chat-drawer {
        width: 100vw;
        right: -100vw;
        /* Ajuste para teclado virtual */
        height: 100vh;
        height: 100dvh;
        /* Dynamic viewport height para móviles */
    }

    .meeting-container.chat-open {
        right: 100vw;
    }

    /* Ajustes específicos para el input del chat en móvil */
    .chat-input-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 15px;
        background: #333;
        border-top: 1px solid #444;
        z-index: 1001;
        /* Soporte para teclado virtual */
        bottom: env(keyboard-inset-height, 0px);
        padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    }

    /* Ajustar mensajes para dejar espacio al input */
    .chat-messages {
        bottom: 90px;
        /* Altura del input container + padding */
        padding-bottom: 20px;
    }

    /* Clase para cuando el teclado está visible */
    .keyboard-visible .chat-input-container {
        position: fixed;
        bottom: 0;
        transform: translateY(0);
        background: #333;
        border-top: 2px solid #00ff88;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .keyboard-visible .chat-messages {
        bottom: 90px;
        padding-bottom: 20px;
    }

    /* Mejorar el input cuando el teclado está visible */
    .keyboard-visible .chat-input {
        font-size: 16px;
        /* Prevenir zoom en iOS */
        border-color: #00ff88;
        box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
    }

    /* Asegurar que el chat drawer tenga la altura correcta */
    .keyboard-visible .chat-drawer {
        height: 100vh;
        height: 100dvh;
    }

    /* Forzar ancho completo en móvil */
    html,
    body {
        width: 100vw;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    /* Drawers responsive */
    .info-drawer {
        width: 100vw;
        right: -100vw;
    }

    .support-drawer {
        width: 100vw;
        right: -100vw;
    }

    .info-drawer .drawer-content,
    .support-drawer .drawer-content {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 12px;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .meeting-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        margin: 0;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }

    /* Grid adaptado para móvil - 2 columnas ocupando todo el ancho */
    .meeting-grid {
        display: grid;
        grid-template-columns: 50vw 50vw;
        gap: 0;
        padding: 0;
        margin: 0;
        height: 100vh;
        width: 100vw;
        align-content: stretch;
        justify-items: stretch;
        align-items: stretch;
        overflow: hidden;
        box-sizing: border-box;
        position: fixed;
        top: 0;
        left: 0;
    }

    .meeting-row {
        display: contents;
    }

    /* Contenedores de participantes - ancho completo sin bordes */
    .participant-container {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: unset !important;
        min-height: unset !important;
        max-height: unset !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: hidden;
        box-sizing: border-box;
        margin: 0 !important;
        padding: 0 !important;
    }

    .video-container {
        border-radius: 0 !important;
    }

    .participant-video {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        object-fit: cover;
        box-sizing: border-box;
    }

    .participant-fallback {
        border-radius: 0 !important;
    }

    /* Ocultar nombres de participantes en móvil */
    .participant-name,
    .fallback-name {
        display: none !important;
    }

    .participant-info {
        padding: 6px 10px;
        font-size: 12px;
    }

    .floating-settings-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .settings-drawer {
        width: 100vw;
        left: 0;
        right: 0;
    }

    /* Dialog adaptado para móvil */
    #controls-dialog .dialog-content {
        width: 90vw;
        max-width: 350px;
        height: 350px;
        min-height: 350px;
        padding: 40px 32px;
        border-radius: 50%;
        aspect-ratio: 1/1;
    }

    .dialog-content h2 {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .beta-text {
        font-size: 0.8rem;
        margin-bottom: 24px;
    }

    .dialog-controls {
        gap: 20px;
    }

    .circular-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .circular-btn.main-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    /* Logo principal más grande en móvil */
    .main-logo {
        top: 15px;
        left: 15px;
        display: flex;
        align-items: center;
        height: 48px;
    }

    .main-logo img {
        height: 45px;
    }

    /* Botones de info y support en móvil */
    .info-btn-corner {
        width: 48px;
        height: 48px;
        font-size: 20px;
        top: 15px;
        right: 75px;
    }

    .support-btn-corner {
        width: 48px;
        height: 48px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .overlay-description {
        bottom: 20px;
        font-size: 12px;
        padding: 0 20px;
        line-height: 1.4;
    }

    /* Ad responsive styles */
    .ad-content {
        padding: 24px;
        margin: 20px;
    }

    .ad-header h3 {
        font-size: 1.3rem;
    }

    .ad-header h4 {
        font-size: 1.1rem;
    }

    .ad-space {
        min-height: 150px;
    }

    .mid-meeting-content {
        margin: 0;
        border-radius: 16px 16px 0 0;
    }
}

/* Utilidades */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Efectos de hover mejorados */
.participant-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.participant-container:hover::before {
    opacity: 1;
}

/* Estilos para notificaciones */
.notification {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: white;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.notification-success {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
}

.notification-warning {
    background: linear-gradient(135deg, #ffa726, #ff9800);
}

.notification-error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.notification-info {
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
}

/* Ad System Styles */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.ad-overlay.show {
    opacity: 1;
    transform: scale(1);
}

.ad-overlay.hide {
    opacity: 0;
    transform: scale(0.9);
}

/* Pre-meeting and Post-meeting ad styles */
.ad-overlay.ad-pre-meeting,
.ad-overlay.ad-post-meeting {
    align-items: center;
}

/* Pre-meeting and Post-meeting ad content with glassmorphism */
.ad-overlay.ad-pre-meeting .ad-content,
.ad-overlay.ad-post-meeting .ad-content {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 40px;
    position: relative;
    overflow: hidden;
    width: 500px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Efecto glass adicional para ad-content */
.ad-overlay.ad-pre-meeting .ad-content::before,
.ad-overlay.ad-post-meeting .ad-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Asegurar que los elementos internos estén por encima del pseudo-elemento */
.ad-overlay.ad-pre-meeting .ad-content>*,
.ad-overlay.ad-post-meeting .ad-content>* {
    position: relative;
    z-index: 1;
}

/* Mid-meeting ad styles - fixed at bottom center */
.ad-overlay.ad-mid-meeting {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
    z-index: 1000;
    width: auto;
    height: auto;
    top: auto;
    right: auto;
}

.ad-overlay.ad-mid-meeting .ad-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    width: 320px;
    height: auto;
    min-height: 60px;
    max-height: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

@keyframes slideUpAd {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ad-overlay.ad-mid-meeting.show .ad-content {
    transform: translateY(0);
    opacity: 1;
}

/* Removed general .ad-content that was causing overlay blur */

.mid-meeting-content {
    border-radius: 8px;
    margin: 0;
    width: 320px;
    height: 50px;
    min-height: 50px;
    max-height: 90px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-header h3,
.ad-header h4 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-weight: 600;
}

.ad-header h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ad-header h4 {
    font-size: 1.2rem;
    color: #e0e0e0;
}

/* Loading bar styles */
.loading-container {
    margin: 20px 0 10px 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d4aa, #00a3e0);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 160, 133, 0.5);
}

/* Espacio para mensajes de espera */
.ad-space {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 2px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 0px 20px;
}

.ad-placeholder-content i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
    color: #00d4aa;
}

.ad-placeholder-content p {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
}

/* Estilos para los enlaces de soporte */
.support-links {
    margin: 20px 0 20px 0;
}

.support-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-align: center;
}

.support-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.support-options-list li {
    width: 100%;
    max-width: 240px;
}

.support-options-list a {
    color: #00d4aa;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    display: block;
    text-align: center;
    border: 1px solid #00d4aa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.support-options-list a:hover {
    border-color: #0aedc0;
    color: #0aedc0;
}

/* Button container for ads */
.ad-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 20px 0;
    min-height: 50px;
}

/* Button styles for ads */
.ad-skip-btn,
.ad-continue-btn {
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ad-skip-btn:hover,
.ad-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.ad-continue-btn {
    background: linear-gradient(135deg, #00d4aa, #00a3e0);
}

.ad-continue-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 160, 133, 0.3);
}

/* Countdown timer styles */
.countdown-timer {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 8px;
    display: inline-block;
}

/* Countdown timer for mid-meeting ads */
.ad-countdown {
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
    text-align: center;
}

/* Tamaños para mensajes de espera */
.ad-space {
    min-height: 100px;
}

/* Responsive adjustments for ad sizes */
@media (max-width: 768px) {
    .ad-space.leaderboard {
        width: 320px;
        height: 50px;
        min-height: 50px;
    }

    .ad-space.medium-rectangle {
        width: 300px;
        height: 250px;
        min-height: 250px;
    }

    .ad-overlay.ad-mid-meeting .ad-content {
        width: 300px;
        max-width: calc(100vw - 40px);
    }

    .mid-meeting-content {
        width: 300px;
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 480px) {

    /* Forzar ancho completo en móvil pequeño */
    html,
    body {
        width: 100vw;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    /* Drawers para móviles pequeños */
    .info-drawer,
    .support-drawer {
        width: 100vw;
        right: -100vw;
    }

    .info-drawer .drawer-content,
    .support-drawer .drawer-content {
        padding: 1rem;
    }

    .info-drawer h3,
    .support-drawer h3 {
        font-size: 1.3rem;
    }

    .info-drawer p,
    .support-drawer p {
        font-size: 0.9rem;
    }

    .settings-drawer {
        width: 100vw;
        left: 0;
        right: 0;
    }

    .meeting-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        margin: 0;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }

    /* Grid para móviles pequeños - ancho completo */
    .meeting-grid {
        display: grid;
        grid-template-columns: 50vw 50vw;
        gap: 0;
        padding: 0;
        margin: 0;
        height: 100vh;
        width: 100vw;
        align-content: stretch;
        justify-items: stretch;
        align-items: stretch;
        overflow: hidden;
        box-sizing: border-box;
        position: fixed;
        top: 0;
        left: 0;
    }

    .participant-container {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: unset !important;
        min-height: unset !important;
        max-height: unset !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: hidden;
        box-sizing: border-box;
        margin: 0 !important;
        padding: 0 !important;
    }

    .video-container {
        border-radius: 0 !important;
    }

    .participant-video {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        object-fit: cover;
        box-sizing: border-box;
    }

    .participant-fallback {
        border-radius: 0 !important;
    }

    .meeting-row {
        display: contents;
    }

    /* Dialog para móviles pequeños */
    #controls-dialog .dialog-content {
        width: 95vw;
        max-width: 320px;
        height: 320px;
        min-height: 320px;
        padding: 32px 24px;
        border-radius: 50%;
        aspect-ratio: 1/1;
    }

    .dialog-content h2 {
        font-size: 1.4rem;
    }

    .beta-text {
        font-size: 0.75rem;
        margin-bottom: 20px;
    }

    .dialog-controls {
        gap: 16px;
    }

    .circular-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .circular-btn.main-btn {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }

    /* Logo principal grande en móviles pequeños */
    .main-logo {
        top: 10px;
        left: 10px;
        display: flex;
        align-items: center;
        height: 55px;
    }

    .main-logo img {
        height: 42px;
        content: url('assets/imgs/ico-logo.svg');
    }

    /* Botones de info y support en móviles pequeños */
    .info-btn-corner {
        width: 55px;
        height: 55px;
        font-size: 24px;
        top: 10px;
        right: 80px;
    }

    .support-btn-corner {
        width: 55px;
        height: 55px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }

    .overlay-description {
        font-size: 11px;
        bottom: 16px;
    }

    /* Ad styles for small mobile */
    .ad-space.medium-rectangle {
        width: 280px;
        height: 200px;
        min-height: 200px;
    }

    .ad-overlay.ad-mid-meeting .ad-content {
        width: 280px;
        max-width: calc(100vw - 40px);
    }

    .mid-meeting-content {
        width: 280px;
        max-width: calc(100vw - 40px);
    }
}

/* Botón de cerrar discreto para mid-meeting ads */
.ad-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.ad-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* Posicionamiento del botón de cerrar */
.ad-close-btn {
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    font-size: 14px;
}
