/* ============================================
   Results Popup - Full Screen Modal Styles
   وزارة التربية - نتائج الطلاب
   ============================================ */

/* Overlay */
.results-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 30%, #3182ce 60%, #4299e1 100%);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: overlayFadeIn 0.5s ease-out;
    overflow: hidden;
}

.results-popup-overlay.closing {
    animation: overlayFadeOut 0.5s ease-out forwards;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes overlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    animation: confettiFall 4s linear infinite;
}

.confetti:nth-child(1) { left: 5%; animation-delay: 0s; background: #FFD700; border-radius: 50%; }
.confetti:nth-child(2) { left: 15%; animation-delay: 0.5s; background: #FF6B6B; width: 8px; height: 8px; }
.confetti:nth-child(3) { left: 25%; animation-delay: 1s; background: #4ECDC4; border-radius: 2px; }
.confetti:nth-child(4) { left: 35%; animation-delay: 1.5s; background: #FFD700; }
.confetti:nth-child(5) { left: 45%; animation-delay: 0.3s; background: #FF6B6B; border-radius: 50%; }
.confetti:nth-child(6) { left: 55%; animation-delay: 0.8s; background: #4ECDC4; width: 12px; height: 12px; }
.confetti:nth-child(7) { left: 65%; animation-delay: 1.3s; background: #FFD700; border-radius: 2px; }
.confetti:nth-child(8) { left: 75%; animation-delay: 0.2s; background: #FF6B6B; }
.confetti:nth-child(9) { left: 85%; animation-delay: 0.7s; background: #4ECDC4; border-radius: 50%; }
.confetti:nth-child(10) { left: 95%; animation-delay: 1.2s; background: #FFD700; width: 6px; height: 6px; }
.confetti:nth-child(11) { left: 10%; animation-delay: 2s; background: #FF6B6B; }
.confetti:nth-child(12) { left: 30%; animation-delay: 2.5s; background: #4ECDC4; border-radius: 50%; }
.confetti:nth-child(13) { left: 50%; animation-delay: 3s; background: #FFD700; }
.confetti:nth-child(14) { left: 70%; animation-delay: 3.5s; background: #FF6B6B; border-radius: 2px; }
.confetti:nth-child(15) { left: 90%; animation-delay: 2.2s; background: #4ECDC4; }

@keyframes confettiFall {
    0% {
        top: -10%;
        transform: translateX(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotateZ(720deg);
        opacity: 0;
    }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #fff;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: #FFD700;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #fff;
    top: 50%;
    left: 5%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: #FFD700;
    top: 20%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

/* Close Button */
.results-popup-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.results-popup-close span {
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.results-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Main Card */
.results-popup-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 60px;
    max-width: 650px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
    animation: cardBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.results-popup-overlay.closing .results-popup-card {
    animation: cardBounceOut 0.5s ease-in forwards;
}

@keyframes cardBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(100px);
    }
    50% {
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cardBounceOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(100px);
    }
}

/* Card Decoration */
.card-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.decoration-line {
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.decoration-icon {
    margin: 0 15px;
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Icon Container */
.results-icon-container {
    margin-bottom: 5px;
}

.results-icon {
    display: inline-block;
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(26, 54, 93, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(26, 54, 93, 0.6));
    }
}

/* Title Styles */
.results-title-container {
    margin-bottom: 15px;
}

.results-subtitle {
    display: block;
    font-size: 18px;
    color: #3e93dc;
    margin-bottom: 10px;
    font-weight: 600;
}

.results-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a365d;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.results-year {
    margin-top: 10px;
}

.year-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a365d, #3182ce);
    color: #fff;
    padding: 8px 30px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

/* Description */
.results-description {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Buttons */
.results-buttons {
    margin-bottom: 25px;
}

.results-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .results-btn.primary {
        background: linear-gradient(135deg, #1d3b63, #3a8ed8);
        color: #fff;
        box-shadow: 0 10px 30px rgb(168 210 247) !important;
        animation: btnPulse 2s ease-in-out infinite;
    }

.results-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(72, 187, 120, 0.5);
}

.results-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(72, 187, 120, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(72, 187, 120, 0.6), 0 0 0 10px rgba(72, 187, 120, 0.1);
    }
}

.btn-icon {
    font-size: 26px;
}

.btn-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.results-btn:hover .btn-arrow {
    transform: translateX(-5px);
}

/* Skip Button */
.results-skip-btn {
    background: none;
    border: none;
    color: #718096;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.results-skip-btn:hover {
    color: #1a365d;
    background: rgba(26, 54, 93, 0.1);
}

.results-skip-btn svg {
    transition: transform 0.3s ease;
}

.results-skip-btn:hover svg {
    transform: translateX(-3px);
}

/* Footer */
.results-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.results-footer p {
    margin: 0;
    color: #a0aec0;
    font-size: 14px;
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .results-popup-card {
        padding: 35px 25px;
        margin: 20px;
        border-radius: 20px;
    }

    .results-title {
        font-size: 22px;
    }

    .results-subtitle {
        font-size: 14px;
    }

    .year-badge {
        font-size: 16px;
        padding: 6px 20px;
    }

    .results-description {
        font-size: 15px;
    }

    .results-btn {
        padding: 14px 35px;
        font-size: 18px;
    }

    .btn-icon {
        font-size: 22px;
    }

    .results-popup-close {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
    }

    .results-popup-close span {
        font-size: 24px;
    }

    .decoration-icon svg {
        width: 50px;
        height: 50px;
    }

    .results-icon svg {
        width: 70px;
        height: 70px;
    }

    .confetti {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    .results-popup-card {
        padding: 25px 20px;
    }

    .results-title {
        font-size: 24px;
    }

    .results-btn {
        padding: 12px 25px;
        font-size: 16px;
        width: 100%;
    }

    .card-decoration {
        display: none;
    }
}
.rotatee {
    direction: ltr;
    display: block;
}