html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

@font-face {
    font-family: 'ComercioSansBook';
    src: url('../fonts/ComercioSans/ComercioSans-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ComercioSansBold';
    src: url('../fonts/ComercioSans/ComercioSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

button, .btn {
    touch-action: manipulation;
}

#appViewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

#appStage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1080px;
    height: 1920px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    overflow: hidden;
}

#app {
    position: relative;
    width: 1080px;
    height: 1920px;
    overflow: hidden;
}

.photo_background {
    background-image: url(../images/photo_bg_003.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

#feaduaneirosLogo {
    background-image: url(../images/feaduaneiros_logo.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 743px;
    height: 250px;
}

#parceirosLogo {
    background-image: url(../images/parceiros_logo.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 710px;
    height: 247px;
}

.photoElements-top {
    top: var(--top);
}

#photoStartText {
    width: 600px;
    height: auto;
    font-family: 'ComercioSansBold', serif;
    font-size: 55px;
    text-align: center;
}

#photoArea {
    width: 900px;
    height: 600px;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

#photoVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 24px;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#photoFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 2;
    pointer-events: none;
}

/* ─── Resultado (foto capturada) ─────────────────────────────────────────── */
#photoResult {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 24px;
    z-index: 1;
    opacity: 1;
    transition: opacity 1s ease;
}

/* ─── Countdown ──────────────────────────────────────────────────────────── */
#photoCountdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

#photoCountdownNumber {
    font-family: 'ComercioSansBook', serif;
    font-size: 280px;
    line-height: 1;
    color: #fff;
    display: none;
    text-shadow:
        0 0 30px rgba(255, 255, 255, 0.95),
        0 0 60px rgba(100, 195, 255, 0.80),
        0 4px 20px rgba(0, 0, 0, 0.60);
    animation: countdownPulse 0.85s ease-out forwards;
}

@keyframes countdownPulse {
    0%   { transform: scale(1.6); opacity: 1; }
    60%  { transform: scale(1.0); opacity: 0.9; }
    100% { transform: scale(0.55); opacity: 0; }
}

/* ─── Flash ──────────────────────────────────────────────────────────────── */
#photoFlash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
}

#photoFlash.active {
    animation: cameraFlash 0.7s ease-out forwards;
}

@keyframes cameraFlash {
    0%   { opacity: 1; }
    20%  { opacity: 1; }
    100% { opacity: 0; }
}

/* From Uiverse.io by cssbuttons-io */
#photoActions {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.photo-btn {
    --glow-color: rgb(100, 195, 255);
    --glow-spread-color: rgba(30, 140, 255, 0.75);
    --enhanced-glow-color: rgb(180, 225, 255);
    --btn-color: rgb(10, 55, 120);
    border: .25em solid var(--glow-color);
    padding: 1em 3em;
    color: var(--glow-color);
    font-size: 30px;
    font-weight: bold;
    background-color: var(--btn-color);
    border-radius: 1em;
    outline: none;
    width: 300px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 1em .25em var(--glow-color),
    0 0 4em 1em var(--glow-spread-color),
    inset 0 0 .75em .25em var(--glow-color);
    text-shadow: 0 0 .5em var(--glow-color);
    position: relative;
    transition: all 0.3s;
}

.photo-btn::after {
    pointer-events: none;
    content: "";
    position: absolute;
    top: 120%;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--glow-spread-color);
    filter: blur(2em);
    opacity: .7;
    transform: perspective(1.5em) rotateX(35deg) scale(1, .6);
}

.photo-btn:hover {
    color: var(--btn-color);
    background-color: var(--glow-color);
    box-shadow: 0 0 1em .25em var(--glow-color),
    0 0 4em 2em var(--glow-spread-color),
    inset 0 0 .75em .25em var(--glow-color);
}

.photo-btn:active {
    box-shadow: 0 0 0.6em .25em var(--glow-color),
    0 0 2.5em 2em var(--glow-spread-color),
    inset 0 0 .5em .25em var(--glow-color);
}