@font-face {
    font-family: "Agenor";
    src: url("../font/AgenorNeue-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
* {
    padding: 0;
    margin: 0;
}
body {
    background: #0f0f0f;
    color: #fff;
    font-family: "Agenor", sans-serif;
    text-align: center;
}
.hidden {
    display: none;
}
.btn {
    background: transparent;
    background-image: url(../img/btn-bg.webp);
    background-size: cover; /* or contain */
    background-repeat: no-repeat;
    background-position: center;
    font-family: "Agenor", sans-serif;
    font-size: 3.2vw;
    letter-spacing: 0.2vw;
    text-transform: uppercase;
    padding: 0.2vw 0 0;
    cursor: pointer;
    margin: 10px;
    border: none;
    color: #fff;
    width: 30vw;
    height: 10vw;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    margin-top: 1vw;
}
.form-actions .btn {
    margin: 0;
}
.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    margin-top: 2vw;
}
.result-actions .btn {
    margin: 0;
}
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vw;
    background: rgba(0, 0, 0, 0.75);
}
.share-modal.hidden {
    display: none;
}
.share-modal-content {
    background: #1a1440;
    border: 2px solid #7a7496;
    border-radius: 2vw;
    padding: 6vw 5vw;
    max-width: 420px;
    width: 100%;
}
.share-modal-content h3 {
    font-size: 3.5vw;
    letter-spacing: 0.2vw;
    text-transform: uppercase;
    margin-bottom: 4vw;
}
.share-qr-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 3vw;
    border-radius: 1vw;
    background: #fff;
    padding: 2vw;
    max-width: 280px;
    width: 70vw;
    min-height: 70vw;
    max-height: 280px;
    box-sizing: border-box;
    overflow: hidden;
}
.share-qr-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2vw;
    letter-spacing: 0.06vw;
    color: #000;
    text-align: center;
    padding: 2vw;
    margin: 0;
    animation: loader-pulse 1.5s ease-in-out infinite;
    z-index: 2;
}
.share-qr-loading.hidden {
    display: none;
}
.share-modal-content img#share-qr {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    max-width: 100%;
    width: 100%;
    height: auto;
}
.share-modal-content img#share-qr.hidden {
    display: none;
}
.share-hint {
    font-size: 2vw;
    letter-spacing: 0.08vw;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4vw;
}
.template-img {
    cursor: pointer;
}
.template-img:hover {
    border: 2px solid #1e90ff;
    transform: scale(1.05);
}
video,
img {
    width: 300px;
    border-radius: 8px;
    margin-top: 15px;
}

/*Theming Styles*/
.container {
    max-width: 1200px;
    margin: auto;
    background-image: url(../img/bg.webp);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 2.5vw 5vw 5vw;
}
.container .logo img {
    width: 35vw;
    max-width: 100%;
    margin-bottom: 3vw;
}
.start-banner {
    display: flex;
    justify-content: center;
    margin: 9vw 0 11vw;
}
.start-banner img {
    width: 33.33%;
    border: 2px solid #32499f;
    border-radius: 2vw;
}
.start-banner img:nth-child(2) {
    transform: scale(1.1);
}
h2 {
    font-family: "Agenor", sans-serif;
    font-size: 4.2vw;
    letter-spacing: 0.4vw;
    text-transform: uppercase;
}
.user-form {
    background: #00000051;
    padding: 4vw;
    border-radius: 2vw;
    border: 2px solid #7a7496;
    max-width: 800px;
    margin: 6vw auto 4vw;
}
.user-form label {
    text-align: left;
    display: block;
    width: 100%;
    text-transform: uppercase;
    font-size: 2.35vw;
    letter-spacing: 0.1vw;
    margin-bottom: 1vw;
}
.user-form input {
    text-align: left;
    display: block;
    width: calc(100% - 4.5vw);
    margin: 0;
    background: #817f8e;
    border: 2px solid #c9c8cf;
    border-radius: 0.8vw;
    outline: none;
    padding: 1.2vw 2vw;
    font-size: 2.5vw;
    color: #fff;
    margin-bottom: 2.5vw;
}
.user-form input[type="radio"] {
    text-align: left;
    display: inline-block;
    width: auto;
    margin: 0;
    border: 0;
    margin-bottom: 0;
}
.user-form .radio-label {
    font-size: 1.8vw;
    width: fit-content;
    margin-right: 2.5vw;
}
.user-form .radio-container {
    display: flex;
}

#templates {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5vw;
    margin: 1.2vw auto;
    max-width: 95vw;
}
#templates .template-frame {
    position: relative;
    flex: 0 0 calc(33.333% - 1vw);
    max-width: calc(33.333% - 1vw);
    box-sizing: border-box;
}
#templates .template-frame::after {
    content: " ";
    background-image: url(../img/template-frame.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding: 0 1vw;
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
}
#templates .template-frame.selected::before {
    content: " ";
    background-image: url(../img/checked-icon.svg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: block;
    position: absolute;
    height: 4vw;
    width: 4vw;
    right: -1vw;
    top: 1vw;
    margin: 1vw 1.5vw;
}
#templates img {
    width: calc(100% + 1.5vw);
    margin-top: 0;
    border-radius: 0;
}

.photo-input {
    position: relative;
    width: 60vw;
    margin: 6vw auto 5vw;
    height: 48vw;
    transform: scaleX(-1);
}
.photo-input::after {
    content: " ";
    background-image: url(../img/capture-frame.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding: 0;
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    left: -0.1vw;
    top: -1.2vw;
}
.photo-input video {
    width: 60vw;
    height: 45vw;
    border-radius: 0;
    margin: 0;
}
.photo-input {
    text-align: center;
}
.photo-input img#preview {
    width: auto;
    max-width: 60vw;
    height: 45vw;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0 auto;
    left: 50%;
    transform: translate(-50%, 0);
}
.photo-screen-btns .btn {
    margin: 10px 5px;
}

#loading {
    padding: 4vw 0 8vw;
}

#loading .loader {
    width: 18vw;
    height: 18vw;
    max-width: 90px;
    max-height: 90px;
    min-width: 56px;
    min-height: 56px;
    margin: 8vw auto 4vw;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffffff;
    border-right-color: #5dd4e8;
    border-radius: 50%;
    animation: loader-spin 0.85s linear infinite;
    box-shadow: 0 0 30px rgba(93, 212, 232, 0.45);
}

#loading .loader-text {
    font-size: 2.2vw;
    letter-spacing: 0.12vw;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loader-pulse {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
}

.result-img-frame {
    position: relative;
    margin: 5vw auto 1.5vw;
    width: max-content;
}
.result-img-frame img {
    margin: 0;
}
.result-img-frame::after {
    content: " ";
    background-image: url(../img/template-frame.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding: 0;
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
}

@media (max-width: 576px) {
    .user-form input {
        font-size: 16px;
        margin-bottom: 15px;
    }
    .user-form .radio-container {
        display: flex;
        height: 20px;
        margin-top: 10px;
    }
    .user-form .radio-label {
        position: relative;
        font-size: 12px;
        padding-left: 20px;
        margin-right: 25px;
    }
    .user-form .radio-label input {
        position: absolute;
        top: 1px;
        left: 0;
    }
    #templates .template-frame::after {
        top: -4px;
    }
    #templates img {
        width: calc(100% + 4px);
    }
    #loading .loader-text {
        font-size: 14px;
    }
    .share-modal-content h3 {
        font-size: 18px;
    }
    .share-hint {
        font-size: 13px;
    }
    .share-qr-loading {
        font-size: 14px;
    }
}
