@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Cairo:wght@400;500;600;700;800&display=swap');
:root{--ink:#172033;--muted:#727b8d;--line:#e8ebf1;--paper:#fff;--soft:#f7f8fc;--blue:#5368f4;--blue-dark:#3d50dc;--mint:#dcf8ec;--shadow:0 20px 55px rgba(31,44,84,.08);--radius:22px}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans','Cairo',sans-serif;line-height:1.6;-webkit-font-smoothing:antialiased}html[lang=ar] body{font-family:'Cairo','DM Sans',sans-serif}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #aab4ff;outline-offset:3px}.site-header{height:86px;max-width:1240px;padding:0 32px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:28px;position:relative;z-index:20;background:rgba(255,255,255,.92)}.brand{display:flex;align-items:center;gap:11px;font-family:'Manrope',sans-serif;font-size:15px;font-weight:800;letter-spacing:-.5px;white-space:nowrap}.brand>span:last-child{display:flex;flex-direction:column;line-height:1.15}.brand small{font-size:9px;letter-spacing:2.2px;color:#939bad;font-weight:700;margin-top:6px}.brand-mark{width:42px;height:42px;border-radius:14px;background:var(--blue);color:white;display:grid;place-items:center;font-size:23px;font-weight:800;box-shadow:0 8px 20px #5368f43d}.brand-mark span,.admin-emblem span{color:#b8ffdf}.nav{display:flex;gap:34px;color:#70798b;font-size:13px;font-weight:600}.nav a{transition:color .2s}.nav a:hover,.nav a.active{color:var(--blue)}.header-actions{display:flex;align-items:center;gap:15px}.language{font-size:12px;font-weight:700;color:#606a7e;padding:9px 12px;border:1px solid var(--line);border-radius:10px}.admin-link{font-size:12px;font-weight:700;color:#fff;background:var(--ink);border-radius:11px;padding:12px 15px;transition:transform .2s,background .2s}.admin-link span{color:#aeb8ff;margin-inline-start:5px}.admin-link:hover{transform:translateY(-2px);background:#27334d}.menu-toggle{display:none;border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 11px;font-size:20px}.hero{max-width:1240px;min-height:570px;margin:auto;padding:80px 50px 76px;display:grid;grid-template-columns:1.03fr .97fr;align-items:center;gap:30px;position:relative;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%);border-radius:0 0 34px 34px}.hero-copy{position:relative;z-index:2;max-width:540px}.eyebrow{display:flex;align-items:center;gap:9px;color:#8a93a5;font-size:10px;letter-spacing:2.1px;font-weight:800}.status-dot{width:7px;height:7px;border-radius:50%;background:#50cda0;box-shadow:0 0 0 4px #50cda01c}.hero h1{font-family:'Manrope','Cairo',sans-serif;font-size:clamp(42px,5vw,67px);line-height:1.1;letter-spacing:-3.2px;margin:24px 0 19px;font-weight:800}.hero h1 span{color:var(--blue)}html[lang=ar] .hero h1{font-family:'Cairo',sans-serif;letter-spacing:-1px;line-height:1.3}.hero-copy>p{font-size:15px;line-height:1.9;color:#7b8496;max-width:430px;margin:0}.hero-actions{display:flex;align-items:center;gap:25px;margin-top:30px}.button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:15px;min-height:46px;padding:0 19px;border-radius:12px;font-size:12px;font-weight:700;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s}.button:hover{transform:translateY(-2px)}.button-primary{background:var(--blue);color:#fff;box-shadow:0 10px 22px #5368f42d}.button-primary:hover{background:var(--blue-dark);box-shadow:0 13px 28px #5368f43d}.button-primary span{font-size:17px}.button-dark{background:#1c2639;color:#fff}.button-dark:hover{background:#2c3953}.button-outline{border:1px solid var(--line);background:#fff;color:var(--ink)}.text-link{font-size:12px;font-weight:700;color:#5f6a7e}.text-link span{color:var(--blue);margin-inline-start:6px}.hero-proof{display:flex;align-items:center;gap:12px;margin-top:44px}.proof-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:#f0f2ff;color:var(--blue);font-size:20px}.hero-proof>div:not(.proof-separator):not(.proof-icon){display:flex;flex-direction:column}.hero-proof strong{font-size:12px}.hero-proof span{font-size:10px;color:#8c95a6}.proof-separator{width:1px;height:31px;background:#e4e7ef;margin:0 12px}.hero-art{height:410px;position:relative;display:flex;align-items:center;justify-content:center;isolation:isolate}.hero-glow{position:absolute;border-radius:50%;filter:blur(2px);pointer-events:none}.glow-one{width:360px;height:360px;right:3%;top:-80px;background:radial-gradient(circle,#e7eaff 0%,#f5f6ff 43%,transparent 72%)}.glow-two{width:250px;height:250px;left:1%;bottom:-95px;background:radial-gradient(circle,#e0fff2 0%,#f5fffb 45%,transparent 72%)}.orbit{position:absolute;border:1px solid #dfe4ff;border-radius:50%;transform:rotate(-24deg)}.orbit-a{width:390px;height:230px}.orbit-b{width:440px;height:300px;transform:rotate(40deg);border-color:#e5e8f7}.art-window{width:min(390px,86%);height:280px;background:#fff;border:1px solid #e7eaf4;border-radius:17px;box-shadow:0 30px 75px #303d6d1b;position:relative;z-index:2;overflow:hidden;transform:rotate(-3deg);animation:float-window 7s ease-in-out infinite}.window-top{height:42px;border-bottom:1px solid #f0f1f6;display:flex;align-items:center;justify-content:space-between;padding:0 15px;color:#a2a8b7;font-size:9px}.window-dots{display:flex;gap:4px}.window-dots i{width:6px;height:6px;border-radius:50%;background:#dfe3ef}.window-dots i:first-child{background:#ffb7b3}.window-dots i:nth-child(2){background:#ffdf96}.window-dots i:nth-child(3){background:#a9e9c8}.window-menu{letter-spacing:2px}.window-content{display:flex;height:238px}.window-sidebar{width:57px;border-right:1px solid #f0f1f6;display:flex;align-items:center;flex-direction:column;gap:17px;padding-top:21px}.window-sidebar b{width:20px;height:20px;border-radius:7px;background:var(--blue);margin-bottom:7px}.window-sidebar i{width:16px;height:5px;background:#e9ebf4;border-radius:5px}.window-main{flex:1;padding:23px 24px}.fake-title{width:112px;height:10px;border-radius:5px;background:#30394e}.fake-subtitle{width:155px;height:5px;border-radius:5px;background:#eceef5;margin-top:10px}.fake-card-row{display:flex;gap:10px;margin-top:22px}.fake-card{width:47%;height:81px;border:1px solid #edf0f7;border-radius:10px;padding:10px}.fake-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;font-size:15px}.fake-icon.blue{color:#5368f4;background:#eef0ff}.fake-icon.violet{color:#8b5cf6;background:#f3edff}.fake-card i{display:block;width:65%;height:4px;border-radius:4px;background:#e5e8f1;margin-top:8px}.fake-card i:last-child{width:42%;margin-top:5px}.fake-line{height:5px;width:88%;border-radius:5px;background:#eceef5;margin-top:16px}.fake-line.short{width:57%;margin-top:8px}.fake-button{width:83px;height:20px;border-radius:6px;background:var(--blue);margin-top:17px}.floating-card{position:absolute;z-index:3;background:#fff;border:1px solid #edf0f6;box-shadow:0 14px 36px #26335d15;border-radius:14px;display:flex;align-items:center;gap:10px;padding:12px 14px;animation:float-card 6s ease-in-out infinite}.floating-card strong,.floating-card small{display:block;white-space:nowrap}.floating-card strong{font-size:10px}.floating-card small{font-size:9px;color:#9098a9;margin-top:3px}.float-download{top:55px;right:-1px}.float-icon{width:33px;height:33px;border-radius:10px;background:#e8fbf2;color:#19a96d;display:grid;place-items:center;font-size:21px}.check{color:#1aaf72;margin-inline-start:4px}.float-code{bottom:43px;left:-4px;animation-delay:-3s}.code-icon{font-size:19px;font-weight:800;color:#7863ec;background:#f0edff;border-radius:10px;width:34px;height:34px;display:grid;place-items:center}.art-spark{position:absolute;color:#8d9bff;font-size:25px}.spark-one{top:75px;left:15%}.spark-two{bottom:61px;right:12%;font-size:34px;color:#6dddb1}.section-wrap{max-width:1140px;margin:auto;padding:93px 30px 100px}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:27px}.section-eyebrow{letter-spacing:1.8px;color:var(--blue);font-size:9px}.section-heading h2 {
    font-family: 'Manrope', 'Cairo', sans-serif;
    font-size: 35px;
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin: 11px 0 8px;
    font-weight: 800;
}

.heading-period {
    color: var(--blue);
}

