:root{
    --trans: 0.4s ease;
    --bg:#070714;
    --color:#F0F1F5;
    --sc:rgba(240, 241, 245,0.1);
}

body{
    margin: 0;
    padding: 0;
    font-family: Cairo, Arial;
    background: var(--bg);
    direction: rtl;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

*,::before,::after{
    box-sizing: border-box;
}

h1,h2,h3,p{
    margin: 0;
    padding: 0;
}

::selection{
    color: var(--bg);
    background: var(--color);
}

header,
section{
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
}

nav{
    display: flex;
    align-items: center;
    gap: 50px;
    padding-top: 50px;
}

nav a{
    color: var(--color);
    opacity: 0.7;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.01rem;
    transition: var(--trans);
}

nav a:hover{
    opacity: 1;
    scale: 1.03;
}

.home-logo{
    width: 135px;
    margin-inline-end: 10px;
}


.bg-con{
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.bg-circle{
    border-radius: 100%;
}

#bg-1{
    position: absolute;
    bottom: -15%;
    right: -6%;
    width: 550px;
    height: 550px;
    width: 60vh;
    height: 60vh;
    background: #00E69D;
    mix-blend-mode: overlay;
    filter: blur(60px);
    opacity: 0.15;
}

#bg-2{
    position: absolute;
    bottom: -2%;
    left: 0;
    width: 300px;
    height: 300px;
    width: 32vh;
    height: 32vh;
    background: #ED3852;
    mix-blend-mode: overlay;
    filter: blur(60px);
    opacity: 0.15;
}

#bg-3{
    position: absolute;
    top: -20%;
    left: -11%;
    width: 550px;
    height: 550px;
    width: 60vh;
    height: 60vh;
    background: #FBBC15;
    mix-blend-mode: overlay;
    filter: blur(60px);
    opacity: 0.15;
}

#bg-4{
    position: absolute;
    top: -6%;
    left: 14%;
    width: 300px;
    height: 300px;
    width: 32vh;
    height: 32vh;
    background: #7C15D1;
    mix-blend-mode: overlay;
    filter: blur(50px);
    opacity: 0.15;
    z-index: 1;
}


/* Form */
.form-sec{
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    height: 100%;
    flex: 1;
    padding: 0 40px;
    padding-bottom: 100px;
}

.form{
    position: relative;
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--color);
    fill: var(--color);
    transition: var(--trans);
    opacity: 0;
    transform: translateY(-50%);
    filter: blur(6px);
}

.progress-wrapper{
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
}

#back-btn{
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.01rem;
    transition: var(--trans);
    transform-origin: right;
}

#back-btn:hover{
    opacity: 0.7;
    scale: 1.03;
}

#back-btn svg{
    width: 26px;
}

.q-count{
    color: var(--sc);
    font-size: 1.25rem;
    line-height: 1;
    align-self: flex-end;
}

#progress-bar{
    position: absolute;
    inset: 0;
    width: 10%;
    background: var(--color);
}

.progress-bar-con{
    position: absolute;
    width: 100%;
    height: 7px;
    bottom: 0;
    background: var(--sc);
    border-radius: 2px;
    overflow: hidden;
}

.current-q-wrapper{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.q-wrapper{
    width: 100%;
    padding: 9px 15px 11px 15px;
    background: var(--sc);
    border-radius: 13px;
}

#q{
    font-size: 1.35rem;
    line-height: 1.5;
    margin: 3px 0;
}

#q-des{
    font-size: 0.9rem;
    color: var(--color);
    color: rgba(from var(--color) r g b / 0.5);
    margin-inline-start: 12px;
}

