/**
 * أرض الإحسان - ملف الأنماط الرئيسي
 * Ihsan Land Portal - Main Stylesheet
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Green Color Palette from Logo */
    --color-primary: #1A3A12;
    --color-secondary: #2D5A1E;
    --color-accent: #3D8103;
    --color-accent-light: #5BA020;
    --color-accent-lighter: #7BC043;
    --color-accent-glow: rgba(61, 129, 3, 0.15);
    --color-gold: #F59E0B;
    --color-gold-light: #FBBF24;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;
    --color-surface: #F8FAF6;
    --color-surface-green: #F0F7EC;
    --color-surface-dark: #0F1A0C;
    --color-text: #1E2D1A;
    --color-text-muted: #4A5D44;
    --color-text-light: #7A8F72;
    --color-border: #D4E5CC;
    --color-white: #FFFFFF;
    --font-display: 'Tajawal', sans-serif;
    --font-body: 'IBM Plex Sans Arabic', sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(61, 129, 3, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 600px;
}

.container-md {
    max-width: 800px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(61, 129, 3, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 129, 3, 0.5);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: var(--color-white);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-glow);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, #DC2626 100%);
    color: var(--color-white);
}

.btn-outline-danger {
    background: transparent;
    color: var(--color-danger);
    border: 2px solid var(--color-danger);
}

.btn-outline-danger:hover {
    background: var(--color-danger);
    color: var(--color-white);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label .required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-glow);
}

.form-control::placeholder {
    color: var(--color-text-light);
}

.form-control.error {
    border-color: var(--color-danger);
}

.form-control.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.85rem;
    color: var(--color-danger);
    margin-top: 6px;
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
}

.input-group .form-control {
    flex: 1;
}

.input-group-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
}

.input-group .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--color-accent);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* Select */
.form-select {
    appearance: none;
    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='%234A5D44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 18px;
    padding-left: 48px;
}

/* ============================================
   Alerts
   ============================================ */
#alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
    pointer-events: none;
}

#alert-container .alert {
    pointer-events: auto;
}

.alert {
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
}

.alert-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon svg {
    width: 28px;
    height: 28px;
}

.alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #065F46;
}

.alert-success .alert-icon svg {
    stroke: #10B981;
}

.alert-danger, .alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #991B1B;
}

.alert-danger .alert-icon svg,
.alert-error .alert-icon svg {
    stroke: #EF4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.4);
    color: #92400E;
}

.alert-warning .alert-icon svg {
    stroke: #F59E0B;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #1E40AF;
}

.alert-info .alert-icon svg {
    stroke: #3B82F6;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
}

