/* [ui2] طبقة الواجهة الجديدة. CSS فقط. للإزالة: احذف سطر <link> في index.html (أو هذا الملف) */
html:not([data-theme=dark]) body{background:#F4F8FE linear-gradient(180deg,#FBFDFF,#EEF4FD)!important}
html:not([data-theme=dark]) .file-card{--ui-ink:#14213D;--ui-mut:#5D6C87;background:transparent!important;padding-bottom:110px;gap:18px}
/* شريط علوي: الشعار أصغر وفوقه خلفية زرقاء */
.file-card>.wq-brand{background:linear-gradient(135deg,#3B77F0,#1B4FCB);margin:-24px calc(var(--file-pad-x,16px)*-1) 0;padding:14px 16px 22px;border-radius:0 0 28px 28px;color:#fff;box-shadow:0 10px 26px rgba(27,79,203,.25)}
.file-card>.wq-brand img{max-height:96px;width:auto;border-radius:16px;background:#fff;padding:4px}
.file-card>.wq-brand p{color:#fff;opacity:.9;font-size:12px;margin:0}
.file-card .wq-social .wq-soc{box-shadow:none;width:34px;height:34px}
.wq-ver{margin:-6px 0 0!important;font-size:12px!important;font-weight:700;color:#5D6C87}
.file-title{font-size:24px!important;font-weight:800!important;text-align:center;color:#14213D}
html[data-theme=dark] .file-title{color:#fff3c4}
/* شريط سفلي ثابت */
.wq-tabs{position:fixed!important;inset:auto 10px 10px 10px;z-index:50;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0!important;padding:6px;
 background:rgba(255,255,255,.96);border:1px solid #E3E9F4;border-radius:22px;box-shadow:0 -4px 22px rgba(20,33,61,.14),0 2px 6px rgba(20,33,61,.06)}
.wq-tabs button{display:flex!important;align-items:center;justify-content:center;text-align:center;min-height:54px!important;padding:6px 2px!important;
 border-radius:16px!important;font-size:12px!important;font-weight:800!important;line-height:1.4;white-space:normal!important;overflow-wrap:anywhere;color:#5D6C87!important;background:transparent!important;border:0!important;box-shadow:none!important}
.wq-tabs button[aria-pressed=true],.wq-tabs button.is-on{background:#EAF1FF!important;color:#1B4FCB!important}
html[data-theme=dark] .wq-tabs{background:rgba(20,33,61,.96);border-color:#2b4274}
html[data-theme=dark] .wq-tabs button{color:#fff3c4!important}
/* الأزرار الكبيرة */
.file-button{border-radius:18px!important;min-height:54px;height:auto!important;font-size:17px!important;font-weight:800!important;box-shadow:0 4px 12px rgba(20,33,61,.08)!important}
.file-button.is-primary{background:linear-gradient(140deg,#27C084,#12855E)!important;color:#fff!important;border:0!important;min-height:60px;font-size:20px!important;box-shadow:0 12px 24px rgba(18,133,94,.32)!important}
.file-button.is-secondary{background:#fff!important;color:#1B4FCB!important;border:1.5px solid #D5E2F8!important}
/* الكروت */
.file-group{background:#fff;border:1px solid #E3E9F4;border-radius:22px;padding:16px!important;box-shadow:0 10px 26px rgba(20,33,61,.07)}
html[data-theme=dark] .file-group{background:transparent;border-color:#2b4274;box-shadow:none}
.file-group-heading{font-size:18px!important;font-weight:800!important}
.wq-challenge{border:0!important;border-radius:22px!important;background:#fff!important;box-shadow:0 10px 26px rgba(20,33,61,.09)}
.wq-form input{min-height:54px;border-radius:16px!important;border:1.5px solid #D5E2F8!important;font-size:18px!important;padding:0 14px}
/* الصفوف */
.wq-grades{gap:12px!important}
.wq-grade{border:1px solid #E3E9F4!important;border-radius:22px!important;box-shadow:0 8px 20px rgba(20,33,61,.08)!important;background:#fff!important;position:relative;overflow:hidden;min-height:112px;padding-top:18px!important}
.wq-grade:before{content:"";position:absolute;inset:0 0 auto 0;height:8px;background:var(--gc,#2E6BE6)}
.wq-grade[data-g="1"]{--gc:#2E6BE6}.wq-grade[data-g="2"]{--gc:#0EA5A5}.wq-grade[data-g="3"]{--gc:#F5A300}
.wq-grade[data-g="4"]{--gc:#1FA97A}.wq-grade[data-g="5"]{--gc:#7C5CF0}.wq-grade[data-g="6"]{--gc:#E5484D}
.wq-grade .wq-subj-i{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:var(--gc);color:#fff!important;font-size:26px!important}
/* المواد والمصادر والدروس */
.wq-subj:not(.wq-grade){background:#fff!important;border:1px solid #E3E9F4!important;border-radius:20px!important;box-shadow:0 8px 20px rgba(20,33,61,.07)!important;min-height:92px}
.wq-src-card,.wq-lesson{background:#fff!important;border:1px solid #E3E9F4!important;border-radius:20px!important;box-shadow:0 8px 20px rgba(20,33,61,.07)!important}
.wq-lesson{min-height:56px!important}
html[data-theme=dark] .wq-subj,html[data-theme=dark] .wq-src-card{background:#1b2f5c!important;border-color:#f2c14e!important}
/* السؤال */
.wq-q{font-size:23px!important;font-weight:800!important;line-height:1.7!important;color:#14213D}
html[data-theme=dark] .wq-q{color:#fff3c4}
.wq-opts{gap:10px!important}
.wq-opt{min-height:62px!important;border-radius:18px!important;border:1.6px solid #E3E9F4!important;background:#fff!important;box-shadow:0 4px 12px rgba(20,33,61,.07)!important;font-size:20px!important;font-weight:800!important;padding:10px 16px!important;color:#14213D}
.wq-opt.is-right{border-color:#1FA97A!important;background:#E4F7EF!important}
.wq-opt.is-wrong,.wq-opt.is-bad{border-color:#E5484D!important;background:#FDECEC!important}
html[data-theme=dark] .wq-opt{background:#1b2f5c!important;color:#fff3c4;border-color:#f2c14e!important}
.wq-speak{border-radius:16px!important;border:1.6px solid #C9DCFB!important;background:#F3F8FF!important;color:#1B4FCB!important;min-height:48px!important;box-shadow:none!important;font-size:16px!important}
.wq-lesson-tag,.wq-fromlesson{border-radius:12px}
.wq-challenge img{max-height:150px;width:100%;object-fit:cover}
.wq-challenge{flex-direction:column;gap:8px!important;margin:0 auto!important}
.wq-challenge-text{font-size:20px!important}
.wq-grade .wq-subj-n,.wq-grade b{font-size:16px!important;white-space:nowrap}
.wq-subj.is-all{background:linear-gradient(140deg,#3B77F0,#1B4FCB)!important;border:0!important}
.wq-subj.is-all *{color:#fff!important}
.wq-lessonchip{background:#F0ECFE!important;color:#5B3FD0!important;border:0!important;border-radius:14px!important;font-weight:800!important;font-size:14px!important;padding:8px 12px!important}
.wq-lessonchip *{color:inherit!important}
html:not([data-theme=dark]) .wq-q{background:#fff;border:1px solid #E3E9F4!important;border-radius:22px!important;box-shadow:0 10px 26px rgba(20,33,61,.09)!important;padding:16px!important}
.wq-timer-bar{border:0!important;background:#E6EDF9!important;height:12px!important}
.wq-lessonchip span{background:transparent!important;color:#5B3FD0!important;border:0!important;padding:0!important}
/* الشاشات الداخلية: ترويسة مضغوطة عشان السؤال والعجلة يظهروا بدون سكرول */
.file-card:not(:has(.wq-challenge))>.wq-brand{height:16px;padding:0!important;margin-bottom:-6px;overflow:hidden;border-radius:0 0 22px 22px}
.file-card:not(:has(.wq-challenge))>.wq-brand>*{display:none}
.file-card:not(:has(.wq-challenge))>.wq-ver{display:none}
.file-card:not(:has(.wq-challenge)) .file-title{font-size:18px!important}
.wq-grade *{white-space:nowrap;font-size:15px}
.wq-grade .wq-subj-i{font-size:24px!important}
.wq-wheelbox{width:min(100%,280px)!important}
.file-group{gap:8px!important}
.wq-progress{margin:0!important;font-size:13px!important}
.wq-timer{margin:2px 0!important}
.wq-lessonchip{margin:0!important}
.wq-q{margin:4px 0!important}
.wq-speak{margin:0!important}
.wq-opts{margin-top:4px}
.wq-opt{min-height:58px!important}
.file-group-head{margin:0!important}
.file-card{padding-bottom:110px!important}
/* وضع ليلي */
html[data-theme=dark] .wq-tabs button[aria-pressed=true],html[data-theme=dark] .wq-tabs button.is-on{background:#F2C14E!important;color:#14213D!important}
html[data-theme=dark] .wq-challenge{background:#13264d!important;box-shadow:none!important}
html[data-theme=dark] .wq-challenge-text{color:#fff3c4!important}
html[data-theme=dark] .wq-lessonchip{background:#1b2f5c!important;color:#F2C14E!important}
html[data-theme=dark] .wq-lessonchip span{color:#F2C14E!important}
html[data-theme=dark] .wq-speak{background:#1b2f5c!important;color:#fff3c4!important;border-color:#F2C14E!important}
html[data-theme=dark] .wq-grade,html[data-theme=dark] .wq-lesson{background:#1b2f5c!important;border-color:#2b4274!important;color:#fff3c4!important}
html[data-theme=dark] .wq-grade *{color:#fff3c4!important}
html[data-theme=dark] .wq-grade .wq-subj-i{color:#fff!important}
html[data-theme=dark] .wq-subj *{color:#fff3c4!important}
html[data-theme=dark] .file-button.is-secondary{background:#1b2f5c!important;color:#fff3c4!important;border-color:#2b4274!important}
html[data-theme=dark] .wq-q{background:#13264d!important}
html[data-theme=dark] .wq-form input{background:#13264d!important;color:#fff3c4!important;border-color:#2b4274!important}
/* [/ui2] */
