body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    margin-bottom: 1rem;
    text-align: center;
}

.container p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    /* 4:3 aspect ratio */
    padding-top: 75%; 
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#input-video, #output-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the container, might crop */
}

/* Flip the video and canvas for a selfie view */
#input-video, #output-canvas {
    transform: scaleX(-1);
}


.controls {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #0056b3;
}

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

/* For smaller screens */
@media (max-width: 600px) {
    .container {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .controls {
        flex-direction: column;
        width: 80%;
    }

    button {
        width: 100%;
    }
}
