/* ==========================================================================
   1. Design System & Variables
   ========================================================================== */
:root {
    --background-color: #0d1117;
    --text-color: #e6edf3;
    --secondary-text-color: #8b949e;
    --primary-color: #007aff;
    --container-bg: rgba(22, 27, 34, 0.8);
    --border-color: #30363d;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --backdrop-blur: 10px;
}

/* ==========================================================================
   2. Global Resets & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevents scrolling */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Layout Structure
   ========================================================================== */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer {
    margin-top: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    color: var(--secondary-text-color);
    font-size: 0.8rem;
}

/* ==========================================================================
   4. Core Components
   ========================================================================== */

/* Content Card */
.content-card {
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px var(--shadow-color);
    width: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    backdrop-filter: blur(var(--backdrop-blur));
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
}

.main-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
    color: var(--secondary-text-color);
    max-width: 450px;
    margin: 0 auto 2rem;
    min-height: 80px;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-bottom: 2.5rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.contact-info a:hover {
    opacity: 0.8;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}
.cta-button:hover {
    background-color: #0071e3;
    transform: scale(1.05);
}

.copyright {
    white-space: nowrap;
}

/* Language Switcher Component */
.language-switcher {
    position: relative;
}

.language-switcher-button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-color);
    transition: background-color 0.2s;
}
.language-switcher-button:hover {
    background-color: var(--border-color);
}
.language-switcher-button .icon {
    width: 14px;
    height: 14px;
}

.language-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1c2128;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    transform-origin: bottom center;
    z-index: 100;
}
.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.language-dropdown li a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.2s;
    text-align: center;
}
.language-dropdown li a:hover {
    background-color: var(--border-color);
}

/* ==========================================================================
   5. Utility & Accessibility Styles
   ========================================================================== */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .footer {
    direction: ltr; 
    text-align: right;
}
[dir="rtl"] .copyright {
    direction: rtl; 
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.content-card {
    animation: fadeIn 1s ease-out;
}

/* ==========================================================================
   6. Responsive Media Queries
   ========================================================================== */
@media (max-width: 600px) {
    .content-card {
        min-height: 420px;
        padding: 2rem;
    }
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-top: 1.5rem;
        direction: ltr !important; 
    }
    .language-dropdown {
        bottom: 100%;
    }
}