@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Tajawal:wght@400;500;700;800;900&display=swap');


/* ============================================================
   🎨 Variables
   ============================================================ */

:root {
    --bg-base:         #030305;
    --bg-surface:      #0a0a0f;
    --bg-card:         #0f0f18;
    --primary:         #8b5cf6;
    --primary-dim:     rgba(139, 92, 246, 0.15);
    --secondary:       #00f2fe;
    --danger:          #f87171;
    --success:         #4ade80;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    --text-main:       #f8fafc;
    --text-muted:      #8b949e;
    --border-color:    rgba(255, 255, 255, 0.08);
    --border-hover:    rgba(139, 92, 246, 0.35);
    --glass-bg:        rgba(10, 10, 15, 0.8);
    --transition:      0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-card:     18px;
    --radius-btn:      50px;
    --radius-input:    14px;
}


/* ============================================================
   1. Reset & Base
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #2d2d3d; border-radius: 10px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

html {
    direction: rtl;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.07) 0%, transparent 55%),
        radial-gradient(circle at 85% 20%, rgba(0, 242, 254, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
}


/* ============================================================
   2. Header — مشترك بين كل الصفحات
   ============================================================ */

header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;

    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);

    padding: 16px 28px;
    margin-bottom: 40px;

    position: sticky;
    top: 0;
    z-index: 100;
}

header h2 {
    font-size: 1.3rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: auto;
}


/* ============================================================
   3. Main — مشترك
   ============================================================ */

main {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

main h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 900;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.7;
}

main > p span {
    color: var(--secondary);
    font-weight: 700;
}


/* ============================================================
   4. Buttons — مشترك
   ============================================================ */

button {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-btn);
    padding: 12px 26px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

button:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}

button:active {
    transform: scale(0.96);
    filter: none;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* زر رئيسي — بنفسجي */
header button:not(.nav-button):first-of-type,
button[type="submit"],
button[type="button"]:not(.nav-button):not(#searchButton):not(.like-btn) {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

/* زر nav — شفاف */
.nav-button {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

.nav-button:hover {
    color: var(--text-main) !important;
    border-color: var(--border-hover) !important;
    background: rgba(139, 92, 246, 0.08) !important;
}

/* زر البحث */
#searchButton {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    width: 100%;
    padding: 13px 26px;
    margin-top: 10px;
    margin-bottom: 32px;
}

#searchButton:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.4);
}

/* زر لايك */
.like-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.like-btn:hover:not(:disabled) {
    background: rgba(255, 100, 100, 0.12);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.35);
}

/* أزرار التحميل */
#androidBtn,
#iosBtn,
#vpnBtn {
    background: var(--accent-gradient);
    color: white;
    width: 100%;
    padding: 14px 20px;
    margin-top: 12px;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3);
}

#androidBtn:hover:not(:disabled),
#iosBtn:hover:not(:disabled),
#vpnBtn:hover:not(:disabled) {
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.5);
}

/* زر تسجيل الخروج */
#logoutBtn {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
    width: 100%;
    margin-bottom: 12px;
}

#logoutBtn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.4);
}


/* ============================================================
   5. Inputs, Textarea, Select — مشترك
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    padding: 16px 24px;
    margin-top: 6px;
    margin-bottom: 14px;
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: #0d0d15;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    background: #0d0d15;
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.18),
        inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}


textarea {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 18px 22px;
    margin-top: 6px;
    margin-bottom: 14px;
    color: var(--success);
    font-family: 'Fira Code', monospace;
    font-size: 0.92rem;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    min-height: 120px;
    transition: var(--transition);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

textarea::placeholder {
    color: var(--text-muted);
    font-family: 'Tajawal', sans-serif;
    opacity: 0.65;
}

textarea:hover {
    border-color: rgba(139, 92, 246, 0.25);
}

textarea:focus {
    border-color: var(--primary);
    background: #0a0a0f;
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.15),
        inset 0 2px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

textarea::-webkit-resizer {
    background-image: linear-gradient(135deg, transparent 50%, var(--primary) 50%);
    border-radius: 0 0 var(--radius-card) 0;
}


select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: var(--bg-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 15px 22px 15px 46px;
    margin-top: 6px;
    margin-bottom: 14px;
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

select:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background-color: #0d0d15;
}

select:focus {
    border-color: var(--secondary);
    box-shadow:
        0 0 0 3px rgba(0, 242, 254, 0.12),
        0 4px 14px rgba(0, 0, 0, 0.3);
}

option {
    background-color: #0f0f16;
    color: var(--text-main);
    padding: 10px;
    font-family: 'Tajawal', sans-serif;
}

label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}


/* ============================================================
   6. scripts.html — قائمة السكربتات
   ============================================================ */

