* {
    box-sizing: border-box
}

:root{
    --bg:#080b16;
    --panel:#111728;
    --panel2:#171e32;
    --text:#f7f8ff;
    --muted:#929ab2;
    --line:#27304a;
    --accent:#7c5cff;
    --accent2:#4fd1c5;
    --good:#28d17c;
    --bad:#ff5d73;
    --shadow:0 30px 80px rgba(0,0,0,.38)
}
body.light{
    --bg:#eef1f8;
    --panel:#fff;
    --panel2:#f5f6fb;
    --text:#171a27;
    --muted:#667085;
    --line:#dce1ee;
    --shadow:0 25px 60px rgba(40,50,80,.14)
}


body {
    direction: rtl;
    margin: 0;
    min-height: 100vh;
    background:radial-gradient(circle at 20% 0%,rgba(124,92,255,.16),transparent 32%),radial-gradient(circle at 100% 100%,rgba(79,209,197,.09),transparent 28%),var(--bg);
    color: var(--text);
    font-family: system-ui, Segoe UI, sans-serif
}

header,
main {
    width: min(1050px, calc(100% - 30px));
    margin: auto
}

header {
    /* position: fixed; */
    margin-top: 10px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between
  }

.brand {
    font-weight: 900
}

.brand span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #a895ff);
    margin-right: 7px
}

.brand b {
    font-size: 10px;
    color: var(--accent2)
}

.brand em {
    font-style: normal;
    color: #4fd1c5;
    font-size: 9px;
    letter-spacing: 2px;
    margin-left: 7px
}

header button {
    width: 40px;
    height: 40px;
    border: 1px solid #303951;
    background: var(--panel);
    color:var(--text);
    border-radius: 12px;
    margin-left: 5px
}

.screen {
    display: none;
    padding: 42px 0
}

.screen.active {
    display: block;
    animation: fade .35s
}

.hero,
.card {
    background:linear-gradient(145deg,rgba(255,255,255,.035),transparent),var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 80px #0006
}

.hero {
    max-width: 850px;
    margin: auto;
    text-align: center;
    padding: 65px 35px
}

.hero>small,
.results>small {
    letter-spacing: 3px;
    color: #929ab2;
    font-weight: 900;
    font-size: 10px
}

.hero h1 {
    font-size: clamp(52px, 8vw, 86px);
    line-height: .9;
    letter-spacing: 5px;
    margin: 20px
}

.hero h1 i {
    font-style: normal;
    color: #927dff
}

.hero p {
    color: #929ab2;
    max-width: 650px;
    margin: 20px auto;
    line-height: 1.7
}

.features,
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 30px auto
}

.features div,
.stats div {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 15px
}
.stats div {
   padding: 1px
}

.features strong,
.stats b {
    display: block;
    font-size: 23px
}

.features small,
.stats small,
.best {
    color: var(--muted);
    font-size: 11px
}

.primary,
.secondary,
.next {
    padding: 14px 21px;
    border-radius: 14px;
    font-weight: 900;
    border: 0
}

.primary,
.next {
    background: linear-gradient(135deg, #7657ff, #9b87ff);
    color: white;
    box-shadow: 0 12px 30px #7657ff44
}

.secondary {
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--line);
    margin-left: 7px
}

.meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.meta small,
.score small {
    font-family: sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: #929ab2;
    font-weight: 900
}

.meta h2 {
    margin: 4px 0;
    font-size: 30px
}

.meta h2 i {
    font-style: normal;
    color: #929ab2;
    font-size: 14px
}

.score {
    text-align: right
}

.score b {
    font-size: 27px;
    display: block
}

.ring {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    /* background: conic-gradient(var(--accent) 100%, var(--line) 0); */
    position: relative
}

.ring:before {
    content: "";
    position: absolute;
    inset: 6px;
    background: var(--panel);
    border-radius: 50%
}

.ring strong,
.ring small {
   
    z-index: 1
}

.ring {
    font-size: 22px
}

.ring small {
    margin-top: -23px
}

.progress {
    height: 7px;
    background: var(--line);
    border-radius: 99px;
    overflow: hidden;
    margin: 22px 0
}

.progress span {
    display: block;
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));   
    transition: .3s
}

.card {
    padding: 35px
}

.pill,
.diff,
.tier {
    display: inline-block;
    border-radius: 99px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px
}

.pill {
    color: #a995ff;
    background: #7657ff18
}

.diff {
    float: left;
    color: #ffd45a;
    background: #ffd45a15
}

.card h3 {
    font-size: clamp(25px, 4vw, 40px);
    line-height: 1.2;
    margin: 20px 0 28px
}

.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px
}

.answer {
    padding: 17px;
    text-align: right;
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    align-items: center;
    font-size: 20px;
    gap: 13px
}

.answer:hover:not(:disabled) {
    border-color: var(--accent)
}

.letter {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: var(--line);
    display: grid;
    place-items: center;
    font-weight: 900;
    flex: none
}

.answer.correct {
    border-color: #2cdb82;
    background: #2cdb8214
}

.answer.correct .letter {
    background: #2cdb82
}

