/* ===== إعادة تعيين الأنماط العامة ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== تصميم الجسم الرئيسي ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== حاوية المحتوى الرئيسية ===== */
.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== بانر التحذير ===== */
.warning-banner {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

/* تأثير النبض للبانر */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ===== رأس الصفحة ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.8;
    font-size: 16px;
}

/* ===== بطاقة الرصيد ===== */
.balance-card {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.balance-card:hover {
    transform: translateY(-2px);
}

.balance-amount {
    font-size: 32px;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 212, 255, 0.3);
}

/* ===== قسم التقدم ===== */
.progress-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.progress-section h3 {
    margin-bottom: 15px;
    color: #00d4ff;
    text-align: center;
}

/* شريط التقدم */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#progressText {
    text-align: center;
    font-weight: bold;
    color: #00d4ff;
}

/* ===== قسم الإعلانات ===== */
.ads-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.ads-section h3 {
    margin-bottom: 10px;
    color: #00d4ff;
}

.ads-section p {
    margin-bottom: 20px;
    opacity: 0.8;
}

/* زر مشاهدة الإعلان */
.watch-ad-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.watch-ad-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.watch-ad-btn:hover::before {
    left: 100%;
}

.watch-ad-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.watch-ad-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.watch-ad-btn:disabled::before {
    display: none;
}

/* مؤقت الانتظار */
.timer {
    font-size: 24px;
    color: #ff6b6b;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

/* ===== قسم المهام ===== */
.tasks-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tasks-section h3 {
    margin-bottom: 15px;
    color: #00d4ff;
    text-align: center;
}

/* عنصر المهمة */
.task-item {
    background: #1a1a2e;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.task-item:hover {
    transform: translateX(5px);
}

.task-item strong {
    color: #00d4ff;
}

/* زر المهمة */
.task-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.task-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.task-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== قسم الإحالة ===== */
.referral-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.referral-section h3 {
    margin-bottom: 10px;
    color: #00d4ff;
    text-align: center;
}

.referral-section p {
    text-align: center;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* صندوق رابط الإحالة */
.referral-link-box {
    background: #1a1a2e;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    word-break: break-all;
    margin-top: 10px;
    text-align: center;
    border: 1px solid #00d4ff;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.referral-link-box:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.02);
}

/* ===== قسم السحب ===== */
.withdraw-section {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.3);
    transition: all 0.3s ease;
}

.withdraw-section.locked {
    background: linear-gradient(135deg, #555, #666);
    opacity: 0.6;
}

.withdraw-section h3 {
    margin-bottom: 10px;
    color: #ffffff;
}

.withdraw-section p {
    margin-bottom: 15px;
    opacity: 0.9;
}

/* زر السحب */
.withdraw-btn {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.withdraw-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.withdraw-btn:hover::before {
    left: 100%;
}

.withdraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.withdraw-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.withdraw-btn:disabled::before {
    display: none;
}

/* أيقونة القفل */
.lock-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

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

/* ===== إطار الإعلان ===== */
.ad-frame {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== الإشعارات ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: bold;
    max-width: 300px;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.notification.warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

/* ===== الإحصائيات ===== */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.stat-item {
    background: #1a1a2e;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.stat-item:hover {
    transform: scale(1.05);
    border-color: #00d4ff;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 2px 4px rgba(0, 212, 255, 0.3);
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

/* ===== واجهة طلب السحب ===== */
.withdraw-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.withdraw-modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.withdraw-modal h3 {
    margin-bottom: 20px;
    color: #00d4ff;
    font-size: 24px;
}

.withdraw-modal p {
    margin-bottom: 20px;
    line-height: 1.5;
    opacity: 0.9;
}

.modal-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin: 5px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

/* ===== تصميم متجاوب ===== */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
    
    .watch-ad-btn, .withdraw-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
    
    .notification {
        right: 10px;
        top: 10px;
        max-width: 250px;
    }
    
    .withdraw-modal-content {
        margin: 20px;
        padding: 25px;
    }
}

/* ===== تأثيرات إضافية ===== */
.glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* تأثير التحميل */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0099cc, #007acc);
}

/* ===== تأثيرات الانتقال ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

