:root {
    /* Light Theme Colors */
    --bg-light: #FDFDFD;
    --text-light: #1a1a1a;
    --primary-light: #D94D44; /* Red */
    --secondary-light: #DA8C43; /* Skin Tone */
    --accent-light: #5B9B62; /* Green */
    --card-bg-light: rgba(255, 255, 255, 0.7);
    --shadow-light: rgba(0, 0, 0, 0.08);

    /* Dark Theme Colors */
    --bg-dark: #121212;
    --text-dark: #FDFDFD;
    --primary-dark: #E06B62; /* Lighter Red */
    --secondary-dark: #E0A462; /* Lighter Skin Tone */
    --accent-dark: #7CC885; /* Lighter Green */
    --card-bg-dark: rgba(30, 30, 30, 0.7);
    --shadow-dark: rgba(0, 0, 0, 0.2);

    --font-primary: 'Poppins', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    margin: 0;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
}

body.light-theme {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Ensure Arabic font for body and form elements */
[lang="ar"] body,
[lang="ar"] input,
[lang="ar"] textarea,
[lang="ar"] button {
    font-family: var(--font-arabic) !important;
}

/* Interactive Gradient Background */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    -webkit-filter: blur(100px);
    pointer-events: none; /* Ensure clicks pass through parent */
}

.blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Ensure clicks pass through individual blob containers */
}

.blob {
    position: absolute;
    border-radius: 50%;
    transition: transform 0.2s ease-out;
    pointer-events: none; /* Ensure clicks pass through individual blobs */
}

.blob1 {
    width: 600px; 
    height: 600px;
    background-color: var(--primary-light);
    top: 10%;
    left: 10%;
}

.blob2 {
    width: 250px; 
    height: 250px;
    background-color: var(--secondary-light);
    top: 60%;
    left: 70%;
}

.blob3 {
    width: 100px;
    height: 100px;
    background-color: var(--accent-light);
    top: 40%;
    left: 40%;
}

.blob-container { animation: move 20s infinite alternate; }
.blob-container:nth-child(2) { animation-duration: 25s; animation-direction: alternate-reverse; }
.blob-container:nth-child(3) { animation-duration: 15s; }


body.dark-theme .blob1 { background-color: var(--primary-dark); }
body.dark-theme .blob2 { background-color: var(--secondary-dark); }
body.dark-theme .blob3 { background-color: var(--accent-dark); }

@keyframes move {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.3); }
}


/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Needed for z-index to work */
    z-index: 100; /* Ensure header is on top */
}

