:root {
    --primary-red: #ce1126;
    --primary-black: #1a1a1a;
    --primary-white: #ffffff;
    --accent-gold: #596c50; /* Olive Green */
    --accent-gold-light: #f3f6f1;
    --body-bg: #f4f7f2;
    /* Light elegant warm theme */
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: rgba(89, 108, 80, 0.2);
    --shadow-color: rgba(89, 108, 80, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin: 0;
    direction: rtl;
    background: var(--body-bg);
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient glowing background blobs (warm tones for light mode) */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(206, 17, 38, 0.04) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
    animation: floatGlow 15s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(89, 108, 80, 0.05) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
    animation: floatGlow 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(40px) scale(1.1);
    }
}

/* Dynamic abstract background grid */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(rgba(89, 108, 80, 0.03) 1px, transparent 1px),
        radial-gradient(rgba(206, 17, 38, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    z-index: 0;
    pointer-events: none;
}

/* ===== شاشة التحميل (Loading Screen) ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #faf8f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.8s ease;
    gap: 2rem;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #fcfbf9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(184, 142, 58, 0.12), inset 0 0 15px rgba(255, 255, 255, 0.8);
    border: 2px solid var(--accent-gold);
    padding: 12px;
    animation: logoPulse 2.5s ease-in-out infinite;
    z-index: 2;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.loading-logo-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px dashed rgba(184, 142, 58, 0.25);
    border-radius: 50%;
    animation: spinRing 12s linear infinite;
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(184, 142, 58, 0.12);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(184, 142, 58, 0.22), 0 0 15px rgba(206, 17, 38, 0.1);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(184, 142, 58, 0.12);
    }
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 1px;
    animation: textFade 1.5s ease-in-out infinite alternate;
}

@keyframes textFade {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.loading-bar-wrapper {
    width: 240px;
    height: 4px;
    background: rgba(184, 142, 58, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.01);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-gold), var(--primary-black));
    border-radius: 10px;
    animation: loadBar 2.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes loadBar {
    0% {
        width: 0%;
    }

    30% {
        width: 35%;
    }

    60% {
        width: 65%;
    }

    85% {
        width: 90%;
    }

    100% {
        width: 100%;
    }
}

/* ===== البطاقة الرئيسية (Main Card) ===== */
.waiting-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 32px;
    box-shadow:
        0 30px 60px rgba(184, 142, 58, 0.06),
        0 10px 25px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 680px;
    width: 100%;
    padding: 3.5rem 3rem 3rem;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waiting-card:hover {
    transform: translateY(-5px);
    border-color: rgba(184, 142, 58, 0.35);
    box-shadow:
        0 40px 80px rgba(184, 142, 58, 0.1),
        0 15px 35px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* الشعار والاسم */
.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.2rem;
}

.logo-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #ffffff 0%, #faf8f5 100%);
    box-shadow:
        0 15px 35px rgba(184, 142, 58, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        0 0 15px rgba(184, 142, 58, 0.05);
    border: 2px solid var(--accent-gold);
    transition: all 0.4s ease;
    padding: 14px;
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid rgba(184, 142, 58, 0.15);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.logo-icon:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--primary-red);
    box-shadow:
        0 20px 45px rgba(184, 142, 58, 0.18),
        0 0 25px rgba(206, 17, 38, 0.1);
}

