*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-deep: #060a14;
    --bg-mid: #0d1528;
    --accent: #3d8bfd;
    --accent-soft: rgba(61, 139, 253, 0.15);
    --accent-glow: rgba(61, 139, 253, 0.45);
    --text-primary: #f0f4fc;
    --text-secondary: rgba(240, 244, 252, 0.55);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: "Outfit", system-ui, sans-serif;
    --font-arabic: "Noto Sans Arabic", "Outfit", system-ui, sans-serif;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body.rtl {
    font-family: var(--font-arabic);
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100dvh;
    overflow: hidden;
    padding: 2rem 1.5rem 2.5rem;
}

/* ── Background ── */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow--one {
    width: 55vw;
    height: 55vw;
    max-width: 600px;
    max-height: 600px;
    top: -15%;
    left: -10%;
    background: radial-gradient(circle, rgba(61, 139, 253, 0.18) 0%, transparent 70%);
    animation: drift 14s ease-in-out infinite alternate;
}

.bg-glow--two {
    width: 45vw;
    height: 45vw;
    max-width: 500px;
    max-height: 500px;
    bottom: -10%;
    right: -8%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    animation: drift 18s ease-in-out infinite alternate-reverse;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.08); }
}

/* ── Language switcher ── */
.lang-switcher {
    position: relative;
    z-index: 10;
    align-self: flex-end;
    display: flex;
    gap: 0.25rem;
    padding: 0.3rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.lang-btn--active {
    color: var(--text-primary);
    background: var(--accent-soft);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ── Main content ── */
.content {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 640px;
    padding: 2rem 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1.1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

.headline {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 30%, rgba(240, 244, 252, 0.65));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subline {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 28ch;
}

.progress-track {
    width: min(220px, 60vw);
    height: 3px;
    margin-top: 2.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    animation: loading 2.8s ease-in-out infinite;
}

@keyframes loading {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(350%); }
}

/* ── Footer / Logo ── */
.footer {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.logo {
    width: min(200px, 50vw);
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(0 4px 24px rgba(61, 139, 253, 0.15));
    transition: opacity 0.3s, filter 0.3s;
}

.logo:hover {
    opacity: 1;
    filter: drop-shadow(0 4px 32px rgba(61, 139, 253, 0.25));
}

/* ── RTL adjustments ── */
body.rtl .lang-switcher {
    align-self: flex-start;
}

body.rtl .status-badge {
    flex-direction: row-reverse;
}