/* لون عنوان المكتبة في الوضع الليلي فقط */
html[data-theme="dark"] .apps-section .section-heading h2 {
    color: #FFD700 !important;
    -webkit-text-fill-color: #FFD700 !important;
    text-shadow: none !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    filter: none !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .apps-section .section-heading h2 .heading-period {
    color: #FFD700 !important;
    -webkit-text-fill-color: #FFD700 !important;
}.heading-period{color:var(--blue)}.section-heading p{margin:0;color:#858d9e;font-size:13px}.count-pill,.panel-count{background:#f2f4ff;color:var(--blue);padding:8px 12px;border-radius:10px;font-size:11px;font-weight:800;white-space:nowrap}.filter-bar{display:flex;gap:10px;margin-bottom:24px}.search-box{flex:1;display:flex;align-items:center;gap:10px;padding:0 14px;height:48px;border:1px solid var(--line);border-radius:12px;color:#9aa2b3;background:#fff}.search-box>span{font-size:23px}.search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}.filter-bar select{min-width:145px;border:1px solid var(--line);border-radius:12px;padding:0 13px;background:#fff;color:#687287;font-size:12px}.filter-bar .button{min-height:48px}.app-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.app-card{min-width:0;border:1px solid #e9ecf3;border-radius:18px;padding:21px 20px 16px;background:#fff;display:flex;flex-direction:column;min-height:245px;transition:transform .25s,border-color .25s,box-shadow .25s;animation:fade-up .55s both;animation-delay:calc(var(--card-index,0)*55ms)}.app-card:hover{transform:translateY(-5px);border-color:#d6dcff;box-shadow:0 18px 40px #2f3b6810}.app-card.will-animate{opacity:0;transform:translateY(15px)}.app-card.is-visible{opacity:1;transform:translateY(0);transition:opacity .5s,transform .5s,border-color .25s,box-shadow .25s}.app-card-top{display:flex;align-items:center;gap:9px;min-height:43px}.app-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#e9edff;color:#5368f4;font-family:'Manrope',sans-serif;font-size:19px;font-weight:800}.app-icon-1{background:#e4f9ee;color:#16a56c}.app-icon-2{background:#fff0e7;color:#e67a38}.app-icon-3{background:#f3eaff;color:#8955da}.app-icon-4{background:#e4f5fc;color:#1986b8}.featured-badge{font-size:9px;font-weight:700;color:#a9781b;background:#fff7df;padding:5px 7px;border-radius:7px}.card-version{font-size:10px;color:#929bad;margin-inline-start:auto}.app-card-body{flex:1;padding-top:17px}.app-category{color:#7180e8;text-transform:uppercase;font-size:9px;font-weight:800;letter-spacing:1px}.app-card h3{font-size:17px;margin:4px 0 6px;letter-spacing:-.3px}.app-card p{color:#858d9d;font-size:11px;line-height:1.8;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.app-card-bottom{border-top:1px solid #f0f1f6;padding-top:13px;margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:8px}.platform-label{font-size:9px;color:#8b94a5;display:flex;align-items:center;gap:5px}.platform-label i{font-style:normal;color:#c3c8d2}.windows-mini{font-size:14px;color:#5368f4}.download-button{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#f0f2ff;color:var(--blue);font-size:20px;transition:background .2s,color .2s,transform .2s}.download-button:hover{background:var(--blue);color:#fff;transform:translateY(-2px)}.empty-state{border:1px dashed #dfe3ed;border-radius:20px;text-align:center;padding:55px 20px}.empty-icon{margin:auto;width:55px;height:55px;border-radius:17px;display:grid;place-items:center;background:#f0f2ff;color:var(--blue);font-size:27px}.empty-state h3{font-size:19px;margin:16px 0 6px}.empty-state p{color:var(--muted);font-size:13px;margin:0 auto 18px}.about-section{background:#f7f8fc;border-top:1px solid #f0f1f6;border-bottom:1px solid #f0f1f6}.about-inner{max-width:1080px;margin:auto;padding:72px 30px;display:grid;grid-template-columns:150px 1fr 150px;align-items:center;gap:40px}.about-symbol{width:120px;height:120px;border-radius:34px;background:linear-gradient(145deg,#5268f4,#7e8cff);box-shadow:0 18px 35px #5368f432;position:relative;display:grid;place-items:center;color:white;font-family:'Manrope',sans-serif;font-size:56px;font-weight:800;transform:rotate(-7deg)}.about-symbol>span{transform:rotate(7deg)}.symbol-ring{position:absolute;inset:-10px;border:1px solid #d8ddff;border-radius:39px;transform:rotate(17deg)}.about-copy h2{font-size:30px;margin:10px 0}.about-copy>p{color:#7c8596;font-size:13px;line-height:2;max-width:500px;margin:0}.about-signature{display:flex;align-items:center;gap:12px;margin-top:20px;color:#697387;font-size:11px;font-weight:700}.signature-line{width:28px;height:2px;background:var(--blue)}.about-stat{border-left:1px solid #e3e6ee;padding-left:25px;position:relative;display:flex;flex-direction:column}.about-stat strong{font-family:'Manrope',sans-serif;font-size:48px;letter-spacing:-3px;line-height:1.1}.about-stat>span{font-size:11px;color:#8992a2;margin-top:8px}.stat-decoration{position:absolute;right:5px;top:-5px;color:#c1c8ff;font-size:25px}.site-footer{max-width:1240px;margin:auto;padding:27px 32px;display:flex;align-items:center;justify-content:space-between;gap:20px}.footer-brand .brand-mark{width:35px;height:35px;border-radius:11px;font-size:19px}.footer-brand{font-size:12px}.footer-brand small{font-size:7px}.site-footer>p{font-size:10px;color:#959dad;margin:0}.footer-admin{font-size:10px;color:#727c8f;font-weight:700}.admin-page{background:#f8f9fc;min-height:100vh}.admin-header{background:transparent}.admin-main{max-width:1180px;margin:0 auto;padding:34px 28px 75px}.login-card{width:min(100%,450px);margin:35px auto 65px;background:#fff;border:1px solid var(--line);border-radius:24px;padding:36px;box-shadow:var(--shadow)}.admin-emblem{width:56px;height:56px;border-radius:18px;background:var(--blue);color:#fff;display:grid;place-items:center;font-family:'Manrope',sans-serif;font-weight:800;font-size:28px;margin-bottom:25px}.login-card h1{font-size:25px;letter-spacing:-.8px;margin:10px 0 7px}.muted{font-size:12px;color:#838c9d;line-height:1.8}.admin-form{display:flex;flex-direction:column;gap:15px;margin-top:22px}.admin-form label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:700;color:#4e586b}.admin-form input:not([type=checkbox]):not([type=file]),.admin-form textarea,.admin-form select{width:100%;border:1px solid #e5e8f0;border-radius:10px;padding:12px 13px;background:#fff;color:var(--ink);font-size:12px;outline:none;transition:border-color .2s,box-shadow .2s}.admin-form input:focus,.admin-form textarea:focus{border-color:#aeb8ff;box-shadow:0 0 0 3px #5368f410}.admin-form textarea{resize:vertical;min-height:75px}.full-button{width:100%;min-height:48px}.back-link{display:block;text-align:center;margin-top:22px;font-size:11px;color:#788296}.form-note{font-size:10px;color:#8d96a6;line-height:1.7;margin:0}.alert{padding:12px 15px;border-radius:11px;font-size:12px;margin:17px 0}.alert-error{background:#fff0f0;color:#b53c48;border:1px solid #ffdbdf}.alert-success{background:#eafaf2;color:#168354;border:1px solid #c9f0dc}.admin-title-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.admin-title-row h1{font-size:34px;margin:9px 0 4px}.admin-title-row p{margin:0}.admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:19px 20px;display:flex;flex-direction:column;gap:9px}.stat-card>span{font-size:11px;color:#858e9e}.stat-card>strong{font-size:28px;letter-spacing:-1px}.online-status{font-size:14px!important;color:#179a68;display:flex;align-items:center;gap:8px}.online-status i{width:7px;height:7px;border-radius:50%;background:#25bf83}.admin-columns{display:grid;grid-template-columns:1.08fr .92fr;gap:18px;align-items:start}.admin-panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:24px;min-width:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:18px;border-bottom:1px solid #eff1f6}.panel-heading h2{font-size:16px;margin:0 0 5px}.panel-heading p{font-size:10px;color:#8b94a4;margin:0}.panel-icon{width:35px;height:35px;border-radius:11px;background:#eff1ff;color:var(--blue);display:grid;place-items:center;font-size:22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.file-drop{border:1px dashed #cbd2e2;border-radius:13px;padding:20px 15px;align-items:center;text-align:center;background:#fafbff;cursor:pointer;transition:border-color .2s,background .2s}.file-drop:hover{border-color:var(--blue);background:#f6f7ff}.upload-symbol{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;background:#edf0ff;color:var(--blue);font-size:21px}.file-drop strong{font-size:12px;color:#4f5a70}.file-drop small{font-size:10px;color:#969eae;font-weight:400}.file-drop input[type=file]{max-width:100%;font-size:10px;color:#777f91;margin-top:8px}.check-label{display:flex!important;flex-direction:row!important;align-items:center;gap:9px!important}.check-label input{accent-color:var(--blue)}.admin-empty{padding:55px 10px;text-align:center;color:#8b94a4;font-size:12px}.admin-empty span{font-size:33px;color:#aab4ff}.manage-list{display:flex;flex-direction:column}.manage-item{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #f0f1f6}.manage-item:last-child{border-bottom:0}.manage-icon{width:39px;height:39px;flex:0 0 39px;border-radius:12px;background:#eff1ff;color:var(--blue);display:grid;place-items:center;font-weight:800}.manage-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.manage-info strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.manage-info span,.manage-info a{font-size:10px;color:#8a93a4}.manage-info a{color:var(--blue);font-weight:700}.delete-button{width:31px;height:31px;border:1px solid #ffe0e1;border-radius:9px;background:#fff6f6;color:#d84c59;font-size:20px;cursor:pointer}.delete-button:hover{background:#ffe5e6}.security-note{margin-top:19px;padding:15px 17px;display:flex;gap:12px;align-items:flex-start;background:#eef4ff;border:1px solid #e0e9ff;border-radius:13px;color:#50658c}.security-note>span{font-size:17px}.security-note p{margin:0;font-size:10px;line-height:1.9}.security-note code{background:#fff;padding:2px 4px;border-radius:4px}.admin-footer{border-top:1px solid #eceef4}.admin-footer .brand{opacity:.8}
html[dir=rtl] .hero-art .float-download{right:auto;left:-1px}html[dir=rtl] .hero-art .float-code{left:auto;right:-4px}html[dir=rtl] .about-stat{border-left:0;border-right:1px solid #e3e6ee;padding-left:0;padding-right:25px}html[dir=rtl] .stat-decoration{right:auto;left:5px}html[dir=rtl] .window-sidebar{border-right:0;border-left:1px solid #f0f1f6}html[dir=rtl] .proof-separator{margin:0 12px}
@keyframes float-window{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-9px) rotate(-2deg)}}@keyframes float-card{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}@keyframes fade-up{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1000px){.site-header{padding:0 24px}.hero{padding:65px 32px;grid-template-columns:1fr 1fr;gap:15px}.hero h1{font-size:52px}.hero-art{transform:scale(.9)}.app-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.about-inner{grid-template-columns:120px 1fr 120px;gap:25px}.admin-columns{grid-template-columns:1fr}.admin-panel{padding:22px}}
@media(max-width:720px){.site-header{height:73px;padding:0 18px;gap:10px}.brand{font-size:12px;gap:8px}.brand-mark{width:36px;height:36px;border-radius:12px;font-size:20px}.brand small{font-size:7px;letter-spacing:1.6px}.header-actions{gap:8px}.language{padding:8px;font-size:10px}.admin-link{font-size:0;padding:10px 12px}.admin-link span{font-size:16px;margin:0}.menu-toggle{display:block}.nav{display:none;position:absolute;top:65px;right:16px;left:16px;flex-direction:column;gap:0;padding:8px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.nav.nav-open{display:flex}.nav a{padding:12px;border-radius:8px}.nav a:hover{background:#f7f8fc}.hero{padding:57px 23px 35px;display:flex;flex-direction:column;align-items:stretch;gap:0;min-height:0;border-radius:0 0 25px 25px}.hero-copy{max-width:none}.hero h1{font-size:clamp(42px,11vw,57px);letter-spacing:-2.2px;margin-top:20px}.hero-copy>p{font-size:13px}.hero-actions{gap:18px;margin-top:24px}.hero-proof{margin-top:28px}.hero-art{height:330px;margin-top:20px;transform:none;overflow:hidden}.art-window{width:min(350px,82%);height:250px}.window-content{height:208px}.window-main{padding:19px 15px}.float-download{right:0;top:30px}.float-code{left:0;bottom:27px}.floating-card{padding:9px 10px;gap:7px}.floating-card strong{font-size:9px}.floating-card small{font-size:8px}.section-wrap{padding:66px 19px 70px}.section-heading{align-items:flex-start}.section-heading h2{font-size:29px}.section-heading p{font-size:11px}.count-pill{font-size:9px;padding:7px 9px}.filter-bar{display:grid;grid-template-columns:1fr auto}.search-box{grid-column:1/-1}.filter-bar select{min-height:45px;min-width:0}.filter-bar .button{min-height:45px}.app-grid{grid-template-columns:1fr;gap:12px}.app-card{min-height:220px;padding:18px}.app-card p{-webkit-line-clamp:2}.about-inner{padding:50px 23px;grid-template-columns:75px 1fr;gap:20px;align-items:start}.about-symbol{width:68px;height:68px;border-radius:22px;font-size:36px}.symbol-ring{inset:-6px;border-radius:25px}.about-copy h2{font-size:24px}.about-copy>p{font-size:11px}.about-stat{grid-column:2;border:0!important;padding:0!important;margin-top:0;flex-direction:row;align-items:center;gap:10px}.about-stat strong{font-size:31px}.about-stat>span{margin:0}.stat-decoration{display:none}.site-footer{padding:22px 18px;flex-wrap:wrap}.site-footer>p{order:3;width:100%;text-align:center}.admin-main{padding:22px 15px 45px}.login-card{padding:26px 22px;margin:20px auto 35px}.admin-title-row{align-items:flex-start;flex-direction:column}.admin-title-row h1{font-size:29px}.admin-stats{gap:8px}.stat-card{padding:13px 11px}.stat-card>span{font-size:9px}.stat-card>strong{font-size:22px}.admin-panel{padding:18px 15px}.form-grid{grid-template-columns:1fr}.security-note{padding:12px}.admin-header{height:70px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Application logos */
.app-icon {
    overflow: hidden;
    flex: 0 0 42px;
}

.app-icon-has-logo {
    background: #fff !important;
    border: 1px solid #e9ecf3;
    padding: 3px;
}

.app-icon-has-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9px;
}

/* Logo preview in admin panel */
.logo-preview-wrap {
    display: none;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e8ebf1;
    border-radius: 12px;
    background: #fafbff;
}

.logo-preview-wrap.visible {
    display: flex;
}

.logo-preview {
    width: 64px;
    height: 64px;
    object-fit: contain;
    padding: 5px;
    background: #fff;
    border: 1px solid #e8ebf1;
    border-radius: 12px;
}

.logo-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-preview-info strong {
    font-size: 12px;
}

.logo-preview-info small {
    color: #8b94a4;
    font-size: 10px;
}

/* ==========================================
   SAVETSKISOYUZ — LIGHT / DARK THEME
   ========================================== */

:root {
  color-scheme: light;
  --theme-bg: #ffffff;
  --theme-surface: #ffffff;
  --theme-soft: #f7f8fc;
  --theme-text: #172033;
  --theme-muted: #727b8d;
  --theme-border: #e8ebf1;
  --theme-input: #ffffff;
  --theme-hover: #f0f2ff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf1ff;
  --muted: #a0abc0;
  --line: #30394d;
  --paper: #111522;
  --soft: #191f30;
  --blue: #8491ff;
  --blue-dark: #6978ff;
  --shadow: 0 20px 55px rgba(0, 0, 0, .25);

  --theme-bg: #111522;
  --theme-surface: #191f30;
  --theme-soft: #151b2a;
  --theme-text: #fffded;
  --theme-muted: #a0abc0;
  --theme-border: #30394d;
  --theme-input: #151b2a;
  --theme-hover: #242c43;
}

html,
body {
  background: var(--theme-bg);
  color: var(--theme-text);
  transition: background-color .2s ease, color .2s ease;
}

.site-header {
  background: var(--theme-bg);
}

:root[data-theme="dark"] .site-header {
  background: rgba(17, 21, 34, .96);
}

.nav,
.text-link,
.language,
.footer-admin {
  color: var(--theme-muted);
}


.news-image-fields {
    display: grid;
    gap: 16px;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--border, #dce2eb);
    border-radius: 14px;
    background: var(--surface, #f8faff);
}

.news-image-fields h3 {
    margin: 0;
    font-size: 1.05rem;
}

.news-image-fields label {
    display: grid;
    gap: 8px;
}

.news-image-fields input[type="file"] {
    width: 100%;
    max-width: 100%;
}

.news-image-fields small {
    color: var(--muted, #697386);
    font-size: 0.85rem;
}

.news-current-image img {
    display: block;
    margin: 8px 0 12px;
}

.language,
.menu-toggle {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

.nav.nav-open {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

.nav a:hover {
  background: var(--theme-hover);
}

.hero {
  background: linear-gradient(
    180deg,
    var(--theme-bg) 0%,
    var(--theme-soft) 100%
  );
}

.hero-copy > p,
.section-heading p,
.app-card p,
.about-copy > p,
.muted {
  color: var(--theme-muted);
}

.hero h1,
.section-heading h2,
.about-copy h2,
.admin-title-row h1,
.app-card h3 {
  color: var(--theme-text);
}

.art-window,
.floating-card,
.app-card,
.login-card,
.admin-panel,
.stat-card {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

.window-top,
.window-sidebar,
.app-card-bottom,
.panel-heading,
.manage-item {
  border-color: var(--theme-border);
}

.fake-title {
  background: var(--theme-text);
}

.fake-subtitle,
.fake-line,
.fake-card i {
  background: var(--theme-border);
}

.fake-card {
  border-color: var(--theme-border);
  background: var(--theme-soft);
}

.search-box,
.filter-bar select,
.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea,
.admin-form select {
  background: var(--theme-input);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

.search-box input {
  color: var(--theme-text);
}

.search-box input::placeholder,
.admin-form input::placeholder,
.admin-form textarea::placeholder {
  color: var(--theme-muted);
}

.button-outline {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}

.about-section,
.admin-page {
  background: var(--theme-soft);
  border-color: var(--theme-border);
}

.site-footer {
  border-color: var(--theme-border);
}

.site-footer > p {
  color: var(--theme-muted);
}

.count-pill,
.panel-count {
  background: var(--theme-hover);
  color: var(--blue);
}

.empty-state {
  border-color: var(--theme-border);
}

.empty-state h3 {
  color: var(--theme-text);
}

.empty-state p {
  color: var(--theme-muted);
}

.admin-form label {
  color: var(--theme-text);
}

.file-drop {
  background: var(--theme-soft);
  border-color: var(--theme-border);
}

.file-drop strong {
  color: var(--theme-text);
}

.file-drop small,
.form-note,
.manage-info span {
  color: var(--theme-muted);
}

.manage-info strong {
  color: var(--theme-text);
}

.delete-button {
  background: var(--theme-soft);
}

.security-note {
  background: var(--theme-hover);
  border-color: var(--theme-border);
  color: var(--theme-muted);
}

.security-note code {
  background: var(--theme-surface);
  color: var(--theme-text);
}

.logo-preview-wrap {
  background: var(--theme-soft);
  border-color: var(--theme-border);
}

.admin-footer {
  background: transparent;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 21px;
  cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s;
}

.theme-toggle:hover {
  background: var(--theme-hover);
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 3px solid #8491ff;
  outline-offset: 3px;
}

:root[data-theme="dark"] .app-icon-has-logo,
:root[data-theme="dark"] .logo-preview,
:root[data-theme="dark"] .manage-icon img {
  background: #ffffff !important;
}

@media (max-width: 720px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
    font-size: 19px;
  }

  .header-actions {
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    transition: none;
  }
}
/* Admin header: logo and theme button on the same line */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-header-brand .brand {
    flex-shrink: 0;
}

.admin-header .theme-toggle {
    position: static;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .admin-header {
        padding-inline: 18px;
        gap: 8px;
    }

    .admin-header-brand {
        gap: 8px;
    }

    .admin-header .text-link {
        font-size: 10px;
        white-space: nowrap;
    }
}
/* App details page */
.detail-main {
    padding-top: 35px;
    padding-bottom: 70px;
}

.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 13px;
}

.detail-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.detail-breadcrumb a:hover {
    color: var(--ink);
}

.detail-hero,
.detail-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
}

.detail-hero {
    padding: clamp(22px, 4vw, 42px);
}

.detail-identity {
    display: flex;
    align-items: center;
    gap: 22px;
}

.detail-app-icon {
    display: grid;
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
    font-size: 42px;
    font-weight: 800;
}

.detail-app-icon img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.detail-heading h1 {
    margin: 8px 0;
    overflow-wrap: anywhere;
}

.detail-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.detail-description,
.detail-long-description {
    color: var(--muted);
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.detail-description {
    margin: 25px 0;
    max-width: 760px;
}

.detail-hero-actions,
.app-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-hero-actions {
    margin-bottom: 30px;
}

.detail-unavailable {
    color: #b45309;
    font-size: 13px;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.detail-stat {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.detail-stat span {
    color: var(--muted);
    font-size: 12px;
}

.detail-stat strong {
    overflow-wrap: anywhere;
    font-size: 16px;
}

.detail-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.detail-panel {
    padding: 26px;
    min-width: 0;
}

.detail-panel h2 {
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.detail-info-list {
    margin: 18px 0 0;
}

.detail-info-list > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.detail-info-list > div:last-child {
    border-bottom: 0;
}

.detail-info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-info-list dd {
    margin: 0;
    text-align: end;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.detail-filename,
.checksum-row dd {
    max-width: 65%;
}

.checksum-row {
    flex-direction: column;
}

.checksum-row dd {
    max-width: 100%;
    text-align: start;
}

.checksum-row code {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 11px;
}

.detail-related {
    margin-top: 48px;
}

.detail-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.detail-related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease;
}

.detail-related-card:hover {
    transform: translateY(-3px);
}

.detail-related-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--line);
    font-weight: 700;
}

.detail-related-icon img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

.detail-related-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.detail-related-info strong,
.detail-related-info span,
.detail-related-info small {
    overflow-wrap: anywhere;
}

.detail-related-info span,
.detail-related-info small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.detail-related-arrow {
    flex-shrink: 0;
}

.detail-empty {
    color: var(--muted);
}

.app-card-actions {
    flex-shrink: 0;
    gap: 8px;
}

.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s ease;
}

.details-button:hover {
    background: var(--line);
}

@media (max-width: 760px) {
    .detail-columns {
        grid-template-columns: 1fr;
    }

    .detail-related-grid {
        grid-template-columns: 1fr;
    }

    .detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .detail-identity {
        align-items: flex-start;
        gap: 14px;
    }

    .detail-app-icon {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        border-radius: 17px;
        font-size: 30px;
    }

    .detail-heading h1 {
        font-size: 23px;
    }

    .detail-panel {
        padding: 19px;
    }

    .app-card-bottom {
        flex-wrap: wrap;
        gap: 12px;
    }

    .app-card-actions {
        width: 100%;
        justify-content: space-between;
    }
}
/* App version history */
.detail-versions {
    margin-top: 38px;
}

.detail-version-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.detail-version-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.detail-version-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.detail-version-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #edf3ff;
    color: #245cc5;
    font-size: 22px;
}

.detail-version-info {
    min-width: 0;
}

.detail-version-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.detail-version-title strong {
    font-size: 17px;
}

.detail-version-badge {
    padding: 4px 9px;
    border-radius: 20px;
    background: #e8f7ed;
    color: #176534;
    font-size: 12px;
}

.detail-version-badge.older {
    background: #f0f2f6;
    color: #626b7b;
}

.detail-version-meta,
.detail-version-date {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.detail-version-notes {
    margin-top: 12px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.detail-version-notes p {
    margin: 6px 0 0;
    line-height: 1.8;
}

.detail-version-download {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 650px) {
    .detail-version-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-version-download {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

/* Public app screenshot gallery */
.detail-screenshots {
    margin-top: 38px;
}

.detail-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.detail-screenshot-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--paper);
    transition: transform .2s ease, box-shadow .2s ease;
}

.detail-screenshot-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 35, 65, .10);
}

.detail-screenshot-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--line);
}

.detail-screenshot-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.detail-screenshot-caption span {
    flex-shrink: 0;
    color: var(--muted);
}

@media (max-width: 850px) {
    .detail-screenshot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .detail-screenshot-grid {
        grid-template-columns: 1fr;
    }
}
/* Screenshot lightbox */
.screenshot-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    box-sizing: border-box;
    padding: 65px 75px 20px;
    background: rgba(10, 15, 25, 0.94);
    align-items: center;
    justify-content: center;
}

.screenshot-lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
}

.lightbox-image-viewport {
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #697386 #252b38;
    text-align: center;
}

#lightboxImage {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
    transform: none !important;
    transition: none;
    user-select: none;
    -webkit-user-drag: none;
    cursor: default;
}

#lightboxImage.zoomed {
    max-width: none;
    max-height: none;
    margin: 0;
}

