@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Darker Grotesque";
    src: url("../font/darker-grotesque/DarkerGrotesque-Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
* {
    padding: 0;
    margin: 0;
}
body {
    background: #a855f7;
    color: #fff;
    font-family: "Darker Grotesque", sans-serif;
    text-align: center;
}

body.overlay-open {
    overflow: hidden;
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    pointer-events: none;
}

.site-footer-text {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #000;
    line-height: 12px;
    margin: 0;
    transform: translateY(1px);
}

.site-footer-logo {
    height: 12px;
    width: auto;
    display: block;
    margin: 0;
    object-fit: contain;
}

.hidden {
    display: none !important;
}
.btn {
    background: transparent;
    background-image: url(/assets/img/btn-bg.webp?v=2.1.7.1788213357);
    background-size: cover; /* or contain */
    background-repeat: no-repeat;
    background-position: center;
    font-family: "Darker Grotesque", 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 !important;
}

.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: 280px;
    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-family: "Darker Grotesque", sans-serif;
    font-size: 14px;
    letter-spacing: 0.06em;
    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;
}

.template-img {
    cursor: pointer;
    border: none;
    transform: none;
}

#template-screen .template-img,
#template-screen .template-img:hover,
#template-screen .template-frame.selected .template-img,
#template-screen .template-frame.selected .template-img:hover {
    border: none;
    transform: none;
    outline: none;
    box-shadow: none;
}
video,
img {
    width: 300px;
    border-radius: 8px;
    margin-top: 15px;
}

/*Theming Styles*/
.container {
    max-width: 1200px;
    margin: auto;
    background-image: url(/assets/img/bg-amazon.webp?v=2.1.7.1788213357);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 2.5vw 5vw 5vw;
}

.container:has(#welcome-screen:not(.hidden)) {
    max-width: none;
    width: 100%;
    padding: 0;
    background-size: cover;
    background-position: center bottom;
}

/* Welcome / Start Screen */
#welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 22px 56px;
    box-sizing: border-box;
    font-family: "Darker Grotesque", sans-serif;
}

.welcome-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 100%;
    margin-bottom: 18px;
}

.welcome-logos img {
    width: auto;
    height: 100px;
    margin-top: 0;
    border-radius: 0;
    object-fit: contain;
}

.welcome-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
}

.welcome-tagline {
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    text-align: center;
    line-height: 1em;
    color: #000;
    margin: 0;
    padding: 0;
}

.tagline-gradient {
    background: linear-gradient(to right, #0255fd, #1af8fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.start-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 6px 0 36px;
}

.start-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: none;
    border-radius: 0;
    margin-top: 0;
}

.btn-primary,
.btn-start,
.screen-overlay .btn,
.share-modal-content .btn {
    background: linear-gradient(to right, #0255fd, #1af8fd);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 18px 50px;
    border: 1px solid #fff;
    border-radius: 14px;
    box-shadow: none;
    font-family: "Darker Grotesque", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1.5px;
    text-indent: 0;
    text-transform: uppercase;
    margin: 0;
    box-sizing: border-box;
    cursor: pointer;
    color: #fff;
}

.btn-primary:hover,
.btn-start:hover,
.screen-overlay .btn:hover,
.share-modal-content .btn:hover {
    background: linear-gradient(to right, #0255fd, #1af8fd);
    box-shadow: none;
}

.btn-start {
    margin: 0 auto 12vh;
    flex-shrink: 0;
}

#welcome-screen .btn-start {
    margin: 0 auto 12vh;
}

#gender-screen .btn-start {
    margin: 0 auto;
}

.screen-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    padding: 24px 22px 56px;
    box-sizing: border-box;
    background-image: url(/assets/img/bg-amazon.webp?v=2.1.7.1788213357);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-color: #a855f7;
    font-family: "Darker Grotesque", sans-serif;
}

.screen-overlay.hidden {
    display: none !important;
}