.badge-free {
    background: linear-gradient(135deg, #78909c, #607d8b);
    color: #ffffff;
}

.badge-monthly {
    background: linear-gradient(135deg, #fcd34d, #fbbf24);
    color: #78350f;
}

.badge-yearly {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.badge-lifetime, .badge-vip {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.card-title {
    font-size: 1.125rem;
    color: var(--color-primary);
    margin: 0;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 52px;
    width: auto;
}

/* إخفاء الشعار المصغر على الديسكتوب */
.logo-mobile {
    display: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link svg {
    flex-shrink: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Header User Menu */
.header-user {
    position: relative;
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--color-surface-green);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-user-btn:hover {
    border-color: var(--color-accent);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
}

.header-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user-info {
    text-align: right;
}

.header-user-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.header-user-points {
    font-size: 0.8rem;
    color: var(--color-accent);
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1001;
}

.header-user:hover .header-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.header-dropdown-item:hover {
    background: var(--color-surface-green);
    color: var(--color-accent);
}

.header-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 0;
}

/* Notifications Bell */
.notifications-bell {
    position: relative;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    z-index: 10;
}

.notifications-bell:hover {
    color: var(--color-accent);
}

.notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--color-danger);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--color-accent-glow);
    border-color: var(--color-accent);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    display: block;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.mobile-menu-logo img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: var(--color-danger);
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu User Section */
.mobile-menu-user {
    padding: 20px;
    background: linear-gradient(135deg, var(--color-surface-green) 0%, var(--color-surface) 100%);
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 700;
    overflow: hidden;
}

.mobile-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-menu-user-details {
    flex: 1;
}

.mobile-menu-user-name {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
    margin-bottom: 2px;
}

.mobile-menu-user-points {
    font-size: 0.85rem;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile Menu Guest Buttons */
.mobile-menu-guest {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-guest .btn {
    width: 100%;
    justify-content: center;
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    padding: 16px 0;
}

.mobile-menu-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-menu-nav-item:hover,
.mobile-menu-nav-item.active {
    background: var(--color-surface-green);
    color: var(--color-accent);
}

.mobile-menu-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.mobile-menu-nav-item.active {
    border-left: 3px solid var(--color-accent);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 20px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.mobile-menu-logout {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--color-danger);
    font-weight: 600;
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-menu-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.mobile-menu-logout svg {
    width: 20px;
    height: 20px;
}

/* Body lock when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ============================================
   Auth Pages (Login/Register)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #F8FAF6 0%, #F0F7EC 50%, #E8F5E0 100%);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(61, 129, 3, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(45, 90, 30, 0.1) 0%, transparent 50%);
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    padding: 48px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 70px;
    width: auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--color-text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.auth-footer a {
    font-weight: 600;
}

/* ============================================
   Social Login Buttons
   ============================================ */
.social-login-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 0;
    justify-content: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.btn-social svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.btn-social span {
    white-space: nowrap;
}

/* Google Button */
.btn-google {
    background: var(--color-white);
    color: var(--color-text);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--color-text);
}

/* Facebook Button */
.btn-facebook {
    background: #1877F2;
    color: var(--color-white);
    border-color: #1877F2;
}

.btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
    transform: translateY(-2px);
    color: var(--color-white);
}

.btn-facebook svg path {
    fill: var(--color-white);
}

/* Responsive Social Buttons */
@media (max-width: 480px) {
    .social-login-buttons {
        flex-direction: column;
    }

    .btn-social {
        max-width: 100%;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* Referral Banner */
.referral-banner {
    background: linear-gradient(135deg, var(--color-accent-glow) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-banner-icon {
    font-size: 1.5rem;
}

.referral-banner-text {
    font-size: 0.9rem;
    color: var(--color-text);
}

.referral-banner-text strong {
    color: var(--color-accent);
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--color-surface);
}

.dashboard-header {
    background: var(--color-white);
    padding: 32px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 600;
    overflow: hidden;
}

.dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-greeting h1 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.dashboard-greeting p {
    color: var(--color-text-muted);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 32px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: var(--color-accent);
}

.stat-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-card-icon svg {
    width: 40px;
    height: 40px;
}

.stat-card-icon.green {
    background: linear-gradient(135deg, rgba(61, 129, 3, 0.2) 0%, rgba(61, 129, 3, 0.08) 100%);
    color: var(--color-accent);
}

.stat-card-icon.gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
    color: var(--color-gold);
}

.stat-card-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.08) 100%);
    color: var(--color-info);
}

.stat-card-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #8B5CF6;
}

.stat-card-value {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-card-label {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ============================================
   Tables
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-surface);
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: var(--color-surface-green);
}

/* ============================================
   Notifications Panel
   ============================================ */
.notifications-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: var(--shadow-xl);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.notifications-panel.open {
    transform: translateX(0);
}

.notifications-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notifications-title {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.notifications-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 8px;
    transition: color var(--transition-fast);
}

.notifications-close:hover {
    color: var(--color-accent);
}

.notifications-mark-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(61, 129, 3, 0.1);
    border: 1px solid rgba(61, 129, 3, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-accent);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
    transition: all var(--transition-fast);
}

.notifications-mark-all-btn:hover {
    background: rgba(61, 129, 3, 0.2);
    border-color: var(--color-accent);
}

.notifications-mark-all-btn:active {
    transform: scale(0.95);
}

.notifications-mark-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notifications-list {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* إخفاء scrollbar في التنبيهات */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.notification-item {
    position: relative;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    filter: brightness(0.97);
    transform: translateX(-2px);
}

/* التنبيهات غير المقروءة - خلفية صفراء */
.notification-item.unread {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-right: 4px solid #F59E0B;
}

.notification-item.unread:hover {
    background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%);
}

.notification-item.unread::before {
    display: none;
}

.notification-item.unread::after {
    display: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.notification-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* تذييل التنبيه */
.notification-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

/* شارة حالة التنبيه */
.notification-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* شارة "جديد" - للتنبيهات غير المقروءة */
.notification-status-badge.unread {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* شارة "شوهدت" - للتنبيهات المقروءة */
.notification-status-badge.read {
    background: #E5E7EB;
    color: #6B7280;
}

.notification-status-badge .checkmark {
    font-weight: bold;
    color: #10B981;
}

/* التنبيهات المقروءة - خلفية رمادية فاتحة */
.notification-item.read {
    background: #F3F4F6;
    border-right: 4px solid #D1D5DB;
}

.notification-item.read:hover {
    background: #E5E7EB;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    text-align: center;
}

.notifications-empty svg {
    opacity: 0.4;
    margin-bottom: 16px;
}

.notifications-empty p {
    font-size: 1rem;
    margin: 0;
}

/* تذييل لوحة التنبيهات */
.notifications-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(180deg, var(--color-surface) 0%, #f8fafc 100%);
}

.notifications-delete-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    border: none;
    color: white;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.notifications-delete-read-btn:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.notifications-delete-read-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.notifications-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    color: white;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(61, 129, 3, 0.3);
}

.notifications-view-all-btn:hover {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 129, 3, 0.4);
}

.notifications-view-all-btn svg {
    transition: transform 0.2s ease;
}

.notifications-view-all-btn:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   Global Confirm Modal
   ============================================ */
.global-confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.global-confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.global-confirm-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.global-confirm-modal-overlay.active .global-confirm-modal {
    transform: scale(1) translateY(0);
}

.global-confirm-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #DC2626;
    animation: globalIconPulse 2s ease-in-out infinite;
}

