:root{--primary:#4338ca;--primary-dark:#3730a3;--secondary:#7e22ce;--accent:#be185d;--success:#059669;--dark:#1e1b4b;--darker:#17143c;--light:#fafbff;--gray-100:#f3f4f9;--gray-200:#e5e7eb;--gray-300:#d1d5db;--gray-500:#6b7280;--gray-600:#4b5563;--gray-700:#374151;--gray-800:#1f2937;--radius:12px;--shadow:0 4px 12px rgba(0,0,0,0.05);--shadow-hover:0 10px 25px rgba(0,0,0,0.08);--transition:all .3s cubic-bezier(.4,0,.2,1)}
.dark{--dark:#0b0b12;--darker:#060610;--light:#0f101a;--gray-100:#141420;--gray-200:#252736;--gray-300:#4b5563;--gray-500:#9ca3af;--gray-600:#d1d5db;--gray-700:#cbd5e1;--gray-800:#f1f5f9;--shadow:0 4px 12px rgba(0,0,0,0.2);--shadow-hover:0 10px 25px rgba(0,0,0,0.4)}
*{margin:0;padding:0;box-sizing:border-box}
html,body{max-width:100%}
html{height:100%;scroll-behavior:smooth;scroll-padding-top:100px}
body{font-family:'Tajawal',sans-serif;background:linear-gradient(135deg,#f3f4f9 0%,#f3f4f9 100%);color:var(--gray-800);transition:var(--transition);top:0!important;position:static!important;min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden}
.dark body{background:linear-gradient(135deg,#020617 0%,#020617 50%,#020617 100%);color:var(--gray-200);overflow-x:hidden}
@media(max-width:992px){.logo-img{height:45px}}
@media(max-width:768px){.logo-img{height:40px}}
.nav-link,.mobile-menu-btn,.btn-icon,.search-box i{text-shadow:0 1px 2px rgba(0,0,0,0.1)}
.dark .nav-link,.dark .mobile-menu-btn,.dark .btn-icon,.dark .search-box i{text-shadow:0 1px 3px rgba(0,0,0,0.3)}
.nav-link{color:var(--gray-700);text-decoration:none;font-weight:500;font-size:.95rem;transition:var(--transition)}
.dark .nav-link:hover,.dark .nav-link.active{color:#fff}
.search-box input{padding:.6rem 1rem .6rem 2.5rem;width:220px;border-radius:12px;border:1px solid var(--gray-200);background:#fff;color:var(--dark);font-size:.9rem;transition:var(--transition)}
.search-box input::placeholder{color:var(--gray-500);opacity:1}
.dark .search-box input{background:rgba(255,255,255,0.05);border-color:rgba(255,255,255,0.1);color:#fff}
.dark .search-box input::placeholder{color:rgba(255,255,255,0.5)}
.search-box i{position:absolute;left:.8rem;color:var(--gray-500)}
.btn-icon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#fff;color:var(--gray-700);cursor:pointer;border:none;box-shadow:0 2px 6px rgba(0,0,0,0.04);transition:var(--transition)}
.dark .btn-icon{background:rgba(255,255,255,0.05);color:#fff;box-shadow:none}
.dark .btn-icon:hover{background:rgba(255,255,255,0.15);color:#fff}
.dark .mobile-menu-btn{color:#fff}
.mobile-nav{position:fixed;top:72px;left:0;width:100%;background:rgba(255,255,255,0.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:1rem 0;display:none;flex-direction:column;gap:.75rem;z-index:99;box-shadow:0 4px 12px rgba(0,0,0,0.05);border-top:1px solid rgba(0,0,0,0.05);opacity:0;transform:translateY(-10px);transition:opacity .2s ease,transform .25s ease}
.mobile-nav a{padding:.75rem 1.5rem;color:var(--dark);text-decoration:none;transition:var(--transition)}
.dark .mobile-nav a{color:rgba(255,255,255,0.8)}
.dark .mobile-nav a:hover,.dark .mobile-nav a.active{color:#fff;background:rgba(139,92,246,0.15)}
.mobile-search-box input{width:100%;padding:.75rem 2rem .75rem 2.5rem;border-radius:12px;border:1px solid rgba(0,0,0,0.1);background:rgba(255,255,255,0.95);color:var(--dark);font-size:.95rem}
.dark .mobile-search-box input{background:rgba(255,255,255,0.1);border-color:rgba(255,255,255,0.1);color:#fff}
.dark .mobile-search-box input::placeholder{color:rgba(255,255,255,0.5)}
.mobile-search-box i{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--gray-500)}
@media(max-width:768px){.nav-links,.search-box{display:none}.mobile-menu-btn{display:block}}
footer{background:var(--light);border-top:1px solid var(--gray-200);padding:3rem 0 1.5rem;margin-top:4rem}
@media(max-width:992px){.footer-grid{grid-template-columns:1fr 1fr;gap:2rem}}
@media(max-width:576px){.footer-grid{grid-template-columns:1fr;gap:1.5rem}}
.footer-desc{font-size:.9rem;color:var(--gray-600);line-height:1.7;margin-bottom:1.25rem;max-width:300px}
.footer-heading{font-size:1rem;font-weight:700;color:var(--dark);margin-bottom:1.25rem;position:relative;padding-bottom:.6rem}
.dark .footer-heading{color:#fff}
.footer-links li{margin-bottom:.6rem}
.footer-links a{color:var(--gray-600);text-decoration:none;font-size:.9rem;transition:var(--transition);display:inline-flex;align-items:center;gap:.4rem}
.dark .footer-links a:hover{color:#fff}
.footer-bottom{text-align:center;color:var(--gray-500);font-size:.9rem}
.tool-page{position:relative;flex:1;padding-top:2rem;padding-bottom:4rem;display:flex;flex-direction:column;align-items:center}
.tool-wrap{position:relative;z-index:1;width:100%;max-width:780px;margin:0 auto;padding:0 1.5rem}
.t-header{text-align:center;margin-bottom:2.25rem;position:relative}
.tool-hero-glow{position:absolute;top:-60px;left:50%;transform:translateX(-50%);width:600px;max-width:90vw;height:250px;background:radial-gradient(ellipse at 50% 0%,rgba(67,56,202,0.08) 0%,transparent 70%);pointer-events:none;z-index:-1}
.dark .tool-hero-glow{background:radial-gradient(ellipse at 50% 0%,rgba(139,92,246,0.12) 0%,transparent 70%)}
.t-header-icon{width:64px;height:64px;border-radius:18px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,rgba(67,56,202,0.12),rgba(126,34,206,0.12));margin-bottom:1rem;font-size:1.6rem;color:var(--primary);box-shadow:0 8px 24px rgba(67,56,202,0.12);transition:var(--transition)}
.t-header-icon:hover{transform:scale(1.05) rotate(5deg)}
.dark .t-header-icon{background:linear-gradient(135deg,rgba(139,92,246,0.2),rgba(236,72,153,0.12));box-shadow:0 8px 24px rgba(139,92,246,0.15);color:#a5b4fc}
.t-header h1{font-size:2rem;font-weight:800;color:var(--dark);margin-bottom:.5rem;letter-spacing:-.02em}
.dark .t-header h1{color:#fff}
.t-header p{font-size:1.05rem;color:var(--gray-600);max-width:520px;margin:0 auto;line-height:1.7}
.dark .t-header p{color:rgba(255,255,255,0.6)}
.input-glow{position:relative;border-radius:22px;padding:2px;margin-bottom:1rem;background:var(--gray-200);transition:background .3s ease}
.input-glow.warn{background:rgba(239,68,68,.3)}
.dark .input-glow.warn{background:rgba(239,68,68,.25)}
.input-glow:focus-within{background:var(--primary)}
.dark .input-glow{background:rgba(255,255,255,0.1)}
.dark .input-glow:focus-within{background:rgba(139,92,246,0.6)}
.input-card{background:#fff;border-radius:20px;overflow:hidden}
.dark .input-card{background:rgba(15,16,26,0.95)}
.input-card textarea{width:100%;border:none;background:transparent;padding:1.25rem 1.5rem;font-size:1.1rem;font-weight:500;font-family:'Tajawal',sans-serif;color:var(--dark);resize:vertical;min-height:130px;line-height:1.9;outline:none}
.dark .input-card textarea{color:#fff;font-weight:500}
.input-card textarea::placeholder{color:var(--gray-500)}
.dark .input-card textarea::placeholder{color:rgba(255,255,255,0.5)}
.input-bar{display:flex;align-items:center;justify-content:space-between;padding:.65rem 1.25rem;border-top:1px solid var(--gray-100);gap:.75rem}
.dark .input-bar{border-top-color:rgba(255,255,255,0.05)}
.btn-gen{display:inline-flex;align-items:center;gap:.45rem;padding:.6rem 1.4rem;border-radius:12px;border:none;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;font-size:.92rem;font-weight:700;font-family:'Tajawal',sans-serif;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 14px rgba(67,56,202,0.25);white-space:nowrap}
.char-ct{font-size:.78rem;color:var(--gray-400);white-space:nowrap;transition:var(--transition)}
.dark .char-ct{color:rgba(255,255,255,0.22)}
.char-ct.warn{color:#ef4444;font-weight:700}
.dark .char-ct.warn{color:#f87171}
.char-err{display:none;align-items:center;gap:.35rem;font-size:.75rem;color:#b91c1c;padding:.35rem .75rem;margin:0 .75rem .35rem;border-radius:8px;background:rgba(239,68,68,.06);border:1px solid rgba(239,68,68,.1)}
.dark .char-err{color:#fca5a5;background:rgba(239,68,68,.08);border-color:rgba(239,68,68,.15)}
.char-err i{font-size:.72rem;color:#ef4444;flex-shrink:0}
.dark .char-err i{color:#f87171}
.char-err.show{display:flex;animation:slideUp .3s cubic-bezier(.4,0,.2,1)}
.usage-bar{display:flex;align-items:center;justify-content:space-between;padding:.55rem 1.25rem;border-top:1px solid var(--gray-100);gap:.5rem}
.dark .usage-bar{border-top-color:rgba(255,255,255,0.05)}
.usage-info{display:flex;align-items:center;gap:.45rem;font-size:.78rem;color:var(--gray-500)}
.dark .usage-info{color:rgba(255,255,255,0.35)}
.usage-info i{font-size:.7rem;color:var(--primary)}
.dark .usage-info i{color:#a5b4fc}
.usage-count{font-weight:700;color:var(--primary)}
.dark .usage-count{color:#a5b4fc}
.usage-count.warn{color:#f59e0b}
.usage-count.blocked{color:#ef4444}
.usage-progress{width:80px;height:5px;border-radius:3px;background:var(--gray-200);overflow:hidden;flex-shrink:0}
.dark .usage-progress{background:rgba(255,255,255,0.08)}
.usage-fill{height:100%;border-radius:3px;transition:width .3s ease,background .3s ease;background:var(--primary)}
.dark .usage-fill{background:#a5b4fc}
.usage-fill.mid{background:#f59e0b}
.usage-fill.full{background:#ef4444}
.limit-overlay{display:none;align-items:center;justify-content:center;padding:1.25rem;margin-top:.75rem;border-radius:14px;background:linear-gradient(135deg,rgba(239,68,68,0.06),rgba(239,68,68,0.03));border:1px solid rgba(239,68,68,0.12);animation:slideUp .3s cubic-bezier(.4,0,.2,1)}
.dark .limit-overlay{background:linear-gradient(135deg,rgba(239,68,68,0.08),rgba(239,68,68,0.04));border-color:rgba(239,68,68,0.2)}
.limit-overlay.show{display:flex}
.limit-overlay i{font-size:1.4rem;color:#ef4444;margin-inline-end:.6rem}
.limit-overlay .limit-msg{text-align:right}
.limit-overlay .limit-msg h4{font-size:.9rem;font-weight:700;color:#ef4444;margin-bottom:.15rem}
.limit-overlay .limit-msg p{font-size:.8rem;color:var(--gray-500);line-height:1.5}
.dark .limit-overlay .limit-msg p{color:rgba(255,255,255,0.45)}
.btn-gen:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(67,56,202,0.35)}
.btn-gen:disabled{opacity:.6;cursor:not-allowed;transform:none}
.btn-gen i{font-size:.85rem}
.output-wrap{margin-top:2rem;display:none}
.output-wrap.show{display:block;animation:slideUp .4s cubic-bezier(.4,0,.2,1)}
@keyframes slideUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.output-card{background:#fff;border:1px solid var(--gray-200);border-radius:20px;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,0.06)}
.dark .output-card{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.06);box-shadow:0 8px 32px rgba(0,0,0,0.2)}
.output-top{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--gray-100)}
.dark .output-top{border-bottom-color:rgba(255,255,255,0.05)}
.output-top-l{display:flex;align-items:center;gap:.6rem}
.out-badge{font-size:.72rem;padding:.2rem .6rem;border-radius:6px;font-weight:600;color:#fff}
.out-title{font-size:.9rem;font-weight:700;color:var(--dark)}
.dark .out-title{color:#fff}
.output-body{padding:1.25rem;max-height:50vh;overflow-y:auto}
.output-body::-webkit-scrollbar{width:4px}
.output-body::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:2px}
.dark .output-body::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.08)}
.out-text{font-size:.95rem;font-weight:500;line-height:1.95;color:var(--gray-800);white-space:pre-wrap;word-break:break-word;min-height:1.5em}
.dark .out-text{color:rgba(255,255,255,0.88)}
.out-text .cursor{display:inline-block;width:2px;height:1.1em;background:var(--primary);margin-left:2px;vertical-align:text-bottom;animation:blink .6s step-end infinite}
.dark .out-text .cursor{background:#a5b4fc}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.output-bottom{display:flex;align-items:center;justify-content:flex-end;padding:.75rem 1.25rem;border-top:1px solid var(--gray-100)}
.dark .output-bottom{border-top-color:rgba(255,255,255,0.05)}
.out-actions{display:flex;gap:.4rem}
.btn-act{display:inline-flex;align-items:center;gap:.35rem;padding:.45rem .9rem;border-radius:10px;border:none;font-size:.82rem;font-weight:600;font-family:'Tajawal',sans-serif;cursor:pointer;transition:all .3s ease}
.btn-copy-act{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;box-shadow:0 3px 10px rgba(67,56,202,0.2)}
.btn-copy-act:hover{transform:translateY(-1px);box-shadow:0 5px 16px rgba(67,56,202,0.3)}
.btn-save-act{background:transparent;color:var(--gray-600);border:1.5px solid var(--gray-200)}
.dark .btn-save-act{color:rgba(255,255,255,0.5);border-color:rgba(255,255,255,0.08)}
.btn-save-act:hover{border-color:var(--success);color:var(--success)}
.dark .btn-save-act:hover{border-color:rgba(5,150,105,0.6);color:#34d399}
.hist-section{margin-top:2rem;background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.dark .hist-section{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.06)}
.hist-head{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1.15rem;cursor:pointer;transition:background .2s ease}
.hist-head:hover{background:var(--gray-100)}
.dark .hist-head:hover{background:rgba(255,255,255,0.02)}
.hist-head-l{display:flex;align-items:center;gap:.55rem}
.hist-head h3{font-size:.92rem;font-weight:700;color:var(--dark)}
.dark .hist-head h3{color:#fff}
.hist-cnt{font-size:.7rem;padding:.15rem .5rem;border-radius:7px;background:var(--gray-100);color:var(--gray-600);font-weight:600}
.dark .hist-cnt{background:rgba(255,255,255,0.05);color:rgba(255,255,255,0.45)}
.hist-head-r{display:flex;align-items:center;gap:.6rem}
.hist-clear{background:none;border:none;color:var(--gray-500);font-size:.78rem;font-family:'Tajawal',sans-serif;cursor:pointer;font-weight:500;transition:color .2s ease}
.dark .hist-clear{color:rgba(255,255,255,0.35)}
.hist-clear:hover{color:#ef4444}
.hist-chev{color:var(--gray-500);transition:transform .3s ease;font-size:.75rem}
.dark .hist-chev{color:rgba(255,255,255,0.3)}
.hist-chev.open{transform:rotate(180deg)}
.hist-body{max-height:0;overflow:hidden;transition:max-height .4s ease}
.hist-body.open{max-height:500px}
.hist-list{max-height:400px;overflow-y:auto}
.hist-list::-webkit-scrollbar{width:4px}
.hist-list::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:2px}
.dark .hist-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.08)}
.hist-item{display:flex;align-items:flex-start;gap:.65rem;padding:.7rem 1.15rem;border-top:1px solid var(--gray-100);cursor:pointer;transition:background .2s ease}
.dark .hist-item{border-top-color:rgba(255,255,255,0.04)}
.hist-item:hover{background:var(--gray-100)}
.dark .hist-item:hover{background:rgba(255,255,255,0.02)}
.hist-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;margin-top:.4rem}
.hist-item-body{flex:1;min-width:0}
.hist-item-txt{font-size:.82rem;color:var(--dark);line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dark .hist-item-txt{color:rgba(255,255,255,0.75)}
.hist-item-meta{font-size:.7rem;color:var(--gray-500);margin-top:.15rem;display:flex;align-items:center;gap:.4rem}
.dark .hist-item-meta{color:rgba(255,255,255,0.3)}
.hist-del{background:none;border:none;color:var(--gray-400);cursor:pointer;font-size:.8rem;padding:.15rem;transition:color .2s ease;flex-shrink:0;margin-top:.15rem}
.dark .hist-del{color:rgba(255,255,255,0.2)}
.hist-del:hover{color:#ef4444}
.hist-empty{padding:1.5rem;text-align:center;color:var(--gray-400);font-size:.88rem}
.dark .hist-empty{color:rgba(255,255,255,0.25)}
.hist-item-wrap{border-top:1px solid var(--gray-100)}
.dark .hist-item-wrap{border-top-color:rgba(255,255,255,0.04)}
.hist-item-header{display:flex;align-items:center;gap:.65rem;padding:.75rem 1.15rem;cursor:pointer;transition:background .2s ease;user-select:none}
.hist-item-header:hover{background:linear-gradient(135deg,rgba(67,56,202,0.04),rgba(126,34,206,0.04))}
.dark .hist-item-header:hover{background:linear-gradient(135deg,rgba(139,92,246,0.06),rgba(236,72,153,0.04))}
.hist-item-header .hist-user-icon{width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,rgba(67,56,202,0.1),rgba(126,34,206,0.1));color:var(--primary);font-size:.75rem;flex-shrink:0;transition:var(--transition)}
.dark .hist-item-header .hist-user-icon{background:linear-gradient(135deg,rgba(139,92,246,0.15),rgba(236,72,153,0.1));color:#a5b4fc}
.hist-item-header:hover .hist-user-icon{transform:scale(1.05)}
.hist-item-header .hist-user-info{flex:1;min-width:0}
.hist-item-header .hist-user-msg{font-size:.85rem;color:var(--dark);font-weight:600;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dark .hist-item-header .hist-user-msg{color:rgba(255,255,255,0.85)}
.hist-item-header .hist-user-meta{font-size:.7rem;color:var(--gray-500);margin-top:.1rem;display:flex;align-items:center;gap:.35rem}
.dark .hist-item-header .hist-user-meta{color:rgba(255,255,255,0.3)}
.hist-item-header .hist-user-meta i{font-size:.6rem}
.hist-item-header .hist-chevron{color:var(--gray-400);font-size:.7rem;transition:transform .3s ease;flex-shrink:0}
.dark .hist-item-header .hist-chevron{color:rgba(255,255,255,0.25)}
.hist-item-wrap.open .hist-item-header .hist-chevron{transform:rotate(180deg)}
.hist-item-header .hist-del-btn{background:none;border:none;color:var(--gray-400);cursor:pointer;font-size:.8rem;padding:.2rem;border-radius:6px;transition:all .2s ease;flex-shrink:0;opacity:0}
.dark .hist-item-header .hist-del-btn{color:rgba(255,255,255,0.2)}
.hist-item-header:hover .hist-del-btn{opacity:1}
.hist-item-header .hist-del-btn:hover{color:#ef4444;background:rgba(239,68,68,0.1)}
.hist-item-body-wrap{max-height:0;overflow:hidden;transition:max-height .35s cubic-bezier(.4,0,.2,1)}
.hist-item-wrap.open .hist-item-body-wrap{max-height:300px}
.hist-item-body-inner{padding:0 1.15rem .75rem 1.15rem}
.hist-prompt-label{font-size:.7rem;font-weight:600;color:var(--primary);text-transform:uppercase;letter-spacing:.03em;margin-bottom:.35rem;display:flex;align-items:center;gap:.3rem}
.dark .hist-prompt-label{color:#a5b4fc}
.hist-prompt-label i{font-size:.6rem}
.hist-prompt-box{background:linear-gradient(135deg,rgba(67,56,202,0.05),rgba(126,34,206,0.05));border:1px solid rgba(67,56,202,0.1);border-radius:10px;padding:.6rem .8rem;margin-bottom:.5rem}
.dark .hist-prompt-box{background:linear-gradient(135deg,rgba(139,92,246,0.08),rgba(236,72,153,0.05));border-color:rgba(139,92,246,0.15)}
.hist-prompt-text{font-size:.8rem;color:var(--dark);line-height:1.6;white-space:pre-wrap;word-break:break-word}
.dark .hist-prompt-text{color:rgba(255,255,255,0.7)}
.hist-output-label{font-size:.7rem;font-weight:600;color:var(--success);text-transform:uppercase;letter-spacing:.03em;margin-bottom:.35rem;display:flex;align-items:center;gap:.3rem}
.dark .hist-output-label{color:#34d399}
.hist-output-label i{font-size:.6rem}
.hist-output-box{background:var(--gray-100);border:1px solid var(--gray-200);border-radius:10px;padding:.6rem .8rem;max-height:120px;overflow-y:auto}
.dark .hist-output-box{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.06)}
.hist-output-box::-webkit-scrollbar{width:3px}
.hist-output-box::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:2px}
.dark .hist-output-box::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.08)}
.hist-output-text{font-size:.8rem;color:var(--gray-700);line-height:1.7;white-space:pre-wrap;word-break:break-word}
.dark .hist-output-text{color:rgba(255,255,255,0.65)}
.hist-item-actions{display:flex;gap:.35rem;margin-top:.5rem}
.hist-btn-use{display:inline-flex;align-items:center;gap:.3rem;padding:.35rem .7rem;border-radius:8px;border:none;font-size:.75rem;font-weight:600;font-family:'Tajawal',sans-serif;cursor:pointer;transition:all .25s ease;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;box-shadow:0 2px 8px rgba(67,56,202,0.2)}
.hist-btn-use:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(67,56,202,0.3)}
.hist-btn-copy{display:inline-flex;align-items:center;gap:.3rem;padding:.35rem .7rem;border-radius:8px;border:1.5px solid var(--gray-200);font-size:.75rem;font-weight:600;font-family:'Tajawal',sans-serif;cursor:pointer;transition:all .25s ease;background:transparent;color:var(--gray-600)}
.dark .hist-btn-copy{border-color:rgba(255,255,255,0.08);color:rgba(255,255,255,0.5)}
.hist-btn-copy:hover{border-color:var(--success);color:var(--success)}
.dark .hist-btn-copy:hover{border-color:rgba(5,150,105,0.6);color:#34d399}
.cfm-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.4);backdrop-filter:blur(4px);z-index:1100;display:none;align-items:center;justify-content:center;padding:1rem}
.cfm-overlay.open{display:flex}
.cfm-box{background:#fff;border-radius:18px;padding:2rem;max-width:380px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,0.15);text-align:center;animation:modalIn .25s ease}
.dark .cfm-box{background:#1a1a2e;box-shadow:0 20px 60px rgba(0,0,0,0.5)}
.cfm-box .cfm-ic{font-size:2rem;color:#f59e0b;margin-bottom:.75rem}
.cfm-box h3{font-size:1.1rem;font-weight:700;color:var(--dark);margin-bottom:.4rem}
.dark .cfm-box h3{color:#fff}
.cfm-box p{font-size:.88rem;color:var(--gray-600);margin-bottom:1.25rem;line-height:1.6}
.dark .cfm-box p{color:rgba(255,255,255,0.55)}
.cfm-acts{display:flex;gap:.5rem}
.cfm-acts .btn-act{flex:1;justify-content:center;padding:.6rem}
.btn-danger{background:#ef4444;color:#fff;border:none}
.btn-danger:hover{background:#dc2626}
.btn-cancel{background:transparent;color:var(--gray-600);border:1.5px solid var(--gray-200)}
.dark .btn-cancel{color:rgba(255,255,255,0.5);border-color:rgba(255,255,255,0.1)}
@keyframes modalIn{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.toast-box{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);z-index:9999;display:flex;flex-direction:column;gap:.4rem;align-items:center}
.toast{display:flex;align-items:center;gap:.5rem;padding:.65rem 1.3rem;border-radius:12px;background:var(--dark);color:#fff;font-size:.88rem;font-family:'Tajawal',sans-serif;font-weight:500;box-shadow:0 8px 28px rgba(0,0,0,0.2);animation:toastIn .35s ease;white-space:nowrap}
.dark .toast{background:rgba(30,27,75,0.92);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,0.1)}
.toast.out{animation:toastOut .3s ease forwards}
.toast i{font-size:.95rem}
.toast.ok i{color:#34d399}
.toast.err i{color:#f87171}
.toast.inf i{color:#60a5fa}
@keyframes toastIn{from{opacity:0;transform:translateY(16px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toastOut{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.95)}}
@media(max-width:768px){.tool-page{padding-top:1.5rem;padding-bottom:3rem}.t-header{margin-bottom:1.5rem}.t-header h1{font-size:1.6rem}.t-header p{font-size:.95rem}.t-header-icon{width:52px;height:52px;font-size:1.3rem;border-radius:14px}.input-card textarea{font-size:1rem;font-weight:500;padding:1rem 1.15rem;min-height:110px}.output-body{max-height:35vh}}
@media(max-width:480px){.btn-gen{padding:.5rem 1rem;font-size:.85rem}.output-bottom{flex-direction:column;gap:.6rem;align-items:stretch}.out-actions{justify-content:stretch}.out-actions .btn-act{flex:1;justify-content:center}}
.content-section{width:100%;max-width:900px;margin:2rem auto 0;padding:0 1rem}
@media(min-width:768px){.content-section{margin:3rem auto 0}}
.content-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem;margin-bottom:1.5rem}
@media(min-width:768px){.content-grid{margin-bottom:2rem}}
.content-card{background:white;border-radius:var(--radius);padding:1.5rem;border:1px solid var(--gray-200);box-shadow:var(--shadow)}
.dark .content-card{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.05)}
.content-card h3{color:var(--primary);font-size:1.1rem;margin-bottom:.75rem;display:flex;align-items:center;gap:.5rem}
.content-card p{color:var(--gray-700);font-size:.95rem;line-height:1.6}
.dark .content-card p{color:#e2e8f0}
.content-card ul{list-style:none;padding:0}
.content-card li{color:var(--gray-700);font-size:.95rem;padding:.5rem 0;padding-right:1.5rem;position:relative}
.dark .content-card li{color:#e2e8f0}
.content-card li::before{content:'\f00c';font-family:'Font Awesome 6 Free';font-weight:900;position:absolute;right:0;color:var(--success);font-size:.75rem;top:.6rem}
@media(min-width:768px){.content-card li::before{font-size:.85rem;top:.5rem}}
.section-title{font-size:1.5rem;font-weight:700;color:var(--dark);margin-bottom:1.5rem;text-align:center}
@media(min-width:768px){.section-title{font-size:1.75rem}}
.dark .section-title{color:white}
.step-item{background:white;border-radius:var(--radius);padding:1.25rem;border:1px solid var(--gray-200);margin-bottom:1rem;display:flex;align-items:center;gap:1rem;box-shadow:var(--shadow)}
.dark .step-item{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.05)}
.step-number{width:36px;height:36px;border-radius:50%;background:linear-gradient(90deg,var(--primary),var(--secondary));color:white;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.step-text{flex:1}
.step-text h4{color:var(--dark);font-size:1rem;margin-bottom:.25rem}
.dark .step-text h4{color:white}
.step-text p{color:var(--gray-700);font-size:.9rem;line-height:1.6}
.dark .step-text p{color:#e2e8f0}
.faq-section{margin-top:2rem}
.faq-item{background:white;border-radius:var(--radius);padding:1.25rem;border:1px solid var(--gray-200);margin-bottom:1rem;box-shadow:var(--shadow)}
.dark .faq-item{background:rgba(255,255,255,0.03);border-color:rgba(255,255,255,0.05)}
.faq-question{color:var(--dark);font-weight:600;font-size:1rem;margin-bottom:.5rem;display:flex;align-items:center;gap:.5rem}
.dark .faq-question{color:white}
.faq-question i{color:var(--primary)}
.dark .faq-question i{color:#a5b4fc}
.faq-answer{color:var(--gray-700);font-size:.95rem;line-height:1.6;padding-right:1.5rem}
.dark .faq-answer{color:#e2e8f0}
.faq-answer p{padding-top:0;margin:0}
.related-tools-section{max-width:900px;margin:3rem auto 0;padding:0 1rem;animation:fadeInUp .8s ease}
.related-tools-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}
.related-tools-title{font-size:1.5rem;font-weight:700;color:var(--dark);display:flex;align-items:center;gap:.75rem}
.dark .related-tools-title{color:white}
.related-tools-title i{color:var(--primary);font-size:1.3rem}
.related-tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
@media(max-width:992px){.related-tools-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.related-tools-grid{grid-template-columns:1fr}.related-tools-title{font-size:1.25rem}}
.related-tool-card{display:flex;align-items:center;gap:.85rem;padding:1rem 1.25rem;background:#fff;border:1px solid #e5e7eb;border-radius:var(--radius);box-shadow:var(--shadow);cursor:pointer;text-decoration:none;color:inherit;position:relative;overflow:hidden;transition:var(--transition)}
.dark .related-tool-card{background:#1a1a2e;border-color:#2d2d44}
.related-tool-card::before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#4338ca,#7e22ce);opacity:0;transition:var(--transition)}
.related-tool-card:hover::before{opacity:.04}
.dark .related-tool-card:hover::before{opacity:.08}
.related-tool-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover);border-color:#a5b4fc}
.dark .related-tool-card:hover{border-color:rgba(139,92,246,0.4)}
.related-tool-card:active{transform:translateY(-1px)}
.related-tool-icon{width:44px;height:44px;min-width:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;background:linear-gradient(135deg,rgba(67,56,202,0.08),rgba(126,34,206,0.08));color:#4338ca;transition:var(--transition)}
.dark .related-tool-icon{background:linear-gradient(135deg,rgba(129,140,248,0.12),rgba(196,132,253,0.12));color:#a5b4fc}
.related-tool-card:hover .related-tool-icon{background:linear-gradient(135deg,#4338ca,#7e22ce);color:#fff;transform:scale(1.05)}
.related-tool-info{flex:1;min-width:0}
.related-tool-name{font-size:.9rem;font-weight:700;color:#1e1b4b;margin-bottom:.15rem;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;transition:var(--transition)}
.dark .related-tool-name{color:#e2e8f0}
.related-tool-card:hover .related-tool-name{color:#4338ca}
.dark .related-tool-card:hover .related-tool-name{color:#a5b4fc}
.related-tool-desc{font-size:.78rem;color:#6b7280;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4}
.dark .related-tool-desc{color:rgba(255,255,255,0.45)}
.related-tool-card:hover .related-tool-desc{color:#4b5563}
.dark .related-tool-card:hover .related-tool-desc{color:rgba(255,255,255,0.6)}
.btn-gen .spinner{display:none;width:16px;height:16px;border:2px solid rgba(255,255,255,0.3);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite}
.btn-gen.loading .spinner{display:inline-block}
.btn-gen.loading .btn-text{display:none}
@keyframes spin{to{transform:rotate(360deg)}}
.section-title{scroll-margin-top:120px}
.output-wrap.show .output-card{animation:slideUp .4s cubic-bezier(.4,0,.2,1)}
.t-header{animation:fadeInDown .6s cubic-bezier(.4,0,.2,1)}
@keyframes fadeInDown{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
@keyframes fadeInUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.input-glow{transition:background .3s ease,box-shadow .3s ease}
.input-glow:focus-within{box-shadow:0 0 0 3px rgba(67,56,202,0.1)}
.dark .input-glow:focus-within{box-shadow:0 0 0 3px rgba(139,92,246,0.15)}
.btn-gen{position:relative;overflow:hidden}
.btn-gen::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,0.15),transparent);opacity:0;transition:opacity .3s ease}
.btn-gen:hover::after{opacity:1}
.hist-item-header{border-radius:8px;margin:.15rem .5rem}
.output-card{transition:var(--transition)}
.output-card:hover{box-shadow:0 12px 40px rgba(0,0,0,0.08)}
.dark .output-card:hover{box-shadow:0 12px 40px rgba(0,0,0,0.3)}
@media(max-width:768px){.content-section{margin-top:2rem;padding:0 .75rem}.content-grid{grid-template-columns:1fr}.related-grid{grid-template-columns:1fr}}