/* ═══════════════════════════════════════════════════════════
   Translation Bridge — Landing Page Styles
   Premium dark design with Supabase-inspired green accents
   ═══════════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #171717;
    --primary: #3ecf8e;
    --primary-dark: #2db87d;
    --primary-glow: rgba(62, 207, 142, 0.15);
    --text: #fafafa;
    --text-dim: #898989;
    --border: #2e2e2e;
    --gradient: linear-gradient(135deg, #3ecf8e, #2dd4bf);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── ANIMATED BACKGROUND ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    background: var(--primary-glow);
    top: -200px;
    right: -200px;
    animation: float1 15s ease-in-out infinite;
}

.bg-glow--2 {
    width: 400px;
    height: 400px;
    background: rgba(45, 212, 191, 0.08);
    bottom: -100px;
    left: -100px;
    animation: float2 20s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -40px); }
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
}

.nav-logo-icon {
    font-size: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Tajawal', 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: var(--gradient);
    color: #000;
    box-shadow: 0 0 30px var(--primary-glow);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(62, 207, 142, 0.3);
}

.btn--ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn--outline:hover {
    background: var(--primary-glow);
}

.btn--sm { padding: 6px 16px; font-size: 13px; }
.btn--lg { padding: 14px 32px; font-size: 16px; }

/* ── HERO ── */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(36px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fadeInUp 0.7s ease;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.8s ease;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
    animation: fadeInUp 0.9s ease;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    padding: 16px 36px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    animation: fadeInUp 1.0s ease;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: 'Inter', monospace;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ── FEATURES ── */
.features {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 16px;
    margin-bottom: 56px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(62, 207, 142, 0.08);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.8;
}

/* ── HOW IT WORKS ── */
.how {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.steps {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.step:hover {
    border-color: var(--primary);
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gradient);
    color: #000;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 18px;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-content p {
    color: var(--text-dim);
    font-size: 14px;
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-family: 'Inter', monospace;
    font-size: 12px;
    color: var(--primary);
}

/* ── GAMES ── */
.games {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.games-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.game-chip {
    padding: 10px 22px;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: default;
}

.game-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.game-chip--any {
    background: transparent;
    border-style: dashed;
    color: var(--text-dim);
}

/* ── CTA ── */
.cta {
    padding: 100px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 12px;
}

.cta-subtitle {
    color: var(--text-dim);
    font-size: 18px;
    margin-bottom: 32px;
}

/* ── FOOTER ── */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-content p {
    color: var(--text-dim);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered animation class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ── LANGUAGE SELECTOR ── */
.lang-selector {
    position: relative;
}

#lang-toggle {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    min-width: 110px;
    text-align: center;
    transition: all 0.25s ease;
}

#lang-toggle:hover {
    background: var(--primary-glow);
    transform: scale(1.05);
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    z-index: 200;
    min-width: 160px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 0.2s ease;
}

.lang-menu button {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    transition: all 0.15s;
    white-space: nowrap;
}

.lang-menu button:hover {
    background: var(--primary-glow);
    color: var(--primary);
}

/* ── LTR MODE ── */
html[dir="ltr"] body {
    text-align: left;
}

html[dir="ltr"] .hero-content,
html[dir="ltr"] .section-title,
html[dir="ltr"] .section-subtitle,
html[dir="ltr"] .cta {
    text-align: center;
}

html[dir="ltr"] .lang-menu {
    right: auto;
    left: 0;
}

html[dir="ltr"] .lang-menu button {
    text-align: left;
}
