:root {
    /* Light Theme Colors (Blue & Orange) */
    --bg-light: #f0f4f8;
    --text-light: #1a1a1a;
    --primary-light: #0077b6; /* Blue */
    --secondary-light: #fb8500; /* Orange */
    --accent-light: #023047; /* Dark Blue */
    --card-bg-light: rgba(255, 255, 255, 0.7);
    --shadow-light: rgba(0, 0, 0, 0.08);

    /* Dark Theme Colors (Blue & Orange) */
    --bg-dark: #121212;
    --text-dark: #FDFDFD;
    --primary-dark: #00a8e8; /* Lighter Blue */
    --secondary-dark: #ffb703; /* Lighter Orange */
    --accent-dark: #90e0ef; /* Lightest Blue */
    --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;
    --white-color: #FFFFFF;
}

/* 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 buttons follow font for both languages */
button {
    font-family: inherit;
}

[lang="ar"] body, [lang="ar"] input, [lang="ar"] textarea, [lang="ar"] button {
    font-family: var(--font-arabic);
}

/* 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);
}

.blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.blob {
    position: absolute;
    border-radius: 50%;
    transition: transform 0.2s ease-out;
}

.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; /* Reduced size */
    height: 100px; /* Reduced size */
    background-color: var(--secondary-light); /* Changed to orange */
    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(--secondary-dark); } /* Changed to orange */

@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;
}

.logo {
    height: 120px; 
}

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

.lang-switcher button {
    background: none;
    border: 1px solid transparent;
    font-family: inherit;
    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: var(--white-color);
    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%;
}

.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; /* Added bottom padding */
}

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: 0.5rem; /* Adjusted for two lines */
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
}

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

.signup-options-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centering children */
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
    padding-bottom: 20px; /* Added padding to buttons div */
}

/* Styling for the new signup form and buttons */
.signup-form-and-buttons {
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensure it takes full width of its parent */
    max-width: 300px; /* Match width with Google button */
    gap: 15px; /* Spacing between form groups and button */
}

.signup-form-and-buttons .form-group {
    width: 100%; /* Ensure inputs take full width of their parent */
}

.signup-form-and-buttons input {
    width: calc(100% - 30px); /* Account for padding */
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.4s ease;
    background-color: transparent;
}

.signup-form-and-buttons .form-group label {
    text-align: left; /* Align label to left within its form group */
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

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

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

.signup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid var(--primary-light); /* Added border */
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 10px;
    color: var(--white-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Added shadow */
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%; /* Ensure buttons take full width of their parent */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-family: inherit; /* Ensure font inheritance */
}

body.dark-theme .signup-button {
    border: 1px solid var(--primary-dark);
}

.signup-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15); /* Light overlay for hover */
    border-radius: 50%;
    transition: width 0.4s ease-out, height 0.4s ease-out, top 0.4s ease-out, left 0.4s ease-out;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.signup-button:hover::before {
    width: 250px;
    height: 250px;
}

.signup-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.email-signup-button {
    background-color: var(--primary-light);
}
body.dark-theme .email-signup-button {
    background-color: var(--primary-dark);
}

.google-signup-button {
    background-color: var(--secondary-light); /* Changed to theme orange */
}
body.dark-theme .google-signup-button {
    background-color: var(--secondary-dark); /* Changed to theme lighter orange */
}

/* Hover effects for themed buttons */
.email-signup-button:hover {
    background-color: #005a8b; /* Darker primary blue */
}
body.dark-theme .email-signup-button:hover {
    background-color: #008cc2; /* Lighter primary blue */
}

.google-signup-button:hover {
    background-color: #d17500; /* Darker secondary orange */
}
body.dark-theme .google-signup-button:hover {
    background-color: #e6a700; /* Lighter secondary orange */
}

.signup-success-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--accent-light);
    color: var(--white-color);
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 10px var(--shadow-light);
}

body.dark-theme .signup-success-message {
    background-color: var(--accent-dark);
    box-shadow: 0 4px 10px var(--shadow-dark);
}

.signup-method-or-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px; /* Align with other elements */
    margin: 15px 0;
    color: var(--text-dark); /* Ensure text is visible */
}

.signup-method-or-divider::before, .signup-method-or-divider::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: currentColor;
    opacity: 0.3;
}

.signup-method-or-divider .divider-text {
    padding: 0 10px;
    opacity: 0.7;
}


/* 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);
}

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-family: inherit;
    font-size: 1rem;
    transition: all 0.4s ease;
    background-color: transparent;
}

.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: var(--white-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit; /* Ensure font inheritance */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Added shadow */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15); /* Light overlay for hover */
    border-radius: 50%;
    transition: width 0.4s ease-out, height 0.4s ease-out, top 0.4s ease-out, left 0.4s ease-out;
    transform: translate(-50%, -50%);
    z-index: -1;
}

button[type="submit"]:hover::before {
    width: 250px;
    height: 250px;
}

button[type="submit"]:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

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

/* Counter Section */
.counter-section {
    margin-top: 3rem;
}

.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;
}

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

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

.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; }
/* Fixed RTL switch positioning */
[dir="rtl"] .theme-switcher .switch { transform: translateX(0); } /* Default position for RTL light theme */
[dir="rtl"] body.dark-theme .theme-switcher .switch { transform: translateX(-25px); } /* Move left for RTL dark theme */

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