/* ============================================
   MUHIBES GAME - STYLE.CSS
   تصميم إسلامي حديث مع أنميشن
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #0b1a33 0%, #1a2f4f 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   الخلفية الإسلامية بالنجوم والهلال
   ============================================ */

/* النقش الإسلامي */
.islamic-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
}

/* حاوية الهلال والنجوم */
.crescent-container {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* شكل الهلال */
.crescent {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 
        -15px -5px 0 5px rgba(255, 215, 0, 0.2),
        -20px -8px 0 8px rgba(255, 215, 0, 0.1);
    transform: rotate(-15deg);
}

/* النجوم الصغيرة */
.small-stars {
    position: absolute;
    top: 30px;
    left: 60px;
    width: 100%;
    height: 100%;
}

.small-stars::before,
.small-stars::after {
    content: "✨";
    position: absolute;
    font-size: 20px;
    color: rgba(255, 215, 0, 0.3);
    animation: twinkle 4s ease-in-out infinite;
}

.small-stars::before {
    top: 0;
    right: 20px;
    animation-delay: 1s;
}

.small-stars::after {
    bottom: 20px;
    left: 40px;
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* نجمة متحركة إضافية */
@keyframes float-star {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(120deg); }
    66% { transform: translate(-5px, 5px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ============================================
   المكونات الرئيسية
   ============================================ */

/* البطاقات الزجاجية */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* الشاشات */
.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

/* النص العربي */
.arabic-text {
    font-family: 'Amiri', serif;
}

/* ============================================
   عناصر اللعبة
   ============================================ */

/* شبكة الأيادي */
.hands-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

/* أزرار الأيادي */
.hand-btn {
    aspect-ratio: 1;
    border-radius: 0.75rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: default;
}

/* أحجام مختلفة للشاشات */
@media (min-width: 640px) {
    .hand-btn {
        font-size: 2.5rem;
        border-radius: 1rem;
    }
}

@media (min-width: 768px) {
    .hand-btn {
        font-size: 3rem;
        border-radius: 1.25rem;
    }
}

/* أيادي قابلة للنقر */
.hand-btn.clickable {
    cursor: pointer;
    animation: gentlePulse 2s infinite;
}

.hand-btn.clickable:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    }
    50% { 
        transform: scale(1.03); 
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    }
}

/* التوهج الذهبي */
.gold-glow {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* ============================================
   التنبيهات والرسائل
   ============================================ */

/* التنبيهات المخصصة */
.toast-custom {
    background: rgba(255, 255, 255, 0.98);
    border-right: 4px solid;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    max-width: 100%;
    transform: translateX(100%);
    animation: slideInRight 0.3s forwards;
    transition: all 0.3s;
    font-size: 0.9rem;
}

@media (min-width: 640px) {
    .toast-custom {
        padding: 1rem 1.5rem;
        margin-bottom: 0.75rem;
        min-width: 300px;
        font-size: 1rem;
        border-right-width: 5px;
    }
}

.toast-custom:hover {
    transform: scale(1.01) translateX(0);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

@keyframes slideInRight {
    to { transform: translateX(0); }
}

.toast-custom.exit {
    animation: slideOutLeft 0.3s forwards;
}

@keyframes slideOutLeft {
    to { transform: translateX(-100%); }
}

/* النقاط المتوهجة للانتظار */
.dot-floating {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background-color: #ffd700;
    animation: gentleFloat 3s infinite;
}

@media (min-width: 640px) {
    .dot-floating {
        width: 10px;
        height: 10px;
    }
}

@keyframes gentleFloat {
    0% { transform: translateX(0) scale(1); opacity: 1; }
    25% { transform: translateX(15px) scale(1.1); opacity: 0.8; }
    50% { transform: translateX(-15px) scale(0.9); opacity: 0.6; }
    75% { transform: translateX(15px) scale(1.1); opacity: 0.8; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* ============================================
   روابط الحقوق
   ============================================ */

/* روابط مخصصة */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   التصميم المتجاوب المحسن
   ============================================ */

/* للهواتف الصغيرة */
@media (max-width: 400px) {
    .hands-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem;
    }
    
    .hand-btn {
        font-size: 1.5rem;
        border-radius: 0.5rem;
    }
    
    .glass-card {
        padding: 1rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
}

/* للهواتف المتوسطة */
@media (min-width: 401px) and (max-width: 480px) {
    .hands-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem;
    }
    
    .hand-btn {
        font-size: 1.75rem;
    }
}

/* للأجهزة اللوحية */
@media (min-width: 768px) and (max-width: 1024px) {
    .hands-grid {
        gap: 1rem;
    }
    
    .hand-btn {
        font-size: 2.5rem;
    }
}

/* ============================================
   تأثيرات إضافية
   ============================================ */

/* تأثير النقر على الأزرار */
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* تأثير التوهج عند التركيز */
input:focus {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* إخفاء العناصر */
.hidden {
    display: none !important;
}

/* شريط التمرير المخصص */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* منع تحديد النص */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}