#lightboxCaption {
    flex-shrink: 0;
    max-width: 100%;
    margin: 0;
    color: #fff;
    text-align: center;
    overflow-wrap: anywhere;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 26px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

[dir="rtl"] .lightbox-close {
    right: auto;
    left: 26px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 46px;
    height: 56px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-controls {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
}

.lightbox-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.lightbox-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#lightboxZoom {
    min-width: 55px;
    text-align: center;
    font-size: 14px;
}

.screenshot-lightbox .lightbox-counter {
    display: block;
    flex-shrink: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    direction: ltr;
}

@media (max-width: 600px) {
    .screenshot-lightbox {
        padding: 60px 45px 15px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-nav {
        width: 35px;
        height: 44px;
        font-size: 20px;
    }
}
/* Temporary notifications */
.alert,
.notice,
.success,
.error,
.message,
.flash-message {
    transition: opacity .4s ease, transform .4s ease;
}

.notification-hiding {
    opacity: 0 !important;
    transform: translateY(-8px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .alert,
    .notice,
    .success,
    .error,
    .message,
    .flash-message {
        transition: none;
    }
}
/* Compact app search in admin */
#app-search {
    display: block;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    background: var(--theme-input);
    color: var(--theme-text);
    font-size: 12px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#app-search:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(83, 104, 244, .10);
}

#app-search-count {
    margin: 7px 2px 0;
}

