* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
    --purple: #4d3361;
    --blue: #4d3361;
    --purple-light: #cbbbde;
    --purple-light-x2: #ebe1f7;
    --green-ok: #56B651;
    --red-wrong: #ED5F56;
    --near-black: #2F2636;
    --gray: #ccc;
    --black: #222;
    --disabled:#aaa;
    --width_lock: 550px;
}

@font-face {
    font-family: 'TitleFont';
    src: url('./bulgary_reagans.woff2') format('woff2'),
         url('./bulgary_reagans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ---------- GLOBAL ---------- */

body {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 5.5px;
    background-color: var(--purple-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-width: fit-content;
    
    max-width: 550px; 
    margin:auto;
}

a {
    text-decoration: none;
}

button {
    font-family: 'Rubik', Arial, sans-serif;
    display: block;
    padding: 2vw 3vw;
    margin: auto;
    border: none;
    border-radius: 5px;
    background-color: var(--blue);
    color: white;
    font-size: 4.5vw;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    
    @media screen and (min-width: 550px)  { 
        font-size: 4em; 
        padding: 11px 16.5px; 
    }
}

/* ---------- CONTAINERS ---------- */

.container {
    width: 100%;
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-width: var(--width_lock);
    margin-bottom: 20px;
}

#result-container {
    display: none;
}

.box {
    display: flex;
    flex-direction: column;
    gap: 2vw 0;
    background-color: white;
    padding: 4%;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    
    @media screen and (min-width: 550px)  { gap: 11px 0; }
}

#stats-box {
    padding: 2%;
    margin-bottom: 5vw;
    overflow: hidden;
    position:relative;
    
    @media screen and (min-width: 550px)  { margin-bottom: 27.5px; }
} 

#game-choices {
    margin-bottom: 5vw;
    
    @media screen and (min-width: 550px)  { margin-bottom: 27.5px; }
}

/* ---------- TEXT ---------- */

#title {
    font-family: 'TitleFont', sans-serif;
    color: var(--purple);
    font-size: 21vw;
    text-align: center;
    width: 90%;
    max-width: calc(90/100 * var(--width_lock));
    margin-bottom: 5px;
    margin-top: 20px;
    
    @media screen and (min-width: 550px)  { font-size: 21em; }
}

#intro-txt {
    font-size: 4.5vw;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 6vw;
    color: var(--black);
    
    @media screen and (min-width: 550px)  { 
        font-size:  4.5em;
        margin-bottom: calc(6*var(--width_lock)/100);
    }
}

.score {
    font-size: 8vw;
    font-weight: 500;
    text-align: center;
    color: var(--black);
    
    @media screen and (min-width: 550px)  { font-size: 8em; }
}

#game-question-setup {
    font-size: 4.2vw;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 2vw;
    color: var(--black);
    
    @media screen and (min-width: 550px)  {
        font-size:  4.2em;
        margin-bottom: 20px;
    }
}

#game-question {
    font-size: 5vw;
    margin-bottom: 4vw;
    font-weight: 500;
    background-color: var(--purple);
    color: white;
    padding: 2vw 6vw;
    position: relative;
    left: -7.5%;
    width: 115%;
    
    @media screen and (min-width: 550px)  { 
        font-size: 5em;
        margin-bottom: 20px;
        padding: 11px 33px;
    }
}

#result-custom-text {
    font-size: 4.5vw;
    font-weight: 400;
    text-align: center;
    margin-bottom: 5vw;
    color: var(--near-black);
    
    @media screen and (min-width: 550px)  { 
        font-size: 4.5em;
        margin-bottom: calc(5 * var(--width_lock)/100);
    }
}

#result-poster-text {
    font-size: 6vw;
    color:white;
    font-weight: 500;
    text-align: center;
    padding: 1vw;
    margin-top: 5vw;
    margin-bottom: 5vw;
    
    @media screen and (min-width: 550px)  { 
        font-size: 6em;
        padding: 10px;
        margin-top: 25px; 
        margin-top: calc(5 * var(--width_lock)/100);
        margin-bottom: calc(5 * var(--width_lock)/100);
    }
}

/* ---------- IMAGES ---------- */

#result-image {
    display:none;
    width: 50%;
}

#logo {
    width: 40vw;
    margin-top: 10vw 0;
    
    @media screen and (min-width: 550px)  { 
        width: calc(var(--width_lock)/100 * 40);
        margin: 21px 0;
    }
}

/* ---------- CUSTOM BUTTONS ---------- */  

