* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #1b2838; color: #c7d5e0; font-family: 'Rajdhani', sans-serif; }

.header { text-align: center; padding: 50px 20px; background: linear-gradient(to bottom, #171a21, #1b2838); }
.header h1 { font-size: 3.5rem; color: #fff; }
.header h1 span { color: #66c0f4; }


#gameSearch {
    width: 90%; max-width: 500px; padding: 12px 20px; margin-top: 25px;
    background: #101822; border: 1px solid #66c0f4; border-radius: 4px;
    color: white; font-size: 16px; outline: none;
}

.game-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; padding: 40px; max-width: 1300px; margin: 0 auto;
}

.game-card {
    background: #16202d; border-radius: 4px; overflow: hidden;
    transition: transform 0.3s; border-bottom: 3px solid transparent; cursor: pointer;
}
.game-card:hover { transform: scale(1.05); border-bottom: 3px solid #66c0f4; }
.game-card img { width: 100%; height: 280px; object-fit: cover; }
.game-card h3 { padding: 15px; text-align: center; text-transform: uppercase; }

.container { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.card { background: #171a21; width: 90%; max-width: 500px; padding: 30px; border-radius: 8px; text-align: center; }
.game-poster { width: 100%; border-radius: 5px; margin-bottom: 15px; }

.status-bar { width: 100%; height: 8px; background: #000; margin: 20px 0; border-radius: 4px; overflow: hidden; }
.progress { width: 0%; height: 100%; background: #66c0f4; transition: width 0.5s; }

.action-btn {
    display: block; width: 100%; padding: 15px; background: linear-gradient(to right, #47bfff, #1a44c2);
    color: white; text-decoration: none; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px;
}
.back-btn { position: absolute; top: 20px; left: 20px; background: none; border: 1px solid #444; color: #fff; padding: 8px 15px; cursor: pointer; }
/* تحسينات الهواتف والشاشات الصغيرة */
@media (max-width: 768px) {
    /* تصغير حجم الهيدر */
    .header {
        padding: 30px 15px;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    /* تعديل شبكة الألعاب لتناسب الموبايل */
    .game-grid {
        grid-template-columns: repeat(2, 1fr); /* عرض لعبتين في الصف الواحد */
        gap: 10px;
        padding: 15px;
    }

    .game-card h3 {
        font-size: 0.9rem;
        padding: 10px 5px;
    }

    .game-card img {
        height: 200px; /* تقليل ارتفاع الصورة في الموبايل */
    }

    /* تحسين صفحة التحميل والبطاقة (Card) */
    .card {
        padding: 20px;
        width: 95%;
    }

    #gameTitle {
        font-size: 1.5rem;
    }

    .back-btn {
        top: 10px;
        left: 10px;
        font-size: 0.8rem;
    }
}

/* للهواتف الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr); /* بقاء لعبتين لضمان شكل احترافي */
    }
    
    #gameSearch {
        width: 100%;
        font-size: 16px; /* لمنع الزووم التلقائي في الآيفون */
    }
}
/* تنسيق حاوية الكابتشا */
#captchaContainer {
    background: rgba(255, 255, 255, 0.05); /* خلفية خفيفة جداً لتحديد المنطقة */
    border: 1px dashed #444; /* إطار متقطع لإعطاء شعور بمنطقة الأمان */
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in-out; /* تأثير ظهور ناعم */
}

/* تحسين شكل النص فوق الكابتشا */
#verifyText {
    font-family: 'Rajdhani', sans-serif;
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* تأثير النبض للزر لجذب الانتباه قبل النقر */
.verify-btn {
    background: linear-gradient(90deg, #00ff00, #008000) !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    border: none;
    animation: pulse 2s infinite;
}

/* الأنيميشن */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

/* تنسيق إضافي للكابتشا نفسها لضمان توسطها */
[data-captcha-enable="true"] {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
}