/* Modern styling for BodyPix Webcam Blur */

body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #121212;
    font-family: 'Arial', sans-serif;
    height: 100%;
}

#videoElement, #outputCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Make the video element slightly visible for debugging */
#videoElement {
    opacity: 0.1;
    z-index: 1;
}

#outputCanvas {
    z-index: 2;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

button {
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin: 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: rgba(0, 123, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

button:active {
    transform: scale(0.95);
}

button svg {
    margin-right: 5px;
}

.status {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    text-align: center;
    z-index: 5;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ffffff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

#debugInfo {
    position: fixed;
    bottom: 70px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    max-width: 300px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}