@keyframes globalIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.global-confirm-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 12px;
}

.global-confirm-modal-message {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin: 0 0 28px;
    line-height: 1.6;
}

.global-confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.global-confirm-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.global-confirm-modal-btn-cancel {
    background: #F3F4F6;
    color: #6B7280;
}

.global-confirm-modal-btn-cancel:hover {
    background: #E5E7EB;
    transform: translateY(-2px);
}

.global-confirm-modal-btn-confirm {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.global-confirm-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ============================================
   Points Transfer Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   Videos Page
   ============================================ */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

.video-play-btn {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.5rem;
    transition: all var(--transition-normal);
}

.video-card:hover .video-play-btn {
    transform: scale(1.1);
    background: var(--color-white);
}

.video-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
}

/* عام - للجميع */
.video-tag.public {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--color-white);
}

/* للمشتركين */
.video-tag.members {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: var(--color-white);
}

/* ذهبي */
.video-tag.gold {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: var(--color-white);
}

/* ماسي */
.video-tag.diamond {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: var(--color-white);
}

/* بالنقاط */
.video-tag.points {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: var(--color-white);
}

/* للتوافق مع الكود القديم */
.video-tag.free {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--color-white);
}

.video-tag.premium {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: var(--color-white);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.video-body {
    padding: 20px;
}

.video-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-title {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   Store/Products Page
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    aspect-ratio: 16/9;
    background: var(--color-surface-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 20px;
}

.product-type {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-gold);
}

/* ============================================
   Referral Page
   ============================================ */
.referral-link-box {
    background: var(--color-surface-green);
    border: 2px dashed var(--color-accent);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.referral-link-label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.referral-link-input {
    display: flex;
    gap: 12px;
}

.referral-link-input input {
    flex: 1;
    padding: 14px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--color-text);
    text-align: center;
}

.copy-btn {
    padding: 14px 24px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-primary);
    padding: 80px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
}

.footer-desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.footer-column h4 {
    font-size: 1rem;
    color: var(--color-white);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-lighter);
}

.footer-bottom {
    padding-top: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-accent-lighter);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }

