:root {
    --primary-color: #942222;
    --primary-dark: #7b1a1a;
    --secondary-color: #787878;
    --bg-color: #eef1f5;
    /* Darker off-white background */
    --text-color: #282828;
    --glass-bg: rgba(255, 255, 255, 0.45);
    /* More transparent for real glass effect */
    --glass-border: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px 0 rgba(100, 100, 111, 0.2);
    /* Defined shadow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 1rem;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Reduced opacity (0.85 -> 0.6) to let imagery show through */
    background: linear-gradient(135deg, rgba(238, 241, 245, 0.85) 0%, rgba(200, 200, 200, 0.65) 100%),
        url('assets/bg-pharmacy.png') center/cover no-repeat;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1;
    margin: auto 0;
}

.header {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo-img {
    max-width: 450px;
    width: 100%;
    height: auto;
    /* Soft shadow to lift logo */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

.content-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 3rem);
    max-width: 650px;
    box-shadow: var(--shadow);
    margin: 1rem 0;
    width: 100%;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Add a subtle shine effect to the card */
.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    opacity: 0.5;
}

.status-badge {
    display: inline-block;
    background: rgba(148, 34, 34, 0.08);
    color: var(--primary-color);
    padding: 0.6rem 1.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    border: 1px solid rgba(148, 34, 34, 0.2);
}

.main-title {
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: var(--text-color);
}

.description {
    font-size: clamp(1rem, 4vw, 1.2rem);
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.signup-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem;
    width: 100%;
    margin: 0 auto;
}

.input-group {
    width: 100%;
    display: block;
}

.signup-form input,
.signup-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.8) !important;
    /* Semi-transparent white */
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-color) !important;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.signup-form textarea {
    resize: none;
    background-color: rgba(255, 255, 255, 0.8) !important;
}

.signup-form input::placeholder,
.signup-form textarea::placeholder {
    color: #a0a0a0;
}

.signup-form input:focus,
.signup-form textarea:focus {
    border-color: var(--primary-color);
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(148, 34, 34, 0.1);
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(148, 34, 34, 0.25);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(148, 34, 34, 0.35);
}

.primary-btn:active {
    transform: translateY(-1px);
}

.form-message {
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    min-height: 1.5rem;
}

.footer {
    margin-top: 4rem;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    font-weight: 600;
}

.social-links a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.875rem;
    color: #999;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
}

.lang-btn.active {
    color: var(--primary-color);
    background: rgba(148, 34, 34, 0.08);
    border-radius: 6px;
}

.lang-btn:hover:not(.active) {
    color: var(--text-color);
}

.lang-divider {
    color: #ddd;
    font-size: 0.8rem;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}

body.rtl .main-title {
    line-height: 1.3;
    letter-spacing: 0;
}

body.rtl .description {
    line-height: 1.8;
}

body.rtl .signup-form {
    text-align: right;
}

/* Background Particles */
.background-particles {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}

.particle {
    position: absolute;
    background: rgba(148, 34, 34, 0.15);
    /* Slightly clearer particles */
    border-radius: 50%;
    pointer-events: none;
    box-shadow: none;
    animation: float 20s linear infinite;
}

.particle.molecule::before,
.particle.molecule::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.particle.molecule::before {
    width: 70%;
    height: 70%;
    top: -50%;
    left: -50%;
}

.particle.molecule::after {
    width: 60%;
    height: 60%;
    bottom: -40%;
    right: -40%;
}

.particle.pill {
    width: 45px;
    height: 18px;
    border-radius: 20px;
    background: linear-gradient(90deg, #fff 50%, rgba(148, 34, 34, 0.2) 50%);
    border: 1px solid rgba(148, 34, 34, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.particle.hex {
    width: 30px;
    height: 30px;
    background: rgba(120, 120, 120, 0.1);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.6;
    }

    85% {
        opacity: 0.6;
    }

    100% {
        transform: translate(var(--move-x), var(--move-y)) rotate(360deg);
        opacity: 0;
    }
}

/* Language Switching Transition */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.transition-active {
    opacity: 1;
}

.language-changing {
    animation: langSwitch 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes langSwitch {
    0% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1);
    }

    40% {
        opacity: 0.5;
        filter: blur(10px);
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .content-card {
        padding: 3rem 1.5rem;
    }

    .signup-form {
        flex-direction: column;
    }

    .signup-form button {
        width: 100%;
    }

    .logo-img {
        max-width: 320px;
    }
}