.slanted-button {
    background-color: var(--purple-light);
    border: none;
    color: #222;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    border-radius: 0px;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%); /*To change the slant angle adjust the 80% 100% part*/
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.slanted-button:disabled, #next-button:disabled {
    background-color: var(--disabled);
    color: var(--near-black);
    cursor: not-allowed;
}

#quiz-button {
    background-color: var(--purple-light-x2);
    color: var(--near-black);
    font-weight: 400;
    padding-left: 6%;
    width:108%;
    left: -7.5%;
    margin-bottom: 2.5vw;
    font-size: 4.5vw;
    
    @media screen and (min-width: 550px)  { 
        margin-bottom: calc(2.5 * 5.5px);
        font-size: 4.5em;
    }
}

#quiz-button:disabled {
    background-color: var(--disabled);
    color: white;
    cursor: not-allowed;
}

.overlay-btn {
    background-color: var(--purple-light-x2);
    color: var(--near-black);
    -webkit-tap-highlight-color: transparent;
    margin: 1vw auto;
    min-width: 25%;
    
    @media screen and (min-width: 550px)  { margin: calc(1 * var(--width_lock)/100) auto; }
}

#previous-button {
    background-color: var(--purple);
    color: white;
    text-align: center;
    font-weight: 500;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%);
    left: 23%;
    padding-left: 8%;
    width: 70%;
}

#download_btn {
    margin: 3vw auto;
    font-weight: 400;
    
    @media screen and (min-width: 550px)  { margin: 16.5px auto; }
}

/* ---------- CUSTOM PROGRESS BAR ---------- */

#progress-bar-dots {
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 85%;
    margin: auto;
    margin-top: 4vw;
    margin-bottom: 2vw;
    
    @media screen and (min-width: 550px)  { 
        margin-top: 20px;
        margin-bottom: 10px;
    }
}

#flag {
    position: absolute;
    color: var(--near-black);
    width: 20px;
    text-align: center;
    transition: left 0.5s;
}

.flag-class {
    position: relative;
    top: -1vw;
    left: -2vw;
    font-size: 10vw;
    
    @media screen and (min-width: 550px)  { 
        font-size: 10em;
        top: -5.5px;
        left: -11px;
    }
}

.dot {
    height: 6vw;
    width: 6vw;
    background-color: var(--gray);
    border-radius: 50%;
    display: inline-block;
    
    @media screen and (min-width: 550px)  { 
        height: 35px;
        width: 35px;
    }
}

.active {
    background-color: var(--purple);
}

/* ---------- CUSTOM STAR OVERLAY ---------- */

.overlay{
    display: flex;
    flex-direction: column;
    align-content:center;
    justify-content:center;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    position: absolute;
    top: -100%;
    left: 0%;
}

#star-overlay {
    background-color: var(--green-ok);
    color: white;
}

#overlay-wrong {
    background-color: var(--red-wrong);
    color: white;
}

#star-overlay.start {
    transition: top 0s ease;
    top: -100%;
}

#star-overlay.close {
    transition: top 0.75s ease;
    top: 0%;
}

#overlay-wrong.start {
    transition: top 0s ease;
    top: -100%;
}

#overlay-wrong.close {
    transition: top 0.75s ease;
    top: 0%;
}

.dialog-text-big {
    color: white;
    font-size: 10vw;
    font-weight: 500;
    text-align: center;
    
    @media screen and (min-width: 550px)  { font-size: 10em; }
}

.dialog-text {
    font-size: 4.5vw;
    font-weight: 300;
    text-align: center;
    
    @media screen and (min-width: 550px)  { font-size: 4.5em; }
}

/* ---------- ANIMATIONS ---------- */

#transition-overlay {
    position: fixed;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background-color: var(--purple); /* Choose your preferred color */
    z-index: 20; /* Above everything else */
}

#transition-overlay.start {
    transition: left 0s ease; /* Instant transition */
    left: -100%;
}

#transition-overlay.close {
    transition: left 0.5s ease; /* Smooth transition */
    left: 0%;
}

#transition-overlay.open {
    transition: left 0.5s ease; /* Smooth transition */
    left: 100%;
}

@keyframes fall {
    60% { opacity: 0.85; }
    100% { top: 100vh; opacity: 0; }
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.flake {
    position: absolute;
    top: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    opacity: 1;
    animation: fall cubic-bezier(0.2,0,1,.75) forwards;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2%); }
    20%, 40%, 60%, 80% { transform: translateX(2%); }
}

.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes slidein {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes beat {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.35) translateY(2px);
    }
}