/* Playable Ad Styles */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

* {
    font-family: 'Rubik', sans-serif;
}

html,
body {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    background: rgb(0, 0, 0);
}

body {
    overflow: hidden;
    display: block;
    justify-content: center;
    align-items: center;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: center;
    justify-content: center;
    align-items: center;
}

.top-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 40;
    pointer-events: none;
}

.progress-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 40;
    pointer-events: none;
}

.final-video-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 50;
}

.visual-addons {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    pointer-events: none;
}

.lobby-video-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 10;
}

.question-video-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 40;
}

.trivia-background {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    grid-area: 1/1;
    z-index: 30;
    pointer-events: none;
}

video,
img {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: fill;
}

.play-btn {
    position: absolute;
    border-radius: 100px;
    bottom: 3%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 67%;
    height: 9.5%;
    opacity: 0;
    z-index: 100;
    cursor: pointer;
}

.submit-btn {
    position: absolute;
    border-radius: 100px;
    bottom: 25.2%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 67%;
    height: 9.5%;
    opacity: 0;
    z-index: 100;
    cursor: pointer;
}

.privacy-btn {
    position: absolute;
    bottom: 46.6%;
    left: 50%;
    width: 18%;
    height: 1.5%;
    opacity: 0;
    z-index: 100;
    cursor: pointer;
}

.trivia-btn-wrapper {
    position: absolute;
    top: 67.5%;
    left: 50%;
    height: 37%;
    width: 80%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 2%;
}

.trivia-btn {
    width: 100%;
    height: 100%;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
    opacity: 0;
    cursor: pointer;
    border: 1px solid red;
}

#inBtn {
    position: fixed;
    bottom: 25.2%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 9.5%;
    z-index: 100;
}

/* --- Telephone Input Styles --- */
.phone-input {
    position: absolute;
    box-sizing: border-box;
    border-radius: 100px;
    bottom: 47.4%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 7%;
    z-index: 100;
    --primary: #1e1e1e;
    --secondary: #fd0;
    overflow: visible;
    opacity: 0;
    /* visibility: hidden; */
    transition: opacity 0.5s ease;
}

.phone-input .select-box {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.phone-input .select-box input {
    height: 100%;
    padding: 0 1.5%;
    font-size: 100%;
    border: none;
    outline: none;
    box-sizing: border-box;
    border-radius: 0 100px 100px 0;
    flex: 1;
    /* Take up remaining space */
}

.phone-input input[type="tel"] {
    border-radius: 0 100px 100px 0;
    width: 100%;
    /* Fill the available space in its container */
}

.phone-input .select-box input:focus {
    border: none;
    outline: none;
}

.phone-input .selected-option {
    background-color: #fff;
    border-radius: 100px;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    width: 100%;
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.phone-input .selected-option div {
    position: relative;
    width: auto;
    /* Fit content instead of fixed percentage */
    padding: 0 2%;
    text-align: center;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
}

.phone-input .select-box .options {
    position: absolute;
    top: 110%;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 110;
    max-height: 300px;
}

.phone-input .select-box .options.active {
    display: block;
}

.phone-input .select-box .options::before {
    position: absolute;
    content: "";
    left: 5%;
    top: -10px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-bottom-color: var(--primary);
}

.phone-input .select-box .search-box {
    background-color: var(--primary);
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 4% 3%;
    width: 100%;
    box-sizing: border-box;
}

.phone-input .select-box ol {
    list-style: none;
    max-height: 200px;
    overflow: auto;
    margin: 0;
    padding: 0;
}

.phone-input .select-box ol::-webkit-scrollbar {
    width: 6px;
}

.phone-input .select-box ol li .iconify {
    border-radius: 50%;
    height: 1.5em;
    width: auto;
}

.phone-input .select-box ol li {
    /* Replace 'Arial' with your preferred font */
    font-size: 90%;
}

.phone-input .select-box ol li>div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-input .select-box ol::-webkit-scrollbar-thumb {
    width: 4px;
    height: 30px;
    background-color: #ccc;
    border-radius: 4px;
}

.phone-input .select-box ol li {
    padding: 3%;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.phone-input .select-box ol li.hide {
    display: none;
}

.phone-input .select-box ol li:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.phone-input .select-box ol li:hover {
    background-color: lightcyan;
}

.phone-input .select-box ol li .country-name {
    margin-left: 2%;
}

.phone-input .flag-container {
    border-right: none;
    /* margin: 0; */
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-left: 1%;
}

.phone-input .flag-container .iconify {
    display: block;
    justify-content: center;
    border-radius: 50%;
    height: 65%;
    width: auto;
    /* border: 1px solid rgb(115, 239, 0); */
    box-sizing: border-box;
    object-fit: fill;
    margin-right: 8%;
}

.arrow-icon {
    display: block;
    width: 25%;
    height: 25%;
    transition: transform 0.2s ease;
}

.selected-option div.active .arrow-icon {
    transform: rotate(180deg);
}

.phone-input .flag-container::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    border-radius: 10px;
    width: 2%;
    height: 70%;
    background-color: #444444;
}

.verification-input {
    position: absolute;
    border-radius: 100px;
    bottom: 47.4%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 7%;
    z-index: 100;
    overflow: hidden;
    /* Prevents content from overflowing */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.verification-input input {
    width: 85%;
    height: 95%;
    box-sizing: border-box;
    border: none;
    outline: none;
    font-size: 100%;
    transition: all;
}

.verification-input input:focus {
    border: none;
    outline: none;
}

.show {
    opacity: 1;
    visibility: visible;
}

.hide {
    opacity: 0;
    visibility: visible;
    display: none;
}

.error {
    outline: 3px solid rgb(255, 73, 73);
}

.locked {
    background-color: rgba(100, 100, 100, 0.452);
    pointer-events: none;
}

/* Prevent text selection on buttons */
button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Fix for iOS Safari full height */
html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
}

/* Improve touch targets for mobile */
.trivia-btn {
    min-height: 44px;
    /* Minimum touch target size */
}

/* Fix for mobile viewport issues */
@media only screen and (max-width: 768px) {
    .container {
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }

    /* Adjust button sizes for mobile */
    .play-btn {
        height: 12%;
        /* Slightly larger for mobile */
    }
}