#searchScripts {
    margin-bottom: 0;
    border-radius: var(--radius-btn);
}

#scriptsList {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 8px;
}

.script-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 26px 28px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.script-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: 0.3s;
}

.script-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    transform: translateY(-4px);
}

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

.script-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.script-card > p,
.script-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.script-card pre {
    background: #000;
    border: 1px solid #1a1a28;
    border-right: 3px solid var(--primary);
    border-radius: 12px;
    padding: 16px 18px;
    color: var(--success);
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    direction: ltr;
    overflow-x: auto;
    margin-bottom: 18px;
    max-height: 200px;
}

.script-card button {
    margin: 5px 5px 0 0;
    padding: 10px 18px;
    font-size: 0.86rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.script-card button:first-of-type {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 5px 14px rgba(139, 92, 246, 0.3);
}

.script-card button:nth-of-type(2) {
    background: rgba(0, 242, 254, 0.07);
    color: var(--secondary);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.script-card button:nth-of-type(2):hover {
    background: var(--secondary);
    color: var(--bg-base);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
}

.star {
    cursor: pointer;
    font-size: 20px;
    color: #3a3a4a;
    transition: color 0.2s, transform 0.2s;
    margin-right: 2px;
}

.star:hover {
    transform: scale(1.25);
    color: gold;
}

.avg-rating {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-right: 6px;
}

#noMatchMsg {
    text-align: center;
    color: var(--danger);
    font-size: 1rem;
    padding: 48px 0;
}


/* ============================================================
   7. publish.html — نشر سكربت
   ============================================================ */

#publishForm {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 24px;
}

#publishForm button[type="button"] {
    margin-top: 8px;
    padding: 15px;
    font-size: 1.05rem;
    border-radius: var(--radius-btn);
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.35);
}


/* ============================================================
   8. auth.html — تسجيل الدخول
   ============================================================ */

#authContainer {
    max-width: 440px;
    margin: 60px auto;
    padding: 40px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#authContainer h1 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 6px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#authContainer h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 28px;
    margin-bottom: 4px;
    -webkit-text-fill-color: unset;
    background: none;
}

#authContainer p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 20px;
}

#authContainer input {
    text-align: right;
}

#loginBtn,
#regBtn {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 14px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-btn);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
    border: none;
}

#msg {
    color: var(--danger);
    font-size: 0.88rem;
    margin-top: 10px;
    min-height: 20px;
}

#authContainer .nav-button {
    width: 100%;
    margin-top: 10px;
}


/* ============================================================
   9. help.html — الدعم الفني
   ============================================================ */

/* نلغي الـ inline styles في صفحة الـ help */
main {
    background: transparent !important;
    box-shadow: none !important;
}

#supportForm {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

#supportForm label {
    color: var(--text-muted);
    font-weight: 700;
}

#supportForm textarea {
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
}

#supportForm button[type="submit"] {
    margin-top: 8px;
    padding: 15px;
    font-size: 1rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-btn);
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35);
    border: none;
    width: 100%;
}

#statusMsg {
    color: var(--success);
    font-size: 0.9rem;
    margin-top: 14px;
}


/* ============================================================
   10. delta.html — تحميل هاك دلتا
   ============================================================ */

.delta-box {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px 32px;
    text-align: center;
    width: 340px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.delta-box h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.delta-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

#status {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 18px;
}


/* ============================================================
   11. Animations
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

main,
#authContainer,
.delta-box {
    animation: fadeIn 0.5s ease both;
}


/* ============================================================
   12. script.html — عرض السكربت
   ============================================================
   ملاحظة: تصميم صفحة عرض السكربت (بما فيه قسم التعليقات، الردود،
   واللايك/الديسلايك) بقى بالكامل جوه <style> الخاص بـ script.html
   نفسها، عشان كده اتشالت من هنا القواعد القديمة الخاصة بـ:
   #comments div / #addComment / #commentInput / #submitComment
   لأنها كانت بتتصادم مع الكلاسات الجديدة (.cmt-row, .cmt-pic,
   .comment-input-wrap ...) وبتكسر تصميم الصور الشخصية في التعليقات
   (بادينج زيادة كان بيقلّص مساحة الصورة جوه الدايرة لحد ما تختفي).
   لو احتجت تعدّل تصميم التعليقات تاني، عدّل جوه script.html مباشرة.
   ============================================================ */

/* العنوان والمؤلف */

#title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

#author {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 28px;
}


/* عناوين الأقسام */

main h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 32px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    -webkit-text-fill-color: unset;
    background: none;
}