.answers-wrapper{
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.answer{
    padding: 8px 25px;
    background: var(--color);
    color: var(--bg);
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    min-width: 130px;
    text-align: center;
    transition: var(--trans);
    cursor: pointer;
    transform-origin: bottom center;
    transform: translateY(50%);
    opacity: 0;
    filter: blur(6px);
}

.answer:hover{
    opacity: 0.8;
    scale: 1.05;
}

.answer{
    animation: q-in 0.5s ease-in-out forwards;
}

.answer:nth-child(1){
    animation-delay: 0s;
}

.answer:nth-child(2){
    animation-delay: 0.1s;
}

.answer:nth-child(3){
    animation-delay: 0.2s;
}

.answer:nth-child(4){
    animation-delay: 0.3s;
}


/* Results */
.result-sec{
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    color: var(--color);
    height: 100%;
    flex: 1;
    padding: 60px;
    transition: var(--trans);
}

.q-in .result-sec,
.q-out .result-sec{
    display: none;
}

.results-out .form-sec,
.results .form-sec{
    display: none;
}

.best-wrapper{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 23px;
    max-width: 500px;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-50%);
}

.best-wrapper h1{
    margin-bottom: -3px;
}

#best-list{
    width: 100%;
    max-width: 330px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.best-platform{
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-num{
    font-size: 2rem;
    font-weight: 700;
}

.best-platform-wrapper{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 11px 13px;
    background: var(--sc);
    border-radius: 9px;
    width: 100%;
    letter-spacing: 0.02rem;
}

.best-platform-wrapper img{
    max-height: 25px;
    width: 35px;
}

.platform-preview{
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--color);
    padding: 5px 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 7px;
    color: var(--color);
    text-decoration: none;
    transition: var(--trans);
    opacity: 0.5;
}

.platform-preview:hover{
    opacity: 1;
}

.platform-preview img{
    width: 20px;
}

.best-platform .best-platform-wrapper:not(:has(.platform-preview)) p{
    margin: 0 auto;
}

#retry-btn{
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--color);    
    color: var(--bg);
    fill: var(--bg);
    cursor: pointer;
    transition: var(--trans);
}

#retry-btn svg{
    width: 30px;
}

#retry-btn:hover{
    opacity: 0.8;
    scale: 1.05;
}

.offers{
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-50%);
}

.offers h2{
    line-height: 1;
}

.offers p{
    opacity: 0.6;
    line-height: 1.5;
}

.offers-wrapper{
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.offer{
    background:rgb(var(--offer-bg));
    color: var(--offer-color);
    box-shadow: 0px 0px 15px 3px rgba(var(--offer-bg),0.25);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 220px;
    line-height: 1.6;
    text-decoration: none;
    transition: var(--trans);
    align-self: stretch;
}

.offer h3{
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.03rem;
    margin: auto 0;
}

.offer img{
    margin-inline-end: auto;
    height: 35px;
}

.offer:hover{
    scale: 1.03;
}

#zid-offer{
    --offer-bg: 116, 98, 244;
    --offer-color: #EFEDF7;
}

#shah-offer{
    --offer-bg: 239, 65, 61;
    --offer-color: #F5E9E9;
}

#dash-offer{
    --offer-bg: 27, 117, 188;
    --offer-color: #F4F8FA;
}

#mat-offer{
    --offer-bg: 25, 82, 132;
    --offer-color: #d0dbe4;
}


.signups-sec{
    margin-top: 15px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
}

.aasf-signups{
    flex: 1 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-50%);
}

.signups{
    flex: 1 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-50%);
}

.sign-up-heading-wrapper{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    row-gap: 7px;
    line-height: 1.65;
}

#referral-badge{
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--color);
    color: var(--bg);
    fill: var(--bg);
    padding: 4px 10px 5px 10px;
    border-radius: 7px;
    cursor: pointer;
}

#referral-badge svg{
    margin-top: 2px;
    width: 22px;
}

.tippy-box[data-theme~='light']{
    border-radius: 9px;
}

.signups-wrapper{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 650px;
}

.signup{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 300px;
    padding: 9px 12px;
    border-radius: 9px;
    background: var(--sc);
    white-space: nowrap;
}

.signup img{
    max-height: 25px;
    width: 35px;
    object-fit: contain;
}

.signup p{
    flex: 1;
}

.signup a{
    width: 32px;
    height: 32px;
    fill: var(--color);
    transition: var(--trans);
}

.signup a:hover{
    opacity: 0.6;
    scale: 1.03;
}

.hidden{
    animation: q-out 0.3s ease-in-out forwards;
    pointer-events: none;
}



