/* style.css */

/* الإعدادات العامة والمتغيرات */
:root {
    --primary-color: #5c6bc0;     /* اللون البنفسجي الأساسي */
    --secondary-color: #7986cb;   /* اللون البنفسجي الفاتح */
    --accent-color: #26a69a;      /* اللون الأخضر للنتائج */
    --bg-color: #f8faff;          /* خلفية الصفحة */
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    justify-content: center;
    padding-top: 50px;
    direction: rtl; /* التوجيه من اليمين لليسار */
    -webkit-font-smoothing: antialiased; /* تحسين جودة الخط على الماك والآيفون */
}

/* البطاقة المركزية */
.main-card {
    width: 90%;
    max-width: 400px;
    text-align: center;
    padding-bottom: 50px;
}

/* --- قسم الشعار والأنميشن المطور (3D) --- */
.logo-container {
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 20px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    
    /* تفعيل المنظور ثلاثي الأبعاد */
    perspective: 800px; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

/* تأثير مرور الماوس (ويندوز) */
.logo-container:hover {
    /* الإمالة للجانب والداخل كما في الصورة الثانية */
    transform: rotateX(10deg) rotateY(-10deg) translateZ(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* تأثير اللمس (أندرويد وآيفون) */
.logo-container:active {
    transform: rotateX(8deg) rotateY(-8deg) scale(0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.logo-container img {
    width: 85%;
    height: auto;
    display: block;
}

/* --- النصوص والعناوين --- */
h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 10px;
}

.desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* --- الأزرار وحقول الإدخال --- */
.btn {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.3);
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    transition: 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

input[type="tel"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Tajawal';
    font-size: 18px;
    box-sizing: border-box;
    margin-bottom: 10px;
    outline: none;
    text-align: center;
    transition: border-color 0.3s;
}

input[type="tel"]:focus {
    border-color: var(--primary-color);
}

/* --- اللودينج (Spinner) --- */
.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 25px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- بطاقة نتائج الحوالات --- */
.result-box {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: right;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    border-right: 6px solid var(--accent-color);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box p {
    margin: 8px 0;
    font-size: 15px;
    color: #444;
}

.result-box strong {
    color: var(--primary-color);
}

/* ملاحظات إضافية للتجاوب */
@media (max-width: 480px) {
    body {
        padding-top: 30px;
    }
    h1 {
        font-size: 20px;
    }
}