:root {
    --bg-color: #f4f5f7;
    --text-color: #1f2937;
    --card-bg: #ffffff;
    --primary: #f5b716;
    --primary-hover: #dfa20c;
    --success: #10b981;
    --danger: #ef4444;
    --border: #e5e7eb;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111827;
        --text-color: #f9fafb;
        --card-bg: #1f2937;
        --border: #374151;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.logo-container {
    text-align: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
}

.logo span {
    color: var(--primary);
}

.subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-placeholder {
    color: #ffffff;
    opacity: 0.5;
    position: absolute;
    z-index: 10;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 20;
    position: relative;
}

#localVideo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid white;
    z-index: 30;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 25px;
    /* Pill shape like Bellify */
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.primary-btn {
    background: var(--primary);
    color: #111827;
    /* Dark text on yellow for readability */
    box-shadow: 0 4px 10px rgba(245, 183, 22, 0.2);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 183, 22, 0.3);
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Especificos de llamadas */
.call-btn {
    background-color: var(--success);
}

.call-btn:hover {
    background-color: #059669;
}

.end-call-btn {
    background-color: var(--danger);
    margin-top: 10px;
}

.end-call-btn:hover {
    background-color: #dc2626;
}

.door-btn {
    background-color: #eab308;
    /* Ambar para abrir puerta */
    color: #fff;
    margin-top: 10px;
}

.door-btn:hover {
    background-color: #ca8a04;
}

.status-bar {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    background: var(--primary);
    color: #111827;
    padding: 0.75rem;
    border-radius: 12px;
}

/* Modal/Overlay para visitantes cuando se abre la puerta */
.door-opened-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.9);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
}

.door-opened-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Incoming call alert */
.incoming-alert {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fef08a;
    /* yellow background */
    padding: 1rem;
    border-radius: var(--radius);
    border: 2px solid #eab308;
    color: #854d0e;
    margin-bottom: 10px;
    animation: pulseAlert 1.5s infinite;
}

.bell-icon {
    font-size: 3rem;
    animation: ringBell 0.5s ease-in-out infinite alternate;
    transform-origin: top center;
}

.pulse-text {
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 5px;
}

@keyframes ringBell {
    0% {
        transform: rotate(-15deg);
    }

    100% {
        transform: rotate(15deg);
    }
}

@keyframes pulseAlert {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(234, 179, 8, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
    }
}

.muted {
    background-color: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
}

/* Captive Portal Styles - Bellify */
.persons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.person-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 183, 22, 0.2);
    border-color: var(--primary);
    background: #fffbef;
}

@media (prefers-color-scheme: dark) {
    .person-card:hover {
        background: rgba(245, 183, 22, 0.08);
    }
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    margin-right: 15px;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(245, 183, 22, 0.3);
}

.person-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Voice Waves Animation */
.voice-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100px;
    width: 100%;
}

.wave {
    width: 6px;
    height: 20px;
    background: var(--primary);
    border-radius: 10px;
    animation: wave-animation 1s infinite ease-in-out;
}

.wave:nth-child(2) {
    animation-delay: 0.2s;
}

.wave:nth-child(3) {
    animation-delay: 0.4s;
    height: 30px;
}

.wave:nth-child(4) {
    animation-delay: 0.6s;
}

.wave:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes wave-animation {

    0%,
    100% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(2.2);
    }
}