body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: var(--mobile-image);
    overflow-x: hidden;
}

#wrapper {
    width: unset;
    height: unset;
}

.main {
    height: unset;
}

#videoContainer {
    width: 90vw;
    height: 50vh;
    position: relative;
    background: var(--background-color);
    display: none;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 3px 1px 2px var(--background-color, #000);
}

#videoContainer.loading {
    display: block;
}

#localVideo {
    width: 100%;
    border-radius: 10px;
    background: var(--background-color);
    border: 5px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1280px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
}

/* Loading states */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

/* Button styles */
button {
    font-family: var(--secondary-font-family, "Titillium Web", sans-serif);
    margin: 25px auto !important;
    color: var(--background-color, #fff) !important;
    border: 5px solid var(--background-color, #fff) !important;
    background: var(--primary-color, #666) !important;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1rem;
    text-align: center;
    display: block;
    border-radius: 10px;
    text-transform: uppercase;
    padding: 10px !important;
    font-weight: 700;
    box-shadow: 3px 1px 2px var(--primary-color, #000);
    text-decoration: none !important;
}

#cameraBtn {
    color: var(--primary-color, #fff) !important;
    border: 5px solid var(--primary-color, #fff) !important;
    background: var(--background-color, #666) !important;
    box-shadow: 3px 1px 2px var(--background-color, #000);
}

a.back {
    font-family: var(--secondary-font-family, "Titillium Web", sans-serif);
}

/* Form and validation */
.required {
    color: #dc3545;
    margin-left: 4px;
}

.error-message {
    display: none;
}

#status {
    margin: 20px auto;
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 10px;
    border-radius: 5px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 75%;
    display: none;
}

.notification {
    display: none;
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: var(--secondary-color);
    padding: 0.25rem;
    border-radius: 5px;
    z-index: 1000;
    font-size: 1rem;
    line-height: 1.5rem;
    text-align: center;
    width: 80vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-transform: uppercase;
    font-family: var(--secondary-font-family, "Titillium Web", sans-serif);
}

.notification.show {
    display: block;
}

.live-badge {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
    animation: pulse 2s infinite;
}

.is-live .live-badge {
    display: block;
}

.thanks-message {
    text-align: center;
    color: var(--primary-color);
    display: none;
    animation: fadeIn 0.5s ease-out;
}

body .form {
    padding-bottom: 0 !important;
}

.disclaimer {
    display: block;
}

form .disclaimer label {
    font-size: 0.85rem !important;
    line-height: 1rem !important;
}

@keyframes rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
    }

    to {
        transform: translate(-50%, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.filter-controls {
    position: static;
}

.filter-select {
    padding: 8px;
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--background-color);
    font-family: var(--secondary-font-family);
    cursor: pointer;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    display: none;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: none;
    border-radius: 10px;
    background: var(--background-color);
    border: 5px solid var(--primary-color);
    width: 100%;
    /* Adjust to container size */
    max-width: 1280px;
    /* Optional: limit max width */
    height: auto;
    /* Maintain aspect ratio */
    aspect-ratio: 16 / 9;
    /* Enforce 16:9 aspect ratio */
    object-fit: contain;
    /* Ensure no distortion, black bars if needed */
    display: block;
    /* Remove inline-block spacing */
}

@media (min-width: 768px) {
    button {
        font-size: 1rem;
        line-height: 1rem;
    }
}

@media only screen and (min-width: 1024px) {
    #videoContainer {
        max-width: 50vw;
        height: 50vh;
    }

    .notification {
        max-width: 40vw;
        font-size: 1rem;
        line-height: 1rem;
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    body.form .form {
        max-width: 80vw;
        margin: 0 auto;
        padding-bottom: 1rem !important;
    }
}

@media (min-width: 1024px) {
    body.form .form {
        max-width: 40vw;
        margin: 0 auto;
        padding-bottom: 1rem !important;
    }
}

/* */
.jumbotron-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 2px,
            transparent 4px),
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 2px,
            transparent 4px);
    background-size: 6px 6px;
    mix-blend-mode: screen;
    animation: flicker 0.5s infinite;
    display: none;
}

.scanline {
    position: absolute;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: scan 2s linear infinite;
    pointer-events: none;
    display: none;
}

@keyframes flicker {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

@keyframes scan {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(100%);
    }
}

/* Added a glow effect */
.glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    display: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

.screenshot-controls {
    position: absolute;
    bottom: 0.5rem;
    right: 0;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
}

/*
.screenshot-btn {
    background: var(--primary-color) url(/assets/img/screenshot.png) center left no-repeat !important;
    background-size: contain !important;
    color: var(--background-color);
    border: none;
    border-radius: 20px;
    height: 50px;
    width: 50px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
    font-family: var(--font-family);
    margin: 0 auto !important;
}

.screenshot-btn:hover {
    transform: scale(1.05);
}

.screenshot-btn:active {
    transform: scale(0.95);
}
*/
.screenshot-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.screenshot-preview img {
    max-width: 90%;
    max-height: 70vh;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.screenshot-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.screenshot-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn {
    background: var(--primary-color);
    color: var(--background-color);
}

.share-btn {
    background: var(--secondary-color);
    color: var(--background-color);
}

.close-btn {
    background: var(--background-color);
    color: var(--primary-color);
}

.screenshot-action-btn:hover {
    transform: scale(1.05);
}

.screenshot-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    animation: flash 0.3s ease-out;
}

@keyframes flash {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

/* banner */
.client-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    padding: 10px;
    z-index: 9;
    border-bottom: none;
    background: var(--background-color) var(--background-image) no-repeat top left;
    border-radius: unset;
    height: 50px;
    border-top: unset;
}

.bottom-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    padding: 10px;
    background: var(--background-color) var(--background-image) no-repeat top left;
    z-index: 9;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.client-logo {
    height: 125px;
    width: auto;
    margin: 0 auto;
    text-align: center;
    display: block;
    border-radius: 100%;
    position: absolute;
    z-index: 999999;
    bottom: 0px;
}

.taking-screenshot .client-banner,
.taking-screenshot .bottom-banner {
    display: flex;
    border: 5px solid #FFF;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.show-banner .client-banner,
.show-banner .bottom-banner {
    display: flex;
}

#overlayVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    mix-blend-mode: screen;
    /* or other blend modes like multiply, overlay */
}

#screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Semi-transparent black */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

/* Centered message */
#screenshot-message {
    background-color: var(--background-color);
    /* Green background */
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#screenshotBtn,
#recordingBtn,
#stopRecordingBtn {
    display: none;
}