.logo {
    height: 120px; 
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher button {
    background: none;
    border: 1px solid transparent;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    color: inherit;
    opacity: 0.7;
}

.lang-switcher button.active {
    border-color: var(--primary-light);
    opacity: 1;
}

body.dark-theme .lang-switcher button.active {
    border-color: var(--primary-dark);
}

.theme-switcher {
    width: 50px;
    height: 25px;
    border-radius: 25px;
    padding: 3px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.4s ease;
}

body.light-theme .theme-switcher { background-color: #e0e0e0; }
body.dark-theme .theme-switcher { background-color: #444; }

.switch {
    width: 19px;
    height: 19px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

body.dark-theme .switch {
    transform: translateX(25px);
}

/* Main Content */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 220px);
    padding: 20px 5%;
    position: relative; /* Needed for z-index to work */
    z-index: 100; /* Ensure main content is on top */
}

.content-wrapper {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

/* Hero Section */
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    opacity: 0.8;
}

/* Early Bird Signup Section */
.early-bird-signup-section {
    background: var(--card-bg-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 3rem;
    position: relative; /* Ensure it creates a new stacking context */
    z-index: 100; /* Ensure this section is also on top */
}

body.dark-theme .early-bird-signup-section {
    background: var(--card-bg-dark);
    box-shadow: 0 10px 30px var(--shadow-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.early-bird-signup-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.early-bird-signup-section p {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    opacity: 0.8;
}

.signup-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.signup-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: transparent;
    border: 2px solid var(--primary-light);
    color: var(--primary-light);
}

body.dark-theme .signup-btn {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.signup-btn:hover {
    background-color: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

body.dark-theme .signup-btn:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

.signup-btn i {
    font-size: 1.2rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-dark);
    opacity: 0.6;
    margin: 10px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid;
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .divider {
    color: var(--text-light);
}

body.light-theme .divider::before, body.light-theme .divider::after {
    border-color: rgba(0, 0, 0, 0.1);
}

.divider:not(:empty)::before {
    margin-right: .25em;
}

.divider:not(:empty)::after {
    margin-left: .25em;
}

.email-signup {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#email-signup-input, #password-signup-input {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid;
    font-size: 1rem;
    transition: all 0.4s ease;
    background-color: transparent;
    width: calc(100% - 30px); /* Adjust for padding */
}

body.light-theme #email-signup-input,
body.light-theme #password-signup-input {
    border-color: #e0e0e0;
    color: var(--text-light);
}

body.dark-theme #email-signup-input,
body.dark-theme #password-signup-input {
    border-color: #444;
    color: var(--text-dark);
}

.signup-success-message {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--accent-light);
    color: #fff;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.dark-theme .signup-success-message {
    background-color: var(--accent-dark);
}

.signup-success-message strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-section {
    background: var(--card-bg-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative; /* Ensure it creates a new stacking context */
    z-index: 100; /* Ensure this section is also on top */
}

body.dark-theme .contact-section {
    background: var(--card-bg-dark);
    box-shadow: 0 10px 30px var(--shadow-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    width: 50%;
}

#contact-form input, #contact-form textarea {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid;
    font-size: 1rem;
    transition: all 0.4s ease;
    background-color: transparent;
}

body.light-theme #contact-form input,
body.light-theme #contact-form textarea {
    border-color: #e0e0e0;
    color: var(--text-light);
}

body.dark-theme #contact-form input,
body.dark-theme #contact-form textarea {
    border-color: #444;
    color: var(--text-dark);
}

.robot-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

button[type="submit"] {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-light);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

body.dark-theme button[type="submit"] { background-color: var(--primary-dark); }

button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styling for invalid input fields */
input.invalid {
    border-color: #e74c3c !important; /* Red border */
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

/* Counter Section */
.counter-section {
    margin-top: 3rem;
    position: relative; /* Ensure it creates a new stacking context */
    z-index: 100; /* Ensure this section is also on top */
}

.gauge-container {
    position: relative;
    width: 150px;
    height: 75px;
    margin: 1rem auto;
    overflow: hidden;
}

.gauge-arc-background, .gauge-arc-fill {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 15px solid;
    box-sizing: border-box;
    transform: rotate(45deg);
}

.gauge-arc-background {
    border-color: #eee;
    border-bottom-color: transparent;
    border-right-color: transparent;
}
.gauge-arc-fill {
    border-color: var(--accent-light);
    border-bottom-color: transparent;
    border-right-color: transparent;
    transform-origin: center;
    transition: transform 1s ease-out;
    transform: rotate(45deg); /* Start at 0% */
}

body.dark-theme .gauge-arc-background { border-color: #444; border-bottom-color: transparent; border-right-color: transparent;}
body.dark-theme .gauge-arc-fill { border-color: var(--accent-dark); border-bottom-color: transparent; border-right-color: transparent;}

.gauge-value {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: 700;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 5%;
    margin-top: 4rem;
    position: relative; /* Needed for z-index to work */
    z-index: 100; /* Ensure footer is on top */
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: inherit;
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
    font-size: 24px;
}
.social-links a:hover {
    opacity: 1;
}

.powered-by-link {
    text-decoration: none;
    color: inherit;
}

.copyright, .powered-by {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    margin-top: 0.5rem;
}

.copyright-logo {
    height: 20px;
}

.asdaa-logo {
    height: 16px;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
}

/* RTL Adjustments */
[dir="rtl"] { text-align: right; }
[dir="rtl"] header { flex-direction: row-reverse; }
[dir="rtl"] .form-group { text-align: right; }
[dir="rtl"] .robot-check { align-self: flex-end; }
[dir="rtl"] .switch { transform: translateX(0); }
[dir="rtl"] .dark-theme .switch { transform: translateX(-25px); }

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
    .form-row .form-group {
        width: 100%;
        box-sizing: border-box;
    }
    .signup-options {
        width: 100%;
    }
}