.app-list-scroll {
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-border) transparent;
}

.app-list-scroll .manage-item[hidden] {
    display: none !important;
}

.app-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.app-list-scroll::-webkit-scrollbar-thumb {
    background: var(--theme-border);
    border-radius: 10px;
}

.app-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.all-apps-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}

.all-apps-link:hover {
    background: var(--surface, #f5f7fb);
    border-color: var(--accent, #64748b);
}
/* Published apps browser */
.published-apps-browser {
    display: grid;
    grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.6fr);
    gap: 22px;
    align-items: stretch;
    min-width: 0;
}

.published-apps-sidebar {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface, #fff);
}

.published-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.published-search > span {
    font-size: 22px;
    opacity: .65;
}

.published-search input {
    width: 100%;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    outline: none;
    background: transparent;
    color: inherit;
    font: inherit;
}

#app-search-count {
    margin: 10px 2px;
}

.app-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 4px;
}

.published-app-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    text-align: start;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.published-app-item:hover {
    background: var(--surface-hover, rgba(127, 127, 127, .08));
}

.published-app-item.is-selected {
    border-color: var(--line);
    background: var(--surface-hover, rgba(127, 127, 127, .10));
}

.published-app-icon,
.published-app-icon img {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.published-app-icon {
    overflow: hidden;
    background: var(--surface-hover, #eef2f7);
    font-weight: 800;
}

.published-app-summary {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.published-app-summary strong,
.published-app-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.published-app-summary strong {
    font-size: 13px;
}

.published-app-summary small {
    color: var(--muted, #7b8493);
    font-size: 11px;
}

.published-app-star {
    color: #d6a331;
}

.published-app-details {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface, #fff);
}

.published-detail-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.published-detail-heading .manage-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
}

.published-detail-heading h3 {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.published-detail-heading p {
    margin: 0;
    color: var(--muted, #7b8493);
    font-size: 13px;
}

.published-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.published-detail-stats > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 0;
}

.published-detail-stats span {
    color: var(--muted, #7b8493);
    font-size: 12px;
}

.published-detail-stats strong {
    overflow-wrap: anywhere;
    font-size: 16px;
}

.published-detail-links,
.published-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.published-detail-links {
    margin-bottom: 20px;
}

.published-detail-actions {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.published-detail-actions form {
    margin: 0;
}

.published-detail-actions .button,
.published-detail-actions .delete-button {
    min-height: 38px;
}

.published-app-detail[hidden],
.published-app-item[hidden],
#app-search-empty[hidden],
#published-no-selection[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .published-apps-browser {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-list-scroll {
        max-height: 260px;
    }

    .published-app-details {
        padding: 16px;
    }

    .published-detail-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Software assistant — correct dark theme */
:root[data-theme="dark"] .software-assistant textarea#assistant-problem {
    background: #151b2a !important;
    background-color: #151b2a !important;
    color: #fffded !important;
    -webkit-text-fill-color: #fffded !important;
    border-color: #30394d !important;
    caret-color: #fffded !important;
    color-scheme: dark;
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem::placeholder {
    color: #a0abc0 !important;
    -webkit-text-fill-color: #a0abc0 !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem:focus {
    background: #151b2a !important;
    border-color: #8491ff !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(132, 145, 255, 0.15);
}

/* Keep the field readable in light mode */
:root[data-theme="light"] .software-assistant textarea#assistant-problem {
    background: #ffffff;
    color: #172033;
    -webkit-text-fill-color: #172033;
}

:root[data-theme="light"] .software-assistant textarea#assistant-problem::placeholder {
    color: #727b8d;
    -webkit-text-fill-color: #727b8d;
    opacity: 1;
}

/* Fix all white surfaces inside the assistant in dark mode */
:root[data-theme="dark"] .software-assistant,
:root[data-theme="dark"] .software-assistant .assistant-heading,
:root[data-theme="dark"] .software-assistant .assistant-form,
:root[data-theme="dark"] .software-assistant .assistant-form-bottom {
    background-color: #191f30 !important;
    color: #fffded !important;
    border-color: #30394d !important;
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem {
    display: block;
    width: 100%;
    background-color: #151b2a !important;
    color: #fffded !important;
    -webkit-text-fill-color: #fffded !important;
    border: 1px solid #30394d !important;
    box-shadow: none;
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem::placeholder {
    color: #a0abc0 !important;
    -webkit-text-fill-color: #a0abc0 !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .software-assistant .assistant-form label,
:root[data-theme="dark"] .software-assistant .assistant-heading h2,
:root[data-theme="dark"] .software-assistant .assistant-form-bottom span {
    color: #e8edf5 !important;
}

:root[data-theme="dark"] .software-assistant .assistant-result {
    background-color: #202736 !important;
    border-color: #354054 !important;
    color: #e8edf5 !important;
}
#software-assistant {
    scroll-margin-top: 100px;
}

/* Floating notifications in manage_app.php */
.manage-app-floating-notice {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    width: min(360px, calc(100vw - 32px));
    padding: 14px 18px;
    border: 1px solid #cdebd8;
    border-radius: 12px;
    background: #f0fff5;
    color: #17683a;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.16);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    direction: rtl;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.manage-app-floating-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.manage-app-floating-notice.error {
    background: #fff1f1;
    color: #a32020;
    border-color: #f0caca;
}

/* Dark mode */
html[data-theme="dark"] .manage-app-floating-notice,
body.dark-mode .manage-app-floating-notice {
    background: #173326;
    color: #a7f3c0;
    border-color: #285b3d;
}

html[data-theme="dark"] .manage-app-floating-notice.error,
body.dark-mode .manage-app-floating-notice.error {
    background: #3a2020;
    color: #ffb4b4;
    border-color: #713535;
}

/* Responsive positioning */
@media (max-width: 600px) {
    .manage-app-floating-notice {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}

/* Notifications for admin.php AJAX */
.admin-ajax-notice,
.admin-floating-notice {
    box-sizing: border-box;
    padding: 13px 17px;
    border: 1px solid #b7e4c7;
    border-radius: 12px;
    background: #eaf8ef;
    color: #176534;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
    z-index: 99999;
}

.admin-ajax-notice {
    margin: 14px 0;
}

.admin-floating-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    width: max-content;
    max-width: min(420px, calc(100vw - 40px));
    box-shadow: 0 10px 35px rgba(0, 0, 0, .16);
    pointer-events: none;
}

.admin-ajax-notice.is-visible,
.admin-floating-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.admin-ajax-notice.error,
.admin-floating-notice.error {
    background: #fff0f0;
    color: #a32121;
    border-color: #f0b8b8;
}

.admin-ajax-notice.success,
.admin-floating-notice.success {
    background: #eaf8ef;
    color: #176534;
    border-color: #b7e4c7;
}

.admin-page .admin-ajax-notice,
.admin-page .admin-floating-notice {
    text-align: start;
}

@media (max-width: 600px) {
    .admin-floating-notice {
        top: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
    }
}

/* Floating notifications for backup.php */
    
/* Floating notifications for backup.php */
.backup-floating-notice {
    box-sizing: border-box;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    width: max-content;
    max-width: min(420px, calc(100vw - 40px));
    padding: 13px 17px;
    border: 1px solid #b7e4c7;
    border-radius: 12px;
    background: #eaf8ef;
    color: #176534;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .16);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
    direction: rtl;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.backup-floating-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.backup-floating-notice.error {
    background: #fff0f0;
    color: #a32121;
    border-color: #f0b8b8;
}

html[data-theme="dark"] .backup-floating-notice,
body.dark-mode .backup-floating-notice {
    background: #173326;
    color: #a7f3c0;
    border-color: #285b3d;
}

html[data-theme="dark"] .backup-floating-notice.error,
body.dark-mode .backup-floating-notice.error {
    background: #3a2020;
    color: #ffb4b4;
    border-color: #713535;
}

@media (max-width: 600px) {
    .backup-floating-notice {
        top: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
    }
}


/* ==========================================
   SAVETSKISOYUZ — SUBTLE VISUAL POLISH
   تحسينات جمالية خفيفة
   ========================================== */

/* بطاقات البرامج */
.app-card {
    border-color: var(--theme-border, #e8ebf1);
    box-shadow: 0 3px 12px rgba(31, 44, 84, 0.025);
}

.app-card:hover {
    transform: translateY(-3px);
    border-color: #cfd6ff;
    box-shadow: 0 12px 28px rgba(31, 44, 84, 0.08);
}

/* أزرار الموقع */
.button {
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background-color .18s ease,
        border-color .18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

/* حقول البحث والنماذج */
.search-box,
.filter-bar select,
.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea,
.admin-form select {
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.search-box:focus-within {
    border-color: #aeb8ff;
    box-shadow: 0 0 0 3px rgba(83, 104, 244, 0.08);
}

/* لوحات الإدارة والإحصائيات */
.admin-panel,
.stat-card,
.login-card {
    box-shadow: 0 4px 18px rgba(31, 44, 84, 0.025);
}

/* صور البرامج */
.app-icon-has-logo img {
    transition: transform .2s ease;
}

.app-card:hover .app-icon-has-logo img {
    transform: scale(1.04);
}

/* الوضع الداكن: ظلال وحدود هادئة */
:root[data-theme="dark"] .app-card:hover {
    border-color: #48557d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .admin-panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .login-card {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

/* تقليل الحركة عند تفضيل المستخدم ذلك */
@media (prefers-reduced-motion: reduce) {
    .app-card,
    .button,
    .app-icon-has-logo img {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — PREMIUM POLISH
   ========================================== */

/* 1. تحسين بطاقات البرامج */
.app-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: var(--theme-border);
    box-shadow: 0 4px 16px rgba(31, 44, 84, 0.035);
    transition:
        transform .24s ease,
        border-color .24s ease,
        box-shadow .24s ease,
        background-color .24s ease;
}

.app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 0 0 5px 5px;
    background: linear-gradient(
        90deg,
        transparent,
        #5368f4,
        #8d9aff,
        transparent
    );
    opacity: 0;
    transition: opacity .24s ease;
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: #cdd4ff;
    box-shadow: 0 14px 32px rgba(44, 62, 120, 0.09);
}

.app-card:hover::before {
    opacity: 1;
}

/* 2. تحسين الأزرار */
.button,
.details-button,
.detail-related-card {
    -webkit-tap-highlight-color: transparent;
}

.button {
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.button-primary:hover {
    filter: brightness(1.035);
    box-shadow: 0 6px 16px rgba(83, 104, 244, 0.18);
}

.button:active,
.details-button:active {
    transform: scale(.985);
}

/* 3. تحسين حقول الإدخال */
.search-box:focus-within {
    border-color: #8795ff;
    box-shadow: 0 0 0 4px rgba(83, 104, 244, .09);
}

.search-box,
.filter-bar select,
.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea,
.admin-form select {
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.admin-form input:focus-visible,
.admin-form textarea:focus-visible,
.admin-form select:focus-visible,
.filter-bar select:focus-visible {
    outline: 2px solid rgba(83, 104, 244, .55);
    outline-offset: 2px;
}

/* 4. تحسين بطاقات تفاصيل البرنامج */
.detail-hero,
.detail-panel,
.detail-stat,
.detail-version-card,
.detail-screenshot-card {
    transition:
        border-color .22s ease,
        box-shadow .22s ease,
        background-color .22s ease;
}

.detail-hero,
.detail-panel {
    box-shadow: 0 5px 22px rgba(31, 44, 84, .025);
}

.detail-stat {
    background: var(--theme-soft);
}

.detail-stat:hover {
    border-color: #cdd4ff;
    box-shadow: 0 5px 16px rgba(31, 44, 84, .045);
}

/* 5. تحسين معرض الصور */
.detail-screenshot-card {
    box-shadow: 0 3px 12px rgba(31, 44, 84, .025);
}

.detail-screenshot-card img {
    transition: transform .35s ease;
}

.detail-screenshot-card:hover img {
    transform: scale(1.025);
}

/* منع تكبير الصورة خارج حدود البطاقة */
.detail-screenshot-card {
    overflow: hidden;
}

/* 6. تحسين السجل والإصدارات */
.detail-version-card {
    box-shadow: 0 3px 12px rgba(31, 44, 84, .025);
}

.detail-version-card:hover {
    border-color: #d2d8ff;
    box-shadow: 0 8px 22px rgba(31, 44, 84, .055);
}

.detail-version-icon {
    transition: transform .2s ease;
}

.detail-version-card:hover .detail-version-icon {
    transform: translateY(-2px);
}

/* 7. تحسين التفاعل مع الروابط */
.detail-breadcrumb a,
.detail-related-card,
.details-button {
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.detail-related-card:hover {
    border-color: #cdd4ff;
    box-shadow: 0 8px 22px rgba(31, 44, 84, .055);
}

/* 8. الوضع الداكن */
:root[data-theme="dark"] .app-card:hover,
:root[data-theme="dark"] .detail-stat:hover,
:root[data-theme="dark"] .detail-version-card:hover,
:root[data-theme="dark"] .detail-screenshot-card:hover,
:root[data-theme="dark"] .detail-related-card:hover {
    border-color: #465582;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .20);
}

:root[data-theme="dark"] .app-card::before {
    background: linear-gradient(
        90deg,
        transparent,
        #7184ff,
        #a6b1ff,
        transparent
    );
}

:root[data-theme="dark"] .detail-stat {
    background: var(--theme-soft);
}

/* 9. تحديد النص بشكل متناسق */
::selection {
    background: rgba(83, 104, 244, .20);
    color: inherit;
}

/* 10. احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .app-card,
    .app-card::before,
    .button,
    .detail-hero,
    .detail-panel,
    .detail-stat,
    .detail-version-card,
    .detail-version-icon,
    .detail-screenshot-card,
    .detail-screenshot-card img,
    .detail-related-card,
    .details-button {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — HERO EXPERIENCE
   ========================================== */

.hero {
    isolation: isolate;
    background:
        radial-gradient(
            ellipse at 85% 20%,
            rgba(83, 104, 244, .09),
            transparent 36%
        ),
        radial-gradient(
            ellipse at 12% 90%,
            rgba(105, 210, 190, .07),
            transparent 34%
        ),
        linear-gradient(180deg, #ffffff 0%, #f9faff 100%);
    border: 1px solid rgba(83, 104, 244, .06);
}

/* زخرفة دائرية خفيفة */
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 290px;
    height: 290px;
    top: -150px;
    right: -95px;
    border: 1px solid rgba(83, 104, 244, .10);
    border-radius: 50%;
    box-shadow:
        0 0 0 28px rgba(83, 104, 244, .025),
        0 0 0 58px rgba(83, 104, 244, .018);
    pointer-events: none;
}

/* شارة القسم */
.hero .eyebrow {
    display: inline-flex;
    padding: 9px 13px;
    border: 1px solid rgba(83, 104, 244, .12);
    border-radius: 30px;
    background: rgba(83, 104, 244, .045);
    letter-spacing: 1.5px;
}

/* العنوان الرئيسي */
.hero h1 {
    line-height: 1.12;
    text-wrap: balance;
}

.hero h1 span {
    color: #5368f4;
    background: linear-gradient(
        115deg,
        #5368f4 10%,
        #7c70ed 55%,
        #399cc8 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* النص التعريفي */
.hero-copy > p {
    line-height: 2;
    max-width: 450px;
}

/* الأزرار */
.hero-actions {
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions .button-primary {
    box-shadow: 0 7px 20px rgba(83, 104, 244, .16);
}

.hero-actions .button-primary:hover {
    box-shadow: 0 10px 26px rgba(83, 104, 244, .24);
}

/* النافذة البصرية الموجودة */
.hero-art {
    position: relative;
}

.art-window {
    border-radius: 22px;
    border-color: rgba(83, 104, 244, .13);
    box-shadow:
        0 24px 65px rgba(35, 48, 90, .09),
        0 4px 14px rgba(35, 48, 90, .035);
}

/* البطاقات العائمة */
.floating-card {
    border: 1px solid rgba(83, 104, 244, .12);
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(35, 48, 90, .10);
    backdrop-filter: blur(12px);
}

/* الوضع الداكن */
:root[data-theme="dark"] .hero {
    background:
        radial-gradient(
            ellipse at 85% 20%,
            rgba(104, 123, 255, .13),
            transparent 38%
        ),
        radial-gradient(
            ellipse at 10% 90%,
            rgba(65, 180, 155, .06),
            transparent 34%
        ),
        linear-gradient(180deg, #171c2b 0%, #131827 100%);
    border-color: #293149;
}

:root[data-theme="dark"] .hero::after {
    border-color: rgba(135, 149, 255, .13);
    box-shadow:
        0 0 0 28px rgba(135, 149, 255, .025),
        0 0 0 58px rgba(135, 149, 255, .015);
}

:root[data-theme="dark"] .hero .eyebrow {
    color: #b5bfd5;
    background: rgba(135, 149, 255, .07);
    border-color: #343e5a;
}

:root[data-theme="dark"] .hero h1 {
    color: #edf1ff;
}

:root[data-theme="dark"] .hero h1 span {
    background: linear-gradient(
        115deg,
        #9ba8ff,
        #c0a5ff,
        #7ed5ed
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .hero-copy > p {
    color: #a6b0c5;
}

:root[data-theme="dark"] .art-window {
    box-shadow: 0 24px 65px rgba(0, 0, 0, .23);
}

:root[data-theme="dark"] .floating-card {
    border-color: #343e56;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

/* دعم الشاشات الصغيرة */
@media (max-width: 720px) {
    .hero {
        border-left: 0;
        border-right: 0;
    }

    .hero::after {
        width: 190px;
        height: 190px;
        top: -95px;
        right: -85px;
    }

    .hero h1 {
        line-height: 1.2;
        letter-spacing: -1.5px;
    }

    html[dir="rtl"] .hero h1 {
        letter-spacing: 0;
        line-height: 1.4;
    }

    .hero-actions {
        gap: 12px;
    }

    .hero-art {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero *,
    .hero::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — NAVIGATION POLISH
   ========================================== */

/* ترويسة الموقع */
.site-header {
    border-bottom: 1px solid var(--theme-border);
    box-shadow: 0 4px 18px rgba(31, 44, 84, 0.025);
    transition:
        background-color .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

/* روابط شريط التنقل */
.nav a {
    position: relative;
    border-radius: 10px;
    transition:
        color .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.nav a:hover {
    transform: translateY(-1px);
    color: var(--blue, #5368f4);
}

/* تأثير خط صغير أسفل الرابط */
.nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue, #5368f4);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.nav a:hover::after {
    transform: scaleX(1);
}

/* أزرار اللغة والقائمة */
.language,
.menu-toggle {
    border-radius: 11px;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.language:hover,
.menu-toggle:hover {
    border-color: #cbd2ff;
    box-shadow: 0 4px 12px rgba(83, 104, 244, .08);
    transform: translateY(-1px);
}

/* الوضع الداكن */
:root[data-theme="dark"] .site-header {
    border-bottom-color: #30394d;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}

:root[data-theme="dark"] .nav a:hover {
    color: #aeb8ff;
}

:root[data-theme="dark"] .nav a::after {
    background: #8491ff;
}

/* تقليل الحركة عند طلب ذلك من النظام */
@media (prefers-reduced-motion: reduce) {
    .site-header,
    .nav a,
    .nav a::after,
    .language,
    .menu-toggle {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — APP CARD REFINEMENT
   ========================================== */

/* خلفية البطاقة وحدودها */
.app-card {
    background: var(--theme-surface, #ffffff);
    border-color: var(--theme-border, #e8ebf1);
    border-radius: 20px;
}

/* عنوان البرنامج */
.app-card h3 {
    color: var(--theme-text, #172033);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* وصف البرنامج */
.app-card p {
    color: var(--theme-muted, #727b8d);
    line-height: 1.9;
}

/* معلومات الإصدار */
.card-version {
    color: var(--theme-muted, #727b8d);
    font-weight: 600;
}

/* فصل معلومات البرنامج عن الجزء السفلي */
.app-card-bottom {
    border-top-color: var(--theme-border, #e8ebf1);
    padding-top: 15px;
}

/* زر التنزيل */
.download-button {
    background: var(--theme-hover, #f0f2ff);
    color: var(--blue, #5368f4);
    border: 1px solid transparent;
    border-radius: 11px;
}

.download-button:hover {
    background: var(--blue, #5368f4);
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(83, 104, 244, .18);
}

/* شارة البرنامج المميز */
.featured-badge {
    border: 1px solid rgba(169, 120, 27, .12);
}

/* الوضع الداكن */
:root[data-theme="dark"] .app-card {
    background: var(--theme-surface, #191f30);
    border-color: var(--theme-border, #30394d);
}

:root[data-theme="dark"] .app-card h3 {
    color: var(--theme-text, #fffded);
}

:root[data-theme="dark"] .app-card p,
:root[data-theme="dark"] .card-version,
:root[data-theme="dark"] .platform-label {
    color: var(--theme-muted, #a0abc0);
}

:root[data-theme="dark"] .app-card-bottom {
    border-top-color: var(--theme-border, #30394d);
}

:root[data-theme="dark"] .download-button {
    background: var(--theme-hover, #242c43);
    color: #aeb8ff;
}

:root[data-theme="dark"] .download-button:hover {
    background: #5368f4;
    color: #ffffff;
}

/* احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .app-card,
    .download-button {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — ABOUT & FOOTER DESIGN
   ========================================== */

/* قسم عن الموقع */
.about-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(83, 104, 244, .07),
            transparent 32%
        ),
        var(--theme-soft, #f7f8fc);
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    transition: background-color .25s ease, border-color .25s ease;
}

.about-inner {
    position: relative;
    padding-top: 82px;
    padding-bottom: 82px;
}

/* رمز الموقع */
.about-symbol {
    border-radius: 30px;
    box-shadow:
        0 16px 32px rgba(83, 104, 244, .20),
        inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: transform .3s ease, box-shadow .3s ease;
}

.about-symbol:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 22px 40px rgba(83, 104, 244, .25);
}

.symbol-ring {
    border-color: rgba(83, 104, 244, .22);
}

/* عنوان ووصف القسم */
.about-copy h2 {
    color: var(--theme-text, #172033);
    line-height: 1.4;
    letter-spacing: -.7px;
}

.about-copy > p {
    color: var(--theme-muted, #727b8d);
    line-height: 2.1;
}

.about-signature {
    color: var(--theme-muted, #727b8d);
    gap: 10px;
}

.signature-line {
    width: 34px;
    border-radius: 99px;
}

/* إحصائية الموقع */
.about-stat {
    border-inline-start: 1px solid var(--theme-border);
    border-left: 0;
    padding-inline-start: 25px;
    padding-left: 0;
}

.about-stat strong {
    color: var(--theme-text, #172033);
    letter-spacing: -2px;
}

.about-stat > span {
    color: var(--theme-muted, #727b8d);
    line-height: 1.8;
}

.stat-decoration {
    color: #8c9aff;
    opacity: .65;
}

/* التذييل */
.site-footer {
    padding-top: 30px;
    padding-bottom: 30px;
    gap: 24px;
}

.footer-brand {
    transition: opacity .2s ease;
}

.footer-brand:hover {
    opacity: .82;
}

.site-footer a {
    transition: color .2s ease, opacity .2s ease;
}

.site-footer a:hover {
    color: var(--blue, #5368f4);
}

/* الوضع الداكن */
:root[data-theme="dark"] .about-section {
    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(83, 104, 244, .12),
            transparent 35%
        ),
        var(--theme-soft, #151b2a);
    border-color: var(--theme-border);
}

:root[data-theme="dark"] .about-copy h2,
:root[data-theme="dark"] .about-stat strong {
    color: var(--theme-text, #fffded);
}

:root[data-theme="dark"] .about-copy > p,
:root[data-theme="dark"] .about-stat > span,
:root[data-theme="dark"] .about-signature {
    color: var(--theme-muted, #a0abc0);
}

:root[data-theme="dark"] .about-stat {
    border-inline-start-color: var(--theme-border);
}

/* حركة أقل حسب إعدادات النظام */
@media (prefers-reduced-motion: reduce) {
    .about-symbol,
    .footer-brand,
    .site-footer a {
        transition: none !important;
    }

    .about-symbol:hover {
        transform: none;
    }
}


/* ==========================================
   SAVETSKISOYUZ — SEARCH & ASSISTANT
   ========================================== */

/* قسم المساعد الذكي */
.software-assistant {
    border: 1px solid var(--theme-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(31, 44, 84, .045);
}

/* عنوان المساعد */
.software-assistant .assistant-heading {
    padding: 26px 28px;
    border-bottom: 1px solid var(--theme-border);
}

.software-assistant .assistant-heading h2 {
    line-height: 1.5;
    letter-spacing: -.4px;
}

/* نموذج السؤال */
.software-assistant .assistant-form {
    padding: 24px 28px;
}

.software-assistant textarea#assistant-problem {
    box-sizing: border-box;
    width: 100%;
    min-height: 125px;
    padding: 16px 18px;
    border: 1px solid var(--theme-border);
    border-radius: 15px;
    background: var(--theme-input);
    color: var(--theme-text);
    font: inherit;
    line-height: 1.9;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
}

.software-assistant textarea#assistant-problem:focus {
    outline: none;
    border-color: #8491ff;
    box-shadow: 0 0 0 4px rgba(83, 104, 244, .10);
}

.software-assistant .assistant-form-bottom {
    padding-top: 16px;
}

/* نتائج المساعد */
.software-assistant .assistant-result {
    border: 1px solid var(--theme-border);
    border-radius: 15px;
    padding: 18px;
    margin-top: 14px;
    background: var(--theme-surface);
    color: var(--theme-text);
    transition: border-color .2s, box-shadow .2s;
}

.software-assistant .assistant-result:hover {
    border-color: #cdd4ff;
    box-shadow: 0 6px 18px rgba(31, 44, 84, .055);
}

/* تحسين مربع البحث */
.search-box {
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.search-box:focus-within {
    border-color: #8491ff;
    box-shadow: 0 0 0 4px rgba(83, 104, 244, .09);
}

/* الوضع الداكن */
:root[data-theme="dark"] .software-assistant {
    border-color: var(--theme-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

:root[data-theme="dark"] .software-assistant .assistant-heading,
:root[data-theme="dark"] .software-assistant .assistant-form,
:root[data-theme="dark"] .software-assistant .assistant-form-bottom {
    background-color: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem {
    background: var(--theme-input) !important;
    color: var(--theme-text) !important;
    -webkit-text-fill-color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

:root[data-theme="dark"] .software-assistant textarea#assistant-problem::placeholder {
    color: var(--theme-muted) !important;
    -webkit-text-fill-color: var(--theme-muted) !important;
}

:root[data-theme="dark"] .software-assistant .assistant-result {
    background: var(--theme-soft);
    color: var(--theme-text);
    border-color: var(--theme-border);
}

/* الهواتف */
@media (max-width: 600px) {
    .software-assistant {
        border-radius: 18px;
    }

    .software-assistant .assistant-heading {
        padding: 21px 18px;
    }

    .software-assistant .assistant-form {
        padding: 18px;
    }

    .software-assistant textarea#assistant-problem {
        min-height: 110px;
        padding: 13px;
    }
}

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .software-assistant *,
    .search-box {
        transition: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — APP DETAILS REFINEMENT
   ========================================== */

/* البطاقة الرئيسية */
.detail-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(31, 44, 84, .045);
}

/* اللوحات الداخلية */
.detail-panel {
    border: 1px solid var(--theme-border);
    border-radius: 20px;
    background: var(--theme-surface);
    box-shadow: 0 5px 20px rgba(31, 44, 84, .025);
}

/* إحصائيات البرنامج */
.detail-stat {
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    padding: 18px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.detail-stat:hover {
    transform: translateY(-2px);
    border-color: #cdd4ff;
    box-shadow: 0 7px 20px rgba(31, 44, 84, .05);
}

/* بطاقات الإصدارات */
.detail-version-card {
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    background: var(--theme-surface);
    padding: 18px;
    transition: border-color .2s, box-shadow .2s;
}

.detail-version-card:hover {
    border-color: #cdd4ff;
    box-shadow: 0 7px 20px rgba(31, 44, 84, .045);
}

/* أيقونة الإصدار */
.detail-version-icon {
    border-radius: 12px;
    transition: transform .2s;
}

/* بطاقات لقطات الشاشة */
.detail-screenshot-card {
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    background: var(--theme-surface);
    transition: border-color .2s, box-shadow .2s;
}

.detail-screenshot-card:hover {
    border-color: #cdd4ff;
    box-shadow: 0 8px 22px rgba(31, 44, 84, .07);
}

.detail-screenshot-card img {
    display: block;
    max-width: 100%;
    transition: transform .3s ease;
}

.detail-screenshot-card:hover img {
    transform: scale(1.02);
}

/* البرامج ذات الصلة */
.detail-related-card {
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    background: var(--theme-surface);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.detail-related-card:hover {
    transform: translateY(-2px);
    border-color: #cdd4ff;
    box-shadow: 0 7px 20px rgba(31, 44, 84, .05);
}

/* أزرار صفحة التفاصيل */
.details-button {
    border-radius: 12px;
    transition: transform .18s, box-shadow .18s, filter .18s;
}

.details-button:hover {
    filter: brightness(1.035);
}

.details-button:active {
    transform: scale(.985);
}

/* الوضع الداكن */
:root[data-theme="dark"] .detail-hero,
:root[data-theme="dark"] .detail-panel,
:root[data-theme="dark"] .detail-version-card,
:root[data-theme="dark"] .detail-screenshot-card,
:root[data-theme="dark"] .detail-related-card {
    background-color: var(--theme-surface);
    border-color: var(--theme-border);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .10);
}

:root[data-theme="dark"] .detail-stat {
    background: var(--theme-soft);
    border-color: var(--theme-border);
}

:root[data-theme="dark"] .detail-stat:hover,
:root[data-theme="dark"] .detail-version-card:hover,
:root[data-theme="dark"] .detail-screenshot-card:hover,
:root[data-theme="dark"] .detail-related-card:hover {
    border-color: #465582;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

/* الهواتف */
@media (max-width: 600px) {
    .detail-hero {
        border-radius: 18px;
    }

    .detail-panel {
        border-radius: 16px;
    }

    .detail-stat,
    .detail-version-card {
        padding: 14px;
    }
}

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .detail-stat,
    .detail-version-card,
    .detail-version-icon,
    .detail-screenshot-card,
    .detail-screenshot-card img,
    .detail-related-card,
    .details-button {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================
   SAVETSKISOYUZ — ADMIN DASHBOARD DESIGN
   ========================================== */

/* المساحة الرئيسية */
.admin-main {
    padding-top: 34px;
    padding-bottom: 48px;
}

/* عنوان لوحة الإدارة */
.admin-title-row {
    margin-bottom: 28px;
}

.admin-title-row h1 {
    line-height: 1.4;
    letter-spacing: -.5px;
}

.admin-title-row p {
    color: var(--theme-muted);
    line-height: 1.9;
}

/* بطاقات الإحصائيات */
.admin-stats {
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 18px;
    background: var(--theme-surface);
    padding: 22px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #cdd4ff;
    box-shadow: 0 8px 22px rgba(31, 44, 84, .06);
}

.stat-card strong {
    color: var(--theme-text);
    font-variant-numeric: tabular-nums;
}

.stat-card span {
    color: var(--theme-muted);
    line-height: 1.8;
}

/* تنظيم الأعمدة */
.admin-columns {
    gap: 22px;
    align-items: start;
}

/* لوحات الإدارة */
.admin-panel {
    min-width: 0;
    border: 1px solid var(--theme-border);
    border-radius: 20px;
    background: var(--theme-surface);
    box-shadow: 0 5px 20px rgba(31, 44, 84, .025);
    overflow: hidden;
}

/* رأس كل لوحة */
.panel-heading {
    padding: 21px 24px;
    border-bottom: 1px solid var(--theme-border);
}

.panel-heading h2,
.panel-heading h3 {
    color: var(--theme-text);
    line-height: 1.5;
}

/* نماذج الإدارة */
.admin-form {
    padding: 24px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--theme-text);
    font-weight: 600;
}

.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea,
.admin-form select {
    box-sizing: border-box;
    max-width: 100%;
    border-radius: 11px;
    border-color: var(--theme-border);
    background-color: var(--theme-input);
    color: var(--theme-text);
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: #8491ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 104, 244, .10);
}

.admin-form textarea {
    line-height: 1.9;
}

/* قائمة البرامج المنشورة */
.manage-list {
    gap: 12px;
    padding: 18px;
}

.manage-item {
    min-width: 0;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: var(--theme-surface);
    transition: border-color .2s, box-shadow .2s;
}

.manage-item:hover {
    border-color: #cdd4ff;
    box-shadow: 0 5px 16px rgba(31, 44, 84, .04);
}

/* ملاحظة الأمان */
.security-note {
    border-radius: 14px;
    line-height: 1.9;
}

/* الوضع الداكن */
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .admin-panel,
:root[data-theme="dark"] .manage-item {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .10);
}

:root[data-theme="dark"] .stat-card:hover,
:root[data-theme="dark"] .manage-item:hover {
    border-color: #465582;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

:root[data-theme="dark"] .panel-heading {
    border-bottom-color: var(--theme-border);
}

:root[data-theme="dark"] .panel-heading h2,
:root[data-theme="dark"] .panel-heading h3,
:root[data-theme="dark"] .admin-form label {
    color: var(--theme-text);
}

:root[data-theme="dark"] .admin-form input:not([type="checkbox"]):not([type="file"]),
:root[data-theme="dark"] .admin-form textarea,
:root[data-theme="dark"] .admin-form select {
    background-color: var(--theme-input);
    color: var(--theme-text);
    border-color: var(--theme-border);
}

/* الشاشات الصغيرة */
@media (max-width: 720px) {
    .admin-main {
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .admin-stats {
        gap: 12px;
    }

    .admin-columns {
        gap: 16px;
    }

    .admin-panel {
        border-radius: 16px;
    }

    .panel-heading {
        padding: 18px;
    }

    .admin-form {
        padding: 18px;
    }

    .manage-list {
        padding: 12px;
    }
}

/* احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .admin-panel,
    .manage-item {
        transition: none !important;
        transform: none !important;
    }
}

/* SHA-256 checksum */
.app-detail-page .checksum-row dd {
    min-width: 0;
    width: 100%;
}

.app-detail-page .checksum-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-soft);
}

.app-detail-page .checksum-box code {
    display: block;
    flex: 1 1 260px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
    color: var(--theme-text);
    font-size: 12px;
    line-height: 1.8;
    user-select: all;
}

.app-detail-page .checksum-copy {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.app-detail-page .checksum-copy:hover {
    background: var(--theme-hover);
    border-color: var(--theme-muted);
}

.app-detail-page .checksum-help {
    display: block;
    margin-top: 8px;
    color: var(--theme-muted);
    font-size: 12px;
    line-height: 1.7;
}

.app-detail-page .checksum-status {
    display: block;
    margin-top: 5px;
    color: var(--theme-muted);
    font-size: 12px;
}

.app-detail-page .checksum-status:empty {
    display: none;
}

@media (max-width: 520px) {
    .app-detail-page .checksum-box {
        align-items: stretch;
        flex-direction: column;
    }

    .app-detail-page .checksum-copy {
        width: 100%;
    }
}

/* ========================================
   WHAT'S NEW — Modern announcement cards
   ======================================== */

.news-section {
    margin-top: 10px !important;
    margin-bottom: 25px !important;
    padding-bottom: 0 !important;
}

.news-section + .apps-section {
    margin-top: 0 !important;
    padding-top: 25px !important;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
    gap: 20px;
    margin-top: 25px;
}

.news-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    padding: 25px;
    border: 1px solid #e5eaf3;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 8px 28px rgba(30, 50, 85, .045);
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.news-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4779e8, #8b72ed, #6ab9f5);
    opacity: .85;
}

.news-card::after {
    content: "✦";
    position: absolute;
    z-index: -1;
    inset-inline-end: 18px;
    bottom: 8px;
    color: rgba(71, 121, 232, .055);
    font-size: 90px;
    line-height: 1;
    pointer-events: none;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: #cbd9f5;
    box-shadow: 0 16px 38px rgba(40, 72, 130, .10);
}

.news-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.news-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid #dce7ff;
    border-radius: 9px;
    background: #edf3ff;
    color: #315fc7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1px;
}

.news-type::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.news-type-update {
    border-color: #d2efdc;
    background: #eaf8ef;
    color: #247442;
}

.news-type-maintenance {
    border-color: #f5e2bf;
    background: #fff5e5;
    color: #945b10;
}

.news-type-announcement {
    border-color: #e5d9ff;
    background: #f3edff;
    color: #7045b5;
}

.news-type-new_app {
    border-color: #cceef4;
    background: #e8f9fc;
    color: #18758b;
}

.news-card time {
    color: #8994a7;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.news-card h3 {
    margin: 0 0 12px;
    color: #202d43;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.65;
    letter-spacing: -.25px;
    overflow-wrap: anywhere;
}

.news-card > p {
    position: relative;
    margin: 0;
    color: #69768b;
    font-size: 14px;
    line-height: 2;
    overflow-wrap: anywhere;
}

/* Dark mode */
html[data-theme="dark"] .news-card,
body.dark .news-card,
.dark .news-card {
    border-color: #30394a;
    background: linear-gradient(145deg, #1c2331, #171c27);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .news-card:hover,
body.dark .news-card:hover,
.dark .news-card:hover {
    border-color: #465b80;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .news-card h3,
body.dark .news-card h3,
.dark .news-card h3 {
    color: #f1f5fb;
}

html[data-theme="dark"] .news-card > p,
body.dark .news-card > p,
.dark .news-card > p {
    color: #b8c3d5;
}

html[data-theme="dark"] .news-card time,
body.dark .news-card time,
.dark .news-card time {
    color: #9aa8bd;
}

html[data-theme="dark"] .news-type-update,
body.dark .news-type-update,
.dark .news-type-update {
    background: #183528;
    border-color: #28543c;
    color: #8ee0a9;
}

html[data-theme="dark"] .news-type-maintenance,
body.dark .news-type-maintenance,
.dark .news-type-maintenance {
    background: #3a2c1b;
    border-color: #60451f;
    color: #f5c477;
}

html[data-theme="dark"] .news-type-announcement,
body.dark .news-type-announcement,
.dark .news-type-announcement {
    background: #302448;
    border-color: #4b376b;
    color: #c9afff;
}

html[data-theme="dark"] .news-type-new_app,
body.dark .news-type-new_app,
.dark .news-type-new_app {
    background: #17343d;
    border-color: #285461;
    color: #8bd9e8;
}

html[data-theme="dark"] .news-type,
body.dark .news-type,
.dark .news-type {
    background-color: #202c40;
    border-color: #354965;
    color: #a9c6ff;
}

/* Mobile */
@media (max-width: 600px) {
    .news-section {
        margin-top: 6px !important;
        margin-bottom: 20px !important;
    }

    .news-section + .apps-section {
        padding-top: 18px !important;
    }

    .news-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 19px;
    }

    .news-card {
        padding: 21px;
        border-radius: 18px;
    }

    .news-card-top {
        margin-bottom: 17px;
    }

    .news-card h3 {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card:hover {
        transition: none;
        transform: none;
    }
}


/* الصور في سطر أفقي */
.news-card .news-visual {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    overflow-x: auto;
    background: transparent;
}

.news-card .news-visual-main,
.news-card .news-visual-thumbnails img {
    display: block;
    flex: 0 0 76px;
    width: 76px;
    height: 64px;
    object-fit: contain;
    border-radius: 9px;
    background: rgba(127, 145, 175, .08);
}

.news-card .news-visual-thumbnails {
    display: contents;
}

.news-card .news-visual-thumbnails img {
    flex: 0 0 64px;
    width: 64px;
    height: 54px;
}

.news-card .news-visual img {
    border: 1px solid rgba(127, 145, 175, .18);
}

@media (max-width: 520px) {
    .news-card .news-visual-main {
        flex-basis: 66px;
        width: 66px;
        height: 56px;
    }

    .news-card .news-visual-thumbnails img {
        flex-basis: 56px;
        width: 56px;
        height: 48px;
    }
}

/* News image lightbox */
.news-visual img {
    cursor: zoom-in;
}

.news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 12, 22, .88);
    backdrop-filter: blur(7px);
}

.news-lightbox.is-open {
    display: flex;
}

.news-lightbox-image {
    display: block;
    max-width: min(1100px, 94vw);
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
    cursor: default;
}

.news-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.news-lightbox-close:hover {
    background: rgba(255,255,255,.24);
}

html[dir="rtl"] .news-lightbox-close {
    right: auto;
    left: 22px;
}

@media (max-width: 600px) {
    .news-lightbox {
        padding: 12px;
    }

    .news-lightbox-image {
        max-width: 96vw;
        max-height: 80vh;
    }
}
