:root {
    --bg-main: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #10b981;
    --danger: #ef4444;
    --text: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding-bottom: 70px; /* مسافة لشريط التنقل السفلي */
    direction: rtl;
}

.mobile-viewport {
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Inputs & Forms */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
