@tailwind base;
@tailwind components;
@tailwind utilities;

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

body {
    font-family: 'Readex Pro', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: #f97316 #f1f5f9;
    transition: background-color 0.3s ease, color 0.3s ease;
    touch-action: manipulation;
}

/* منع التكبير التلقائي عند التركيز على الحقول في الايفون */
input, select, textarea {
    font-size: 16px !important;
}

/* Dark Mode Overrides */
.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .text-gray-900 {
    color: #f8fafc !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-600 {
    color: #94a3b8 !important;
}

.dark .text-gray-500 {
    color: #64748b !important;
}

.dark .border-gray-100, .dark .border-gray-200 {
    border-color: #334155 !important;
}

.dark .bg-gray-50, .dark .bg-gray-100 {
    background-color: #0f172a !important;
}

.dark .shadow-sm, .dark .shadow-elegant {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
    body {
        padding-bottom: 90px;
    }
}

/* Custom Scrollbar */
*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: #f1f5f9;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f97316, #fb923c);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ea580c, #f97316);
}

/* Custom Utilities */
.gradient-text {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass-effect {
    background: rgba(30, 41, 59, 0.7);
}

.shadow-elegant {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Skeleton Loader */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* Animations */
@keyframes bounce-in {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-bounce-in {
    animation: bounce-in 0.6s ease;
}

@keyframes bounce-short {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.animate-bounce-short {
    animation: bounce-short 2s ease-in-out infinite;
}

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

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

@keyframes notification-slide-up {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes notification-slide-down {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, 100px); opacity: 0; }
}
