:root {
    --qint-ink: #f5f1e8;
    --qint-muted: #aeb9bb;
    --qint-night: #071116;
    --qint-panel: #0d1c22;
    --qint-panel-2: #13282e;
    --qint-gold: #f5bf42;
    --qint-gold-dark: #a86f12;
    --qint-teal: #35c4b5;
    --qint-red: #ee705d;
    --qint-line: rgba(235, 230, 211, .14);
}

/* Keep answer controls unobstructed on the dedicated game route. */
.qint-page #pwa-install-banner,
.qint-page #qissue-widget,
.qint-page #qadiyah-wanees,
.qint-page #qdn-fab,
.qint-page #qdn-panel,
.qint-page #qdn-overlay,
.qint-page #qosocial-root,
.qint-page #qdisc-popup,
.qint-page #notification-bar { display: none !important; }

.qint, .qint * { box-sizing: border-box; }
.qint button, .qint a { font: inherit; }
.qint button { cursor: pointer; }
.qint[hidden], .qint [hidden] { display: none !important; }

.qint {
    position: relative;
    isolation: isolate;
    width: min(1240px, calc(100% - 24px));
    min-height: 760px;
    margin: 24px auto 56px;
    overflow: hidden;
    border: 1px solid rgba(245, 191, 66, .2);
    border-radius: 32px;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        radial-gradient(circle at 78% 3%, rgba(245,191,66,.1), transparent 25rem),
        radial-gradient(circle at 0 40%, rgba(53,196,181,.08), transparent 24rem),
        var(--qint-night);
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
    color: var(--qint-ink);
    box-shadow: 0 30px 90px rgba(3, 10, 13, .38);
    font-family: "Tajawal", "Noto Kufi Arabic", system-ui, sans-serif;
}

.qint::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .14;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
}

.qint__atmosphere span { position: absolute; z-index: -1; pointer-events: none; border-radius: 999px; filter: blur(2px); }
.qint__atmosphere span:nth-child(1) { width: 260px; height: 260px; top: -140px; right: 15%; border: 1px solid rgba(245,191,66,.18); }
.qint__atmosphere span:nth-child(2) { width: 12px; height: 12px; top: 180px; left: 8%; background: var(--qint-gold); box-shadow: 0 0 42px 16px rgba(245,191,66,.24); }
.qint__atmosphere span:nth-child(3) { width: 340px; height: 1px; top: 430px; right: -60px; transform: rotate(-18deg); background: linear-gradient(90deg, transparent, rgba(53,196,181,.25), transparent); }