.bg-surface { background: var(--color-surface); }
.bg-white { background: var(--color-white); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 28px 16px;
    }

    .stat-card-icon {
        width: 70px;
        height: 70px;
    }

    .stat-card-icon svg {
        width: 36px;
        height: 36px;
    }

    .stat-card-value {
        font-size: 2.25rem;
    }

    .stat-card-label {
        font-size: 1rem;
    }

    .videos-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* إخفاء القائمة الرئيسية */
    .nav {
        display: none !important;
    }

    /* إظهار زر القائمة الجانبية */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 1;
        flex-shrink: 0;
    }

    /* إخفاء أزرار تسجيل الدخول */
    .header-cta .btn-login {
        display: none !important;
    }

    /* ترتيب العناصر: زر القائمة - الشعار - أيقونات المستخدم */
    .header-cta {
        order: 3;
        flex-shrink: 0;
    }

    .header-inner {
        gap: 8px;
        flex-wrap: nowrap;
        padding: 8px 0;
    }

    .logo {
        order: 2;
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
    }

    /* إخفاء الشعار الكامل وإظهار المصغر على الموبايل */
    .logo-full {
        display: none !important;
    }

    .logo-mobile {
        display: block !important;
        height: 40px;
        width: auto;
    }

    .logo-img {
        height: 40px;
    }

    /* تحسين عرض بيانات المستخدم على الموبايل */
    .header-user-btn {
        padding: 6px 10px;
        gap: 8px;
    }

    .header-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .header-user-info {
        display: none;
    }

    .header-user-btn > svg {
        display: none;
    }

    /* تصغير أيقونة الإشعارات */
    .notifications-bell {
        padding: 6px;
    }

    .notifications-bell svg {
        width: 20px;
        height: 20px;
    }

    /* تحسين عرض الإحصائيات على الموبايل */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 24px 16px;
    }

    .stat-card-icon {
        width: 60px;
        height: 60px;
    }

    .stat-card-icon svg {
        width: 30px;
        height: 30px;
    }

    .stat-card-value {
        font-size: 1.75rem;
    }

    .stat-card-label {
        font-size: 0.9rem;
    }

    .videos-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .notifications-panel {
        width: 100%;
    }
}

/* دعم العرض الأفقي (Landscape) على الموبايل */
@media (max-height: 500px) and (orientation: landscape) {
    .header-inner {
        padding: 6px 0;
    }

    /* إظهار الشعار المصغر في العرض الأفقي */
    .logo-full {
        display: none !important;
    }

    .logo-mobile {
        display: block !important;
        height: 35px !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        padding: 6px !important;
    }

    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }

    .header-user-avatar {
        width: 28px;
        height: 28px;
    }

    .notifications-bell {
        padding: 4px;
    }

    .notifications-bell svg {
        width: 18px;
        height: 18px;
    }

    /* إخفاء معلومات المستخدم في العرض الأفقي */
    .header-user-info {
        display: none !important;
    }

    .header-user-btn > svg {
        display: none !important;
    }

    /* إخفاء القائمة الرئيسية في العرض الأفقي على الموبايل */
    .nav {
        display: none !important;
    }

    .header-cta .btn-login {
        display: none !important;
    }

    /* تحسين القائمة الجانبية في العرض الأفقي */
    .mobile-menu {
        width: 280px;
        max-width: 70vw;
    }

    .mobile-menu-header {
        padding: 8px 12px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--color-surface);
    }

    .mobile-menu-logo img {
        height: 30px;
    }

    .mobile-menu-close {
        padding: 4px;
    }

    .mobile-menu-close svg {
        width: 20px;
        height: 20px;
    }

    .mobile-menu-user {
        padding: 10px 12px;
    }

    .mobile-menu-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .mobile-menu-user-name {
        font-size: 0.9rem;
    }

    .mobile-menu-user-points {
        font-size: 0.75rem;
    }

    .mobile-menu-guest {
        padding: 10px 12px;
        gap: 8px;
    }

    .mobile-menu-guest .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .mobile-menu-nav {
        padding: 8px 0;
        overflow-y: auto;
        flex: 1;
    }

    .mobile-menu-nav-item {
        padding: 10px 12px;
        gap: 10px;
        font-size: 0.9rem;
    }

    .mobile-menu-nav-item svg {
        width: 18px;
        height: 18px;
    }

    .mobile-menu-divider {
        margin: 6px 12px;
    }

    .mobile-menu-footer {
        padding: 10px 12px;
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: var(--color-surface);
    }

    .mobile-menu-logout {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 10px;
    }

    .mobile-menu-logout svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .btn {
        padding: 12px 24px;
    }

    /* تحسين عرض الإحصائيات على الشاشات الصغيرة */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-card-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .stat-card-icon svg {
        width: 28px;
        height: 28px;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card-label {
        font-size: 0.85rem;
    }

    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-user-info {
        flex-direction: column;
    }

    .referral-link-input {
        flex-direction: column;
    }

    /* تحسين زر القائمة على الشاشات الصغيرة */
    .mobile-menu-btn {
        padding: 8px;
    }

    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }

    .logo-img {
        height: 36px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
