/* ── Variables ── */
:root {
    --primary: #2B2D7E;
    --primary-light: #3d3fa8;
    --accent: #AACC00;
    --accent-dark: #8aaa00;
    --bg: #080d1a;
    --bg-card: rgba(43, 45, 126, 0.15);
    --bg-glass: rgba(255,255,255,0.04);
    --border: rgba(170,204,0,0.18);
    --border-strong: rgba(170,204,0,0.4);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.45);
    --text-faint: rgba(255,255,255,0.25);
    --font: 'Cairo', sans-serif;
    --font-title: 'Tajawal', sans-serif;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-full: 50px;
    --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    direction: rtl;
}

/* ── Typography ── */
.title { font-family: var(--font-title); font-weight: 900; }
.grad-text {
    background: linear-gradient(135deg, var(--accent), #d4f000, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-tag {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
}
.section-h {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    line-height: 1.2;
}

/* ── Glass ── */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .3s;
}
.glass-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(170,204,0,0.1);
}

/* ── Buttons ── */
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #111;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 28px;
    cursor: pointer;
    font-family: var(--font);
    font-size: .95rem;
    transition: all .3s;
    box-shadow: 0 0 25px rgba(170,204,0,0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    box-shadow: 0 0 45px rgba(170,204,0,0.5);
    transform: translateY(-2px);
}
.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.btn-outline {
    background: transparent;
    color: var(--text);
    font-weight: 700;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    padding: 12px 28px;
    cursor: pointer;
    font-family: var(--font);
    font-size: .95rem;
    transition: all .3s;
}
.btn-outline:hover {
    background: rgba(170,204,0,0.08);
    border-color: var(--accent);
}

/* ── Inputs ── */
.input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-size: .95rem;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    width: 100%;
    transition: all .3s;
    outline: none;
}
.input:focus {
    border-color: var(--accent);
    background: rgba(170,204,0,0.05);
    box-shadow: 0 0 20px rgba(170,204,0,0.08);
}
.input::placeholder { color: var(--text-faint); font-family: var(--font); }

/* ── Divider ── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    margin: 60px 0;
}

/* ── Spinner ── */
.spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(170,204,0,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* ── Dot background ── */
.dot-bg {
    background-image: radial-gradient(rgba(170,204,0,0.1) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ── Orb ── */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--primary-light)); border-radius: 3px; }

/* ── Animations ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes floatA { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-25px); } }
@keyframes floatB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(20px); } }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.3; } }

/* ── App loading ── */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
}
.app-loading-spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(170,204,0,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.app-loading-text { color: var(--text-muted); font-size: .9rem; }

/* ── Blazor error ── */
#blazor-error-ui {
    background: #1a0808;
    border-top: 1px solid rgba(248,113,113,0.3);
    color: #fca5a5;
    display: none;
    padding: 12px 20px;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    font-size: .9rem;
    z-index: 9999;
}
#blazor-error-ui .reload { color: var(--accent); margin-right: 10px; }
#blazor-error-ui .dismiss { float: left; cursor: pointer; }

/* ── Not found ── */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
    text-align: center;
}
.not-found h2 { font-size: 1.5rem; }
.not-found a { color: var(--accent); }

/* ── Nav link ── */
.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: color .3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; right: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width .3s;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: flex !important; }
}
@media (min-width: 769px) {
    .show-mobile { display: none !important; }
}