.qint-hero { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 16px 38px; padding: 54px 6.5% 38px; border-bottom: 1px solid var(--qint-line); }
.qint-back { position: absolute; top: 22px; right: 28px; display: inline-flex; gap: 7px; align-items: center; color: var(--qint-muted); font-size: 14px; font-weight: 700; text-decoration: none; transition: color .2s ease; }
.qint-back:hover { color: var(--qint-gold); }
.qint-hero__seal { grid-row: 1 / span 2; place-self: center; display: grid; place-content: center; width: 126px; height: 126px; border: 1px solid rgba(245,191,66,.42); border-radius: 50%; color: var(--qint-gold); text-align: center; background: radial-gradient(circle, rgba(245,191,66,.12), rgba(245,191,66,.025) 62%, transparent 63%); box-shadow: inset 0 0 0 8px var(--qint-night), inset 0 0 0 9px rgba(245,191,66,.15), 0 0 50px rgba(245,191,66,.09); }
.qint-hero__seal::before, .qint-hero__seal::after { content: "✦"; position: absolute; color: rgba(245,191,66,.55); }
.qint-hero__seal span { font: 800 38px/1 Georgia, serif; letter-spacing: -2px; }
.qint-hero__seal small { margin-top: 5px; color: var(--qint-muted); font-size: 13px; font-weight: 800; }
.qint-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--qint-teal); font-size: 13px; font-weight: 900; letter-spacing: .03em; }
.qint-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(53,196,181,.1); }
.qint-hero h1 { margin: 7px 0 8px; color: #fff; font-size: clamp(39px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; }
.qint-hero h1 em { color: var(--qint-gold); font-style: normal; }
.qint-hero__copy p { max-width: 720px; margin: 0; color: var(--qint-muted); font-size: clamp(16px, 2vw, 20px); line-height: 1.85; }
.qint-hero__chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.qint-hero__chips span { padding: 7px 12px; border: 1px solid var(--qint-line); border-radius: 999px; color: #d8dfdd; background: rgba(255,255,255,.035); font-size: 12px; font-weight: 800; }

.qint-dashboard { display: grid; grid-template-columns: 1.08fr 1.5fr .72fr; gap: 12px; padding: 18px 4%; background: rgba(4,12,16,.48); border-bottom: 1px solid var(--qint-line); }
.qint-dashboard article { min-height: 94px; border: 1px solid var(--qint-line); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); }
.qint-rank-card { display: grid; grid-template-columns: 52px 1fr 38px; align-items: center; gap: 11px; padding: 14px; }
.qint-rank-card__crest { display: grid; place-items: center; width: 48px; height: 56px; clip-path: polygon(50% 0, 94% 20%, 87% 76%, 50% 100%, 13% 76%, 6% 20%); background: linear-gradient(145deg, #f9d268, #9d6712); color: #1c1608; font-size: 22px; }
.qint-rank-card small, .qint-meter-card span, .qint-score-card small { display: block; color: var(--qint-muted); font-size: 11px; font-weight: 800; }
.qint-rank-card strong { display: block; margin: 1px 0; color: var(--qint-gold); font-size: 20px; line-height: 1.25; }
.qint-rank-card span { color: #d2d9d8; font-size: 11px; }
.qint-icon-button, .qint-info { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(245,191,66,.28); border-radius: 50%; background: rgba(245,191,66,.08); color: var(--qint-gold); }
.qint-icon-button:hover, .qint-info:hover { background: var(--qint-gold); color: #171206; }
.qint-meter-card { display: flex; flex-direction: column; justify-content: center; padding: 16px 18px; }
.qint-meter-card__head { display: flex; justify-content: space-between; align-items: center; }
.qint-meter-card__head strong { color: #fff; font-size: 14px; }
.qint-meter { height: 8px; margin: 10px 0 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.qint-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--qint-teal), var(--qint-gold)); box-shadow: 0 0 16px rgba(245,191,66,.35); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.qint-meter-card > small { color: var(--qint-muted); font-size: 11px; }
.qint-score-card { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; }
.qint-score-card strong { display: flex; align-items: baseline; gap: 3px; color: #fff; font-size: 34px; }
.qint-score-card strong b { color: var(--qint-muted); font-size: 12px; }

.qint-stage { min-height: 570px; padding: clamp(24px, 5vw, 58px) 5%; }
.qint-loading { min-height: 430px; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--qint-muted); }
.qint-loader { width: 44px; height: 44px; border: 3px solid rgba(255,255,255,.09); border-top-color: var(--qint-gold); border-radius: 50%; animation: qint-spin .85s linear infinite; }
@keyframes qint-spin { to { transform: rotate(1turn); } }

.qint-intro { display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; min-height: 465px; border: 1px solid var(--qint-line); border-radius: 26px; overflow: hidden; background: rgba(12,27,33,.78); box-shadow: 0 24px 50px rgba(0,0,0,.2); }
.qint-intro__visual { position: relative; min-height: 390px; display: grid; place-content: center; background: radial-gradient(circle at 50% 45%, rgba(245,191,66,.14), transparent 12rem), linear-gradient(145deg, #0b2d32, #0a171d); overflow: hidden; }
.qint-intro__visual::before { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(245,191,66,.18); transform: rotate(8deg); }
.qint-intro__visual::after { content: ""; position: absolute; width: 110%; height: 22px; top: 15%; right: -5%; background: repeating-linear-gradient(90deg, var(--qint-gold) 0 80px, #151109 80px 160px); opacity: .65; transform: rotate(-11deg); }
.qint-lens { position: relative; z-index: 1; display: grid; place-items: center; width: 154px; height: 154px; border: 12px solid #d5a631; border-radius: 50%; color: #fff; background: rgba(3,11,15,.72); font: 800 76px/1 Georgia, serif; box-shadow: inset 0 0 38px rgba(53,196,181,.16), 18px 22px 0 -12px #725019; }
.qint-lens::after { content: ""; position: absolute; width: 22px; height: 108px; bottom: -86px; left: -38px; border-radius: 8px; transform: rotate(44deg); background: linear-gradient(90deg,#8f641a,#f5bf42,#8f641a); }
.qint-intro__visual b { position: absolute; z-index: 2; bottom: 26px; right: 50%; transform: translateX(50%) rotate(-2deg); width: max-content; padding: 9px 18px; background: #eee6ce; color: #183038; font-size: 13px; box-shadow: 5px 6px 0 rgba(0,0,0,.24); }
.qint-intro__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 58px); }
.qint-file-label { color: var(--qint-teal); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.qint-intro h2 { margin: 11px 0 16px; color: #fff; font-size: clamp(28px, 4vw, 44px); line-height: 1.35; letter-spacing: -.025em; }
.qint-intro h2 em { color: var(--qint-gold); font-style: normal; }
.qint-intro__copy > p { margin: 0 0 18px; color: var(--qint-muted); font-size: 15px; line-height: 1.85; }
.qint-intro__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2px 0 24px; border-block: 1px solid var(--qint-line); }
.qint-intro__stats span { padding: 13px 8px; text-align: center; border-left: 1px solid var(--qint-line); }
.qint-intro__stats span:last-child { border-left: 0; }
.qint-intro__stats strong { display: block; color: #fff; font-size: 20px; }
.qint-intro__stats small { color: var(--qint-muted); font-size: 10px; font-weight: 800; }
.qint-primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 54px; padding: 10px 19px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #f8cf62, #d99a24); color: #201605; font-weight: 950; box-shadow: 0 12px 30px rgba(218,154,36,.22); transition: transform .2s ease, filter .2s ease; }
.qint-primary:hover { transform: translateY(-2px); filter: brightness(1.07); }
.qint-primary i { font-style: normal; font-size: 22px; }
.qint-resume { margin: 9px 0 0 !important; color: var(--qint-teal) !important; font-size: 11px !important; text-align: center; }
.qint-reset { align-self: center; margin-top: 3px; padding: 5px 9px; border: 0; background: transparent; color: #768789; font-size: 10px; text-decoration: underline; }
.qint-reset:hover { color: #f2b1a7; }

.qint-game { max-width: 920px; margin: 0 auto; }
.qint-game__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 14px; }
.qint-question-number small { display: block; color: var(--qint-muted); font-size: 11px; font-weight: 800; }
.qint-question-number strong { color: var(--qint-gold); font-size: 24px; }
.qint-question-number b { color: var(--qint-muted); font-size: 12px; }
.qint-run-stats { display: flex; gap: 8px; }
.qint-run-stats span { display: grid; grid-template-columns: 20px auto; grid-template-rows: auto auto; column-gap: 6px; min-width: 95px; padding: 8px 11px; border: 1px solid var(--qint-line); border-radius: 11px; background: rgba(255,255,255,.025); }
.qint-run-stats i { grid-row: 1 / 3; align-self: center; color: var(--qint-teal); font-style: normal; }
.qint-run-stats b { color: #fff; font-size: 13px; }
.qint-run-stats small { color: var(--qint-muted); font-size: 9px; }
.qint-exit { justify-self: end; border: 0; background: transparent; color: var(--qint-muted); font-size: 12px; font-weight: 800; }
.qint-exit:hover { color: #fff; }
.qint-game__progress { height: 3px; margin-bottom: 20px; overflow: hidden; background: rgba(255,255,255,.07); }
.qint-game__progress i { display: block; width: 0; height: 100%; background: var(--qint-gold); transition: width .4s ease; }
.qint-question-card { position: relative; padding: clamp(24px, 5vw, 52px); border: 1px solid var(--qint-line); border-radius: 25px; background: linear-gradient(155deg, rgba(20,43,49,.98), rgba(8,22,27,.98)); box-shadow: 0 24px 60px rgba(0,0,0,.24); }
.qint-question-card::before { content: "؟"; position: absolute; top: -22px; left: 30px; color: rgba(245,191,66,.08); font: 800 180px/1 Georgia,serif; pointer-events: none; }
.qint-question-card__meta { position: relative; display: flex; gap: 8px; }
.qint-question-card__meta span { padding: 6px 10px; border-radius: 7px; background: rgba(53,196,181,.1); color: #91e5da; font-size: 10px; font-weight: 900; }
.qint-question-card__meta span + span { background: rgba(245,191,66,.1); color: #f5d984; }
.qint-question-card h2 { position: relative; max-width: 780px; min-height: 84px; margin: 20px 0 8px; color: #fff; font-size: clamp(23px, 3.4vw, 35px); line-height: 1.65; letter-spacing: -.015em; }
.qint-question-hint { margin: 0 0 24px; color: var(--qint-muted); font-size: 12px; }
.qint-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.qint-option { position: relative; min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.035); color: #eef3f2; text-align: right; font-weight: 800; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.qint-option span { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; color: var(--qint-gold); font-family: Georgia, serif; }
.qint-option:hover:not(:disabled), .qint-option:focus-visible { border-color: rgba(245,191,66,.55); background: rgba(245,191,66,.075); transform: translateY(-1px); outline: none; }
.qint-option.is-wrong { border-color: rgba(238,112,93,.75); background: rgba(238,112,93,.11); color: #ffb5a9; }
.qint-option.is-correct { border-color: rgba(53,196,181,.8); background: rgba(53,196,181,.12); color: #b7fff4; }
.qint-option:disabled { cursor: default; opacity: .72; }
.qint-option.is-correct:disabled { opacity: 1; }
.qint-feedback { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px; border: 1px solid rgba(53,196,181,.26); border-radius: 13px; background: rgba(53,196,181,.075); }
.qint-feedback.is-wrong { border-color: rgba(238,112,93,.28); background: rgba(238,112,93,.07); }
.qint-feedback__icon { flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--qint-teal); color: #06221e; font-weight: 950; }
.qint-feedback.is-wrong .qint-feedback__icon { background: var(--qint-red); color: #2b0905; }
.qint-feedback strong { color: #dffffa; font-size: 14px; }
.qint-feedback.is-wrong strong { color: #ffc1b7; }
.qint-feedback p { margin: 3px 0 0; color: var(--qint-muted); font-size: 12px; line-height: 1.7; }
.qint-next { width: 100%; margin-top: 14px; }

.qint-ranks { padding: 52px 5%; border-top: 1px solid var(--qint-line); background: rgba(3,10,13,.32); }
.qint-section-head { max-width: 650px; margin: 0 auto 28px; text-align: center; }
.qint-section-head > span { color: var(--qint-teal); font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.qint-section-head h2 { margin: 4px 0 5px; color: #fff; font-size: clamp(27px,4vw,40px); }
.qint-section-head p { margin: 0; color: var(--qint-muted); }
.qint-ranks__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; max-width: 1020px; margin: 0 auto; padding: 0; list-style: none; }
.qint-ranks__grid li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 67px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.075); border-radius: 12px; background: rgba(255,255,255,.025); opacity: .58; }
.qint-ranks__grid li > span { color: #65777a; font: 800 15px/1 Georgia,serif; }
.qint-ranks__grid strong { display: block; color: #c8d1d1; font-size: 13px; }
.qint-ranks__grid small { color: #748486; font-size: 9px; }
.qint-ranks__grid i { color: #667477; font-style: normal; font-size: 11px; }
.qint-ranks__grid li.is-unlocked { border-color: rgba(245,191,66,.2); background: rgba(245,191,66,.045); opacity: 1; }
.qint-ranks__grid li.is-unlocked > span, .qint-ranks__grid li.is-unlocked strong { color: var(--qint-gold); }
.qint-ranks__grid li.is-current { border-color: var(--qint-gold); box-shadow: 0 0 0 3px rgba(245,191,66,.08); }
.qint-rank-share { min-width: 58px; padding: 5px 8px; border: 1px solid rgba(245,191,66,.3); border-radius: 7px; background: transparent; color: #ecd17f; font-size: 9px; font-weight: 900; }

.qint-dialog { width: min(500px, calc(100% - 28px)); padding: 0; overflow: visible; border: 1px solid rgba(245,191,66,.35); border-radius: 24px; background: #0e2026; color: var(--qint-ink); box-shadow: 0 30px 100px #000; }
.qint-dialog::backdrop { background: rgba(2,8,10,.84); backdrop-filter: blur(7px); }
.qint-dialog__close { position: absolute; z-index: 2; top: 11px; left: 13px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: #fff; font-size: 25px; }
.qint-dialog-card { padding: 38px 32px 30px; text-align: center; }
.qint-dialog-card__badge { display: grid; place-items: center; width: 86px; height: 96px; margin: -72px auto 15px; clip-path: polygon(50% 0, 95% 20%, 87% 77%, 50% 100%, 13% 77%, 5% 20%); background: linear-gradient(145deg,#ffe78d,#bd7b18); color: #231706; font-size: 35px; filter: drop-shadow(0 14px 24px rgba(0,0,0,.35)); }
.qint-dialog-card small { color: var(--qint-teal); font-weight: 900; }
.qint-dialog-card h2 { margin: 6px 0; color: var(--qint-gold); font-size: 34px; }
.qint-dialog-card p { color: var(--qint-muted); line-height: 1.75; }
.qint-share-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.qint-share-actions a, .qint-share-actions button { display: grid; place-items: center; min-height: 44px; padding: 8px; border: 1px solid var(--qint-line); border-radius: 10px; background: rgba(255,255,255,.04); color: #fff; text-decoration: none; font-size: 12px; font-weight: 900; }
.qint-score-breakdown { display: grid; gap: 10px; margin: 19px 0 0; text-align: right; }
.qint-score-breakdown div { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 11px; border-radius: 10px; background: rgba(255,255,255,.035); }
.qint-score-breakdown span { color: #fff; font-weight: 800; }
.qint-score-breakdown b { color: var(--qint-gold); }
.qint-score-breakdown small { grid-column: 1 / -1; color: var(--qint-muted); }
.qint-toast { position: fixed; z-index: 99999; bottom: 22px; right: 50%; transform: translate(50%, 18px); padding: 10px 17px; border: 1px solid rgba(53,196,181,.35); border-radius: 999px; background: #10272b; color: #dffff8; font-size: 12px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.qint-toast.is-visible { opacity: 1; transform: translate(50%, 0); }

@media (max-width: 820px) {
    .qint { width: calc(100% - 12px); margin-top: 8px; border-radius: 22px; }
    .qint-hero { grid-template-columns: 82px 1fr; gap: 12px 18px; padding: 58px 5% 28px; }
    .qint-hero__seal { width: 78px; height: 78px; }
    .qint-hero__seal span { font-size: 25px; }
    .qint-hero__seal small { font-size: 10px; }
    .qint-hero__chips { grid-column: 1 / -1; }
    .qint-dashboard { grid-template-columns: 1fr 1fr; }
    .qint-meter-card { grid-column: 1 / -1; grid-row: 2; }
    .qint-intro { grid-template-columns: 1fr; }
    .qint-intro__visual { min-height: 250px; }
    .qint-ranks__grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 560px) {
    .qint { width: 100%; margin: 0 0 32px; border-inline: 0; border-radius: 0; }
    .qint-hero { display: block; padding: 65px 20px 25px; }
    .qint-hero__seal { float: left; margin: 0 0 10px 4px; }
    .qint-hero h1 { font-size: 43px; }
    .qint-hero__copy p { font-size: 15px; }
    .qint-hero__chips { display: grid; grid-template-columns: 1fr 1fr; clear: both; margin-top: 18px; }
    .qint-hero__chips span { text-align: center; }
    .qint-dashboard { display: block; padding: 12px; }
    .qint-dashboard article + article { margin-top: 8px; }
    .qint-stage { min-height: 520px; padding: 20px 12px 34px; }
    .qint-intro__visual { min-height: 215px; }
    .qint-lens { width: 112px; height: 112px; border-width: 9px; font-size: 55px; }
    .qint-lens::after { height: 80px; bottom: -62px; left: -28px; }
    .qint-intro__copy { padding: 25px 19px; }
    .qint-intro h2 { font-size: 27px; }
    .qint-game__top { grid-template-columns: 1fr auto; }
    .qint-run-stats { order: 3; grid-column: 1 / -1; }
    .qint-run-stats span { flex: 1; }
    .qint-question-card { padding: 23px 16px; border-radius: 19px; }
    .qint-question-card h2 { min-height: 0; font-size: 22px; }
    .qint-options { grid-template-columns: 1fr; }
    .qint-option { min-height: 58px; }
    .qint-ranks { padding: 38px 12px; }
    .qint-ranks__grid { grid-template-columns: 1fr; }
    .qint-dialog-card { padding-inline: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .qint *, .qint *::before, .qint *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