.answer.wrong {
    border-color: #ff5d73;
    background: #ff5d7314
}

.answer.wrong .letter {
    background: #ff5d73;
    color: #fff
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    color: #929ab2
}

.footer em {
    color: #ffd45a;
    font-style: normal;
    margin-left: 8px
}

.next:disabled {
    opacity: .35
}

.results {
    text-align: center;
    max-width: 780px;
    margin: auto
}

.big {
    font-size: 58px
}

.results h1 {
    font-size: 43px
}

.final b {
    display: block;
    font-size: 75px;
    color: #9885ff
}

.final small {
    font-size: 10px;
    letter-spacing: 2px;
    color: #929ab2
}

.results p {
    color: #929ab2
}

.stats {
    grid-template-columns: repeat(4, 1fr);
    max-width: none
}

.review {
    text-align: right;
    border-top: 1px solid #283149;
    margin-top: 25px;
    padding-top: 10px
}

.review div {
    padding: 13px 0;
    border-bottom: 1px solid #283149
}

.review span {
    display: block;
    color: #929ab2;
    font-size: 12px;
    margin-top: 4px
}

.hidden {
    display: none !important
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: var(--bg);
    backdrop-filter: blur(12px);
    overflow: hidden
}

.modal {
    width: min(530px, calc(100% - 24px));
    padding: 28px 30px;
    text-align: center;
    position: relative;
    background: var(--bg);
    border: 1px solid #ffd45a55;
    border-radius: 30px;
    box-shadow: 0 40px 120px #000b;
    overflow: hidden;
    animation: modal .7s cubic-bezier(.16, 1.2, .3, 1)
}

.rays {
    position: absolute;
    inset: -100px;
    background: repeating-conic-gradient(#ffd45a22 0 3deg, transparent 3deg 18deg);
    animation: spin 20s linear infinite
}

.modal>*:not(.rays) {
    position: relative
}

.trophy-stage {
    height: 180px;
    display: grid;
    place-items: center
}

.trophy {
    font-size: 115px;
    filter: drop-shadow(0 0 22px #ffd45aaa);
    animation: trophyIn 1s cubic-bezier(.17, .89, .32, 1.45), float 2.2s 1s infinite
}

.glow {
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd45a55, transparent 68%);
    animation: pulse 1.5s infinite
}

.gold {
    color: #ffd45a;
    letter-spacing: 3px;
    font-weight: 900
}

.modal h2 {
    font-size: 32px;
    margin: 8px
}

.tier {
    background: linear-gradient(90deg, #ffe99b, #ffba2e);
    color: #231900
}

.modal p {
    color: #b8bdcc
}

.label {
    display: block;
    color: #737d94;
    letter-spacing: 2px;
    margin-top: 15px
}

.animatedScore {
    font-size: 60px;
    color: #ffd45a;
    font-weight: 950
}

.celebrateStats {
    color: #b8bdcc;
    font-size: 12px;
    margin: 14px
}

.particle {
    position: absolute;
    top: -30px;
    font-size: 18px;
    animation: fall var(--d) linear var(--delay) forwards
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1
    }
}

@keyframes modal {
    from {
        opacity: 0;
        transform: translateY(90px) scale(.55)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@keyframes trophyIn {
    0% {
        opacity: 0;
        transform: scale(.05) rotate(-45deg)
    }

    55% {
        opacity: 1;
        transform: scale(1.3) rotate(8deg)
    }

    80% {
        transform: scale(.92)
    }

    to {
        transform: scale(1)
    }
}

@keyframes float {
    50% {
        transform: translateY(-10px)
    }
}

@keyframes pulse {
    50% {
        transform: scale(1.3)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes fall {
    to {
        transform: translate(var(--x), 110vh) rotate(var(--r));
        opacity: 0
    }
}

#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    background: white;
    color: #111;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: .25s
}

#toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

@media(max-width:700px) {
    header {
        height: 30px;
        
    }
    .hero {
        padding: 45px 20px
    }

    .hero h1 {
        font-size: 30px;
        letter-spacing: 2px
    }
    .meta h2 {
        font-size: 20px
    }
    .score b {
        font-size: 20px
    }
    .meta small,
    .score small {
        font-size: 14px;
        letter-spacing: 1px;
        font-weight: 700
}
    .card h3 {
        font-size: 18px
    }

    .features{
        grid-template-columns: 1fr 1fr;
    }
     .stats div {
         padding: 1px;
         grid-template-columns: repeat(3, 1fr);
    }

    .meta {
       display: flex;
       align-items: center;
       justify-content:space-between
    }

    /* .score {
        display: none    } */

    .answers {
        grid-template-columns: 1fr
    }
    .answer{
        padding:2px;
        border-radius:10px;
        font-size:17px;
    }
    .answer-letter{
        width:40px;
        height:40px;
        font-size:28px
    }

    .card {
        padding: 24px
    }

    .secondary {
        margin: 8px 0 0
    }
    .ring{
        width: 40px;
        height:40px;
        font-size:16px
    }

    .trophy {
        font-size: 90px
    }

    .trophy-stage {
        height: 150px
    }
}