/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #030814;
    background-image: url(BG.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-size: 65%;
    background-position: center;
    overflow-x: hidden;
    position: relative;
}

/* .fetch {
    z-index: 9999;
    color: #fff;
    text-align: center;
    display: flex;
} */

.success-result,
.order-receipt,
.error-result {
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    line-height: 1.6;
}

.success-result h3,
.order-receipt h4,
.error-result h3 {
    color: #fff;
    margin-bottom: 10px;
}

.sendEmail {
    color: red;
}

.error-result h3 {
    color: #ff4c4c;
    /* لون خاص للأخطاء */
}

/* Main Page Container */
#redeem__page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 80vh;
    padding: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Redeem Container */
.redeem__container {
    background-color: #030814;
    border: 4px solid #091128;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* Content Styling */
.redeem__content h2 {
    color: #244DFE;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-align: center;
    font-weight: bold;
    margin: 0 0 30px 0;
    padding: 0;
}

/* Form Styling */
.forme__redeem {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.forme__redeem input {
    border: none;
    padding: 20px;
    background-color: #091128;
    border: 4px solid #0c183b;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
}

.forme__redeem input:focus {
    border-color: #244DFE;
    box-shadow: 0 0 10px rgba(36, 77, 254, 0.3);
}

.forme__redeem input::placeholder {
    color: #244DFE;
    font-size: 1rem;
    opacity: 0.8;
}

.forme__redeem button {
    cursor: pointer;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: none;
    background-color: #244DFE;
    color: #fff;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
}

.forme__redeem button:hover {
    background-color: #1e3fd4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(36, 77, 254, 0.4);
}

.forme__redeem button:active {
    transform: translateY(0);
}

/* Result Display */
#result {
    text-align: center;
    padding-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    min-height: 30px;
}

.spinner-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    z-index: 99;
    background-color: #030814;
    backdrop-filter: blur(5px);
}

.spinner-box.show {
    display: flex;
}

.spinner-box p {
    color: #fff;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: bold;
    margin-top: 30px;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

.spinner-container {
    position: fixed;
    top: 40%;
    left: 47%;
    transform: translate(-50%, -50%);
}


.leo-border-1 {
    position: absolute;
    width: 150px;
    height: 150px;
    padding: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(0deg, rgba(28, 41, 223, 0.1) 33%, rgb(2, 15, 124) 100%);
    animation: spin3D 1.8s linear infinite;
}

.leo-core-1 {
    width: 100%;
    height: 100%;
    background-color: #244DFE;
    opacity: 0.3;
    border-radius: 50%;
}

.leo-border-2 {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 15px;
    left: 15px;
    padding: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(0deg, rgba(12, 4, 90, 0.452) 33%, rgb(0, 9, 90) 100%);
    animation: spin3D 2.2s linear infinite reverse;
}

.leo-core-2 {
    width: 100%;
    height: 100%;
    background-color: #091128;
    opacity: 0.5;
    border-radius: 50%;
}

/* Animations */
@keyframes spin3D {
    from {
        transform: rotate3d(0.5, 0.5, 0.5, 0deg);
    }

    to {
        transform: rotate3d(0.5, 0.5, 0.5, 360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Hide/Show States */
.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    #redeem__page {
        padding: 15px;
    }

    .redeem__container {
        padding: 30px 20px;
        border-width: 2px;
        width: 100%;
        max-width: 400px;
    }

    .forme__redeem input,
    .forme__redeem button {
        padding: 15px;
        font-size: 0.9rem;
    }

    .spinner-container {
        width: 120px;
        height: 120px;
    }

    .leo-border-1 {
        width: 120px;
        height: 120px;
    }

    .leo-border-2 {
        width: 100px;
        height: 100px;
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    #redeem__page {
        padding: 10px;
    }

    .redeem__container {
        padding: 25px 15px;
        width: 100%;
        max-width: 320px;
    }

    .forme__redeem input,
    .forme__redeem button {
        padding: 12px;
        font-size: 0.85rem;
    }

    .spinner-container {
        width: 100px;
        height: 100px;
    }

    .leo-border-1 {
        width: 100px;
        height: 100px;
    }

    .leo-border-2 {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .redeem__container {
        border-width: 6px;
    }

    .forme__redeem input {
        border-width: 3px;
    }
}