/* أنماط قسم المنافسة المحسّنة */
.competition-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    direction: rtl;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(30, 144, 255, 0.3);
}

.competition-section:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.competition-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, dodgerblue, #4CAF50, #FFC107);
    z-index: 1;
}

.competition-section h3 {
    color: #0039a6;
    margin-bottom: 25px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.competition-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #FFC107;
}

.competition-section p {
    color: #444;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

/* أنماط الأزرار */
#competitionButton {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

#competitionButton::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    transform: translateX(-100%);
    transition: all 0.6s ease;
    z-index: -1;
}

#competitionButton:hover::before {
    transform: translateX(0);
}

#competitionButton:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* أنماط زر المشاركة */
.btn-success {
    background: linear-gradient(45deg, #43a047, #2e7d32);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #2e7d32, #1b5e20);
}

/* أنماط زر الدخول */
.btn-primary {
    background: linear-gradient(45deg, #1976d2, #0d47a1);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0d47a1, #01579b);
}

/* تأثيرات الأيقونات */
#competitionButton i {
    margin-right: 8px;
    transition: all 0.3s ease;
}

#competitionButton:hover i {
    transform: scale(1.2);
}

/* تأثيرات التحول والحركة */
@keyframes buttonSuccessToInfo {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    80% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.button-transform {
    animation: buttonSuccessToInfo 0.8s forwards;
}

/* تأثير النجاح */
.success-indicator {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #FFC107;
    opacity: 0;
    z-index: 0;
}

@keyframes successRipple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(100);
        opacity: 0;
    }
}

/* إشعار النجاح المخصص */
.custom-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.custom-notification.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.custom-notification.success {
    background-color: #4CAF50;
}

.custom-notification.error {
    background-color: #F44336;
}

/* تأثير خلفية القسم عند النجاح */
@keyframes successBackground {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.success-background {
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.9), rgba(236, 255, 236, 0.9), rgba(255, 255, 255, 0.9));
    background-size: 300% 100%;
    animation: successBackground 2s ease forwards;
}

/* تأثير الإطار عند النجاح */
.success-border {
    border-color: #4CAF50;
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.1);
}

/* تأثيرات إضافية للنجاح */
@keyframes celebrationConfetti {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(100px) rotate(720deg);
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    z-index: 9;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 16px;
    background-color: #FFC107;
    opacity: 0;
    z-index: 9;
    animation: celebrationConfetti 1.5s ease-out forwards;
}