.logo-icon:hover::before {
    border-color: rgba(206, 17, 38, 0.2);
    transform: scale(1.05);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-text .gov-name {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(184, 142, 58, 0.1);
}

.logo-text .gov-name .red {
    color: var(--primary-red);
}

.logo-text .gov-name .gold {
    color: var(--accent-gold);
}

.logo-text .gov-sub {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text .gov-sub::before,
.logo-text .gov-sub::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.5;
}

/* شريط العلم */
.flag-divider {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 1.5rem auto;
    width: 120px;
    height: 5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.flag-divider span {
    flex: 1;
}

.flag-divider .red {
    background: var(--primary-red);
}

.flag-divider .white {
    background: #ffffff;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.flag-divider .black {
    background: #111;
}

/* العنوان */
.main-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.main-title i {
    color: var(--accent-gold);
    font-size: 1.4rem;
}

.sub-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2.2rem;
    line-height: 1.7;
}

.sub-description i {
    color: var(--primary-red);
    margin-left: 0.4rem;
    opacity: 0.8;
}

/* بطاقة البريد الإلكتروني */
.email-card {
    background: rgba(184, 142, 58, 0.03);
    border-radius: 50px;
    padding: 0.9rem 2.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(184, 142, 58, 0.1);
    margin-bottom: 2.2rem;
    font-size: 1.1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    flex-wrap: wrap;
    justify-content: center;
}

.email-card:hover {
    border-color: var(--accent-gold);
    background: rgba(184, 142, 58, 0.06);
    box-shadow: 0 8px 25px rgba(184, 142, 58, 0.08);
    transform: translateY(-2px);
}

.email-card i.fa-envelope {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.email-card span {
    font-weight: 600;
    direction: ltr;
    unicode-bidi: embed;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.email-card .verified {
    color: #10b981;
    font-size: 0.9rem;
    animation: pulseOpacity 2s infinite ease-in-out;
}

@keyframes pulseOpacity {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* مؤشر الانتظار */
.status-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 2.2rem;
}

.status-dots {
    display: flex;
    gap: 0.8rem;
}

.status-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 1.6s infinite ease-in-out;
}

.status-dots span:nth-child(1) {
    background: var(--primary-red);
    animation-delay: 0s;
}

.status-dots span:nth-child(2) {
    background: var(--accent-gold);
    animation-delay: 0.3s;
}

.status-dots span:nth-child(3) {
    background: var(--text-muted);
    animation-delay: 0.6s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.4);
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

/* قسم الاتصال */
.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid rgba(184, 142, 58, 0.1);
    margin-top: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.contact-item:hover {
    color: var(--text-main);
}

.contact-item i {
    color: var(--accent-gold);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.15);
    color: var(--primary-red);
}

.contact-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--accent-gold);
}

/* الدومين الجديد */
.domain-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    direction: ltr;
    unicode-bidi: embed;
    margin-top: 1.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(184, 142, 58, 0.04);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(184, 142, 58, 0.08);
}

.domain-badge i {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.domain-badge a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.domain-badge a:hover {
    color: var(--accent-gold);
}

/* عناصر زخرفية */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.02;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-red);
    top: -100px;
    right: -100px;
}

.bg-shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-gold);
    bottom: -80px;
    left: -80px;
}

.waiting-card>* {
    position: relative;
    z-index: 2;
}

/* ===== تحسينات للهواتف ===== */
@media (max-width: 600px) {
    body {
        padding: 1rem;
        align-items: center;
    }

    .waiting-card {
        padding: 2.5rem 1.5rem 2rem;
        border-radius: 24px;
    }

    .logo-icon {
        width: 110px;
        height: 110px;
        padding: 10px;
    }

    .logo-text .gov-name {
        font-size: 1.8rem;
    }

    .logo-text .gov-sub {
        font-size: 0.8rem;
    }

    .flag-divider {
        width: 90px;
        height: 4px;
    }

    .main-title {
        font-size: 1.4rem;
    }

    .sub-description {
        font-size: 0.95rem;
        margin-bottom: 1.8rem;
    }

    .email-card {
        font-size: 0.95rem;
        padding: 0.7rem 1.5rem;
        border-radius: 40px;
        margin-bottom: 1.8rem;
    }

    .status-dots span {
        width: 10px;
        height: 10px;
    }

    .contact-section {
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .contact-item {
        font-size: 0.8rem;
    }

    .domain-badge {
        font-size: 0.75rem;
        margin-top: 1.2rem;
    }

    /* تحميل للهواتف */
    .loading-logo-container {
        width: 110px;
        height: 110px;
    }

    .loading-logo {
        width: 95px;
        height: 95px;
        padding: 10px;
    }

    .loading-logo-ring {
        width: 110px;
        height: 110px;
    }

    .loading-text {
        font-size: 1rem;
    }

    .loading-bar-wrapper {
        width: 180px;
    }
}

@media (max-width: 400px) {
    .waiting-card {
        padding: 2rem 1rem 1.5rem;
    }

    .logo-text .gov-name {
        font-size: 1.4rem;
    }

    .logo-icon {
        width: 95px;
        height: 95px;
    }

    .main-title {
        font-size: 1.2rem;
    }

    .sub-description {
        font-size: 0.85rem;
    }

    .email-card {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .contact-item {
        font-size: 0.75rem;
    }
}

/* تحسين اللمس على الهواتف */
@media (hover: none) {
    .waiting-card:hover {
        transform: none;
    }

    .email-card:hover {
        transform: none;
    }

    .logo-icon:hover {
        transform: none;
    }