#gender-screen {
    z-index: 200;
    justify-content: flex-start;
    padding: 24px 22px 32px;
}

#gender-screen h2 {
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1em;
    color: #000;
    text-align: center;
    margin: 8px 0 20px;
}

#gender-screen .gender-options {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 28px;
    flex: 0 1 auto;
}

#gender-screen .gender-option {
    position: relative;
    flex: 1;
    max-width: 168px;
    cursor: pointer;
    border-radius: 18px;
    overflow: hidden;
}

#gender-screen .gender-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#gender-screen .gender-option img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}

#gender-screen .gender-option .gender-check {
    display: none;
    position: absolute;
    top: 23px;
    left: 9px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(to right, #0255fd, #1af8fd);
    pointer-events: none;
    z-index: 2;
}

#gender-screen .gender-option .gender-check::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 46%;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    box-sizing: border-box;
}

#gender-screen .gender-option.selected img {
    box-shadow: inset 0 0 0 3px #fff;
}

#gender-screen .gender-option.selected .gender-check {
    display: block;
}

#template-screen {
    z-index: 300;
    justify-content: flex-start;
    align-items: stretch;
    padding: 24px 22px 32px;
}

#template-screen h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1em;
    color: #000;
    text-align: center;
    margin: 0 0 20px;
    flex-shrink: 0;
    max-width: none;
    width: 100%;
}

#template-screen #templates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 10px;
    row-gap: 10px;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    flex: 0 1 auto;
}

#template-screen .template-frame {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    flex: unset;
    box-sizing: border-box;
    cursor: pointer;
}

#template-screen .template-frame.selected::before {
    content: "";
    position: absolute;
    height: 28px;
    width: 28px;
    left: 10px;
    top: 10px;
    z-index: 3;
    pointer-events: none;
    border-radius: 50%;
    background: linear-gradient(to right, #0255fd, #1af8fd);
}

#template-screen .template-frame.selected::after {
    content: "";
    position: absolute;
    left: 24px;
    top: 22px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    box-sizing: border-box;
    z-index: 4;
    pointer-events: none;
}

#template-screen #templates img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    margin: 0;
    border-radius: 0;
    display: block;
}

#template-screen .btn-start {
    padding: 14px 38px;
    border-radius: 11px;
    font-size: 18px;
    letter-spacing: 1px;
    margin: 0 auto;
    align-self: center;
    flex-shrink: 0;
}

#photo-screen {
    z-index: 400;
    justify-content: flex-start;
    padding-bottom: 48px;
}

#photo-screen h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1em;
    color: #000;
    text-align: center;
    margin: 0 0 20px;
    max-width: none;
    width: 100%;
}

#loading {
    z-index: 500;
    justify-content: flex-start;
    align-items: center;
    padding: 24px 22px 40px;
}

#loading h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1em;
    color: #000;
    text-align: center;
    margin: 0 0 20px;
    max-width: none;
    width: 100%;
}

#loading .loader {
    width: 64px;
    height: 64px;
    margin: 32px auto 16px;
    border-radius: 50%;
    border: 5px solid rgba(2, 85, 253, 0.18);
    border-top-color: #0255fd;
    border-right-color: #1af8fd;
    border-bottom-color: #1af8fd;
    background: transparent;
    animation: loader-spin 0.85s linear infinite;
    box-shadow: 0 0 24px rgba(26, 248, 253, 0.35);
}

#loading .loader-text {
    font-family: "Darker Grotesque", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    color: #000;
    text-align: center;
    margin: 0;
    animation: loader-pulse 1.5s ease-in-out infinite;
}

#result-screen {
    z-index: 600;
}

#result-screen h2 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1em;
    color: #000;
    text-align: center;
    margin: 0 0 20px;
    max-width: none;
    width: 100%;
}

#result-screen .result-actions {
    flex-direction: column;
    gap: 12px;
}

#result-screen .result-actions-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
}

#result-screen .result-actions .btn-start {
    padding: 14px 38px;
    border-radius: 11px;
    font-size: 18px;
    letter-spacing: 1px;
    margin: 0;
}