/* Animations */
@keyframes q-in{
    from{
        transform: translateY(50%);
        opacity: 0;
        filter: blur(6px);
    }
    to{
        transform: translateY(0%);
        opacity: 1;
        filter: blur(0px);
    }
}
@keyframes q-out{
    from{
        transform: translateY(0%);
        opacity: 1;
        filter: blur(0px);
    }
    to{
        transform: translateY(-50%);
        opacity: 0;
        filter: blur(6px);
    }
}

.q-in .form{
    animation: q-in 0.8s ease-in-out forwards;
}
.q-out .form{
    animation: q-out 0.8s ease-in-out forwards;
}


.results .best-wrapper{
    animation: q-in 0.8s 0.2s ease-in-out forwards;
}

.results .offers{
    animation: q-in 0.8s 0.34s ease-in-out forwards;
}

.results .aasf-signups{
    animation: q-in 0.8s 0.6s ease-in-out forwards;
}

.results .signups{
    animation: q-in 0.8s 0.7s ease-in-out forwards;
}

.results-out .results-out-animation{
    animation: q-out 0.8s ease-in-out forwards;
}



@keyframes slow-motion {
    0% {
      transform: translate(0, 0);
    }
    50% {
      transform: translate(300px, 150px);
    }
    100% {
      transform: translate(0, 0);
    }
}

@keyframes first-slow-motion {
    0% {
      transform: translate(0, 0);
      scale: 1;
    }
    50% {
      transform: translate(-200px, -300px);
      scale: 1.2;
    }
    100% {
      transform: translate(0, 0);
      scale: 1;
    }
}

@keyframes second-slow-motion {
    0% {
      transform: translate(0, 0);
      scale: 1;
    }
    50% {
      transform: translate(200px, -150px);
      scale: 1.2;
    }
    100% {
      transform: translate(0, 0);
      scale: 1;
    }
}

.bg-con div:first-child{
    animation: first-slow-motion 50s ease infinite;
}

.bg-con div:nth-child(2){
    animation: second-slow-motion 25s ease infinite;
}

.bg-con div:nth-child(3){
    animation: slow-motion 30s 2s ease infinite;
}

.bg-con div:nth-child(4){
    animation: slow-motion 20s 2.5s ease infinite;
}


@media (max-width: 860px){

    nav{
        padding-top: 30px;
    }

    nav a{
        font-size: 1rem;
    }

    .result-sec{
        padding-top: 30px;
    }

}


@media (max-width: 640px){

    header,
    section{
        padding: 0 20px;
    }

    nav{
        gap: 25px;
        padding-top: 20px;
    }
    
    .home-logo{
        width: 100px;
        margin-inline-end: 7px;
    }

    nav a{
        font-size: 0.85rem;
        line-height: 1.25;
    }

    #bg-1,#bg-2,#bg-3,#bg-4{
        width: 30vh;
        height: 30vh;
    }

    #bg-1{
        bottom: -15%;
        right: -20%;
        width: 50vh;
        height: 50vh;
    }

    #bg-2{
        left: 0;
        bottom: 25%;
    }

    #bg-3{
        top: 0;
        left: 0;
    }

    #bg-4{
        top: 0;
        left: 50%;
    }

    .answers-wrapper{
        gap: 15px;
    }

    .answer{
        font-size: 1rem;
    }

    #q-des{
        margin-inline-start: 4px;
    }

    /* Results */
    .result-sec{
        padding: 40px 20px 60px 20px;
        gap: 60px;
    }

    .offer{
        width: 100%;
        max-width: 350px;
    }

    .aasf-signups{
        margin-top: 0;
    }

    #referral-badge{
        font-size: 0.7rem;
        line-height: 1.3;
        padding: 4px 9px 5px 9px;
    }

    #referral-badge svg{
        margin-top: 0;
        width: 18px;
    }

    .signups-sec{
        flex-direction: column;
    }

    .signups-wrapper{
        display: flex;
        flex-wrap: wrap;
        margin-top: 7px;
    }

    .signup{
        line-height: 1.5;
        width: 100%;
    }

}


@font-face {
    font-family: 'Cairo';
    src: url('Assets/font/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Cairo';
    src: url('Assets/font/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}