.screen-overlay h2 {
    font-family: "Darker Grotesque", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    margin: 8px 0 20px;
    max-width: 430px;
    width: 100%;
}

.screen-overlay .screen-content {
    width: 100%;
    max-width: 430px;
}

.screen-overlay .form-actions,
.screen-overlay .result-actions,
.screen-overlay .photo-screen-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 0;
    width: 100%;
    max-width: 430px;
}

#photo-screen .photo-input {
    position: relative;
    width: min(300px, 88vw);
    height: min(375px, 110vw);
    margin: 0 auto 24px;
    overflow: hidden;
    flex-shrink: 0;
}

#photo-screen .photo-input video,
#photo-screen .photo-input img#preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scaleX(-1);
    margin: 0;
    border-radius: 0;
}

#photo-screen .photo-input img#preview {
    z-index: 1;
}

#photo-screen .photo-screen-btns {
    flex-direction: row;
    gap: 12px;
}

#photo-screen .photo-screen-btns .btn-start {
    padding: 14px 38px;
    border-radius: 11px;
    font-size: 18px;
    letter-spacing: 1px;
    margin: 0;
}

#result-screen .result-img-frame {
    position: relative;
    margin: 0 auto 20px;
    width: max-content;
    max-width: 100%;
}

#result-screen .result-img-frame img {
    margin: 0;
    max-width: min(320px, 65vw);
    width: auto;
    height: auto;
}

.share-modal-content {
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    font-family: "Darker Grotesque", sans-serif;
}

.share-modal-content h3 {
    font-family: "Darker Grotesque", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.share-hint {
    font-family: "Darker Grotesque", sans-serif;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.share-modal-content .btn-start {
    padding: 14px 38px;
    border-radius: 11px;
    font-size: 18px;
    letter-spacing: 1px;
    margin: 0 auto;
}

h2 {
    font-family: "Darker Grotesque", 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: 100%;
    box-sizing: border-box;
}
#templates .template-frame.selected::before {
    content: "";
    position: absolute;
    height: 28px;
    width: 28px;
    left: 10px;
    top: 10px;
    z-index: 3;
    pointer-events: none;
    border-radius: 50%;
    background: linear-gradient(to right, #0255fd, #1af8fd);
}

#templates .template-frame.selected::after {
    content: "";
    position: absolute;
    left: 24px;
    top: 22px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    box-sizing: border-box;
    z-index: 4;
    pointer-events: none;
}
#templates img {
    width: calc(100% + 1.5vw);
    margin-top: 0;
    border-radius: 0;
}

@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;
}

@media (max-width: 576px) {
    #gender-screen {
        padding: 20px 18px 32px;
    }
    #gender-screen .gender-options {
        gap: 12px;
        max-width: 320px;
    }
    #gender-screen .gender-option {
        max-width: 150px;
    }
    #gender-screen .gender-option.selected .gender-check {
        width: 24px;
        height: 24px;
        top: 20px;
        left: 8px;
    }
    #welcome-screen {
        padding: 16px 18px 52px;
    }
    .welcome-logos {
        margin-bottom: 14px;
    }
    .start-banner {
        margin-bottom: 28px;
    }
    .btn-start,
    #welcome-screen .btn-start {
        margin-bottom: 10vh;
    }
    .user-form input {
        font-size: 16px;
        margin-bottom: 15px;
    }
    #template-screen #templates {
        column-gap: 8px;
        row-gap: 8px;
    }
    .share-modal-content h3 {
        font-size: 18px;
    }
    .site-footer {
        padding: 8px 12px;
        gap: 5px;
    }
    .site-footer-text {
        font-size: 10px;
        line-height: 10px;
        transform: translateY(1px);
    }
    .site-footer-logo {
        height: 10px;
    }
    .share-hint {
        font-size: 13px;
    }
    .share-qr-loading {
        font-size: 14px;
    }
}
