* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Font handled by JS based on language */
}

:root {
    --purple: #844783;
    --purple-light: #9d5a9c;
    --purple-glow: rgba(132, 71, 131, 0.6);
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --card-bg: #ffffff;
    --border-color: rgba(132, 71, 131, 0.15);
}

[data-theme="dark"] {
    --bg-primary: #050505;
    --bg-secondary: #111111;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --card-bg: #1a1a1a;
    --border-color: rgba(132, 71, 131, 0.3);
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    position: relative;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    /* Default */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(132, 71, 131, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(132, 71, 131, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body>* {
    position: relative;
    z-index: 1;
}



/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    backdrop-filter: blur(12px);
    background: var(--glass-bg);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles Updated */
.logo {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 1.5rem;
    font-weight: 900;
    direction: ltr;
}

.logo-text {
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo-box {
    background: var(--purple);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-weight: 900;
    margin: 0 0.2rem;
    display: inline-block;
}

.logo-hash {
    color: var(--purple);
    font-size: 1.8rem;
    opacity: 0.8;
}


/* Navigation */
.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--purple);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-connect {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-connect:hover {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}

/* Language Toggle */
.btn-lang-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s;
    margin-right: 0.5rem;
}

.btn-lang-toggle:hover {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-primary);
}

.btn-theme-toggle:hover {
    background: var(--border-color);
}

/* Hero */
.hero {
    padding: 140px 2rem 10px;
    max-width: 1400px;
    /* Wider container */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    /* Prevent nodes from overflowing horizontal scroll */
}

/* Ensure content and graphics don't overlap */
.hero-content {
    flex: 0 0 50%;
    z-index: 10;
}

.hero-cards {
    flex: 0 0 45%;
    /* Reserve 45% for the graphic */
    height: 500px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.hero-badge.private-badge {
    display: inline-block;
    background: rgba(132, 71, 131, 0.1);
    color: var(--purple);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    border: 1px solid var(--purple);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px var(--purple-glow);
    animation: glowPulse 3s infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--purple-glow);
    }

    50% {
        box-shadow: 0 0 25px var(--purple-glow);
    }
}

.hero-title {
    font-size: 5.5rem;
    /* Slightly smaller to fit better */
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight-text {
    color: var(--text-primary);
    font-size: 4.5rem;
}

.highlight-text-2 {
    background: linear-gradient(45deg, var(--purple), #b26ab1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4.5rem;
    font-weight: 900;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.btn-cta {
    background: var(--purple);
    color: #fff;
    padding: 1.3rem 3rem;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 15px 35px var(--purple-glow);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px var(--purple-glow);
}

.cta-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.8rem;
    opacity: 0.8;
}

/* Network Nodes Visual */
.network-node {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.2rem 1.8rem;
    border-radius: 20px;
    border: 2px solid rgba(132, 71, 131, 0.3);
    box-shadow: 0 20px 60px rgba(132, 71, 131, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    animation: floatNode 6s ease-in-out infinite;
    z-index: 2;
    transition: all 0.4s ease;
    white-space: nowrap;
    /* Prevent text wrap */
}

.network-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(132, 71, 131, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.15);
    border-color: var(--purple);
}

.node-icon {
    font-size: 1.5rem;
}

/* Positioning logic based on container */
.node-1 {
    top: 15%;
    right: 5%;
    animation-delay: 0s;
}

[dir="ltr"] .node-1 {
    right: auto;
    left: 5%;
}

.node-2 {
    top: 45%;
    left: 5%;
    animation-delay: 2s;
}

[dir="ltr"] .node-2 {
    left: auto;
    right: 5%;
}

.node-3 {
    bottom: 20%;
    right: 20%;
    animation-delay: 4s;
}

[dir="ltr"] .node-3 {
    right: auto;
    left: 20%;
}


/* Connecting lines simulation */
.hero-cards::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes floatNode {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Features */
.features {
    max-width: 1200px;
    margin: 1rem auto 4rem;
    /* Reduced top margin from 4rem to 1rem */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--purple);
    box-shadow: 0 20px 50px rgba(132, 71, 131, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-card.premium-card {
    background: linear-gradient(145deg, var(--card-bg), rgba(132, 71, 131, 0.05));
    border: 2px solid var(--purple);
    position: relative;
    overflow: hidden;
}

.vip-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--purple);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

[dir="ltr"] .vip-tag {
    left: auto;
    right: 10px;
}


/* Why Join */
.why-join {
    background: var(--bg-secondary);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
}

.why-content {
    max-width: 800px;
    margin: 0 auto;
}

.why-join h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--purple);
}

.quote {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.highlight-purple {
    color: var(--purple);
    font-weight: 800;
}

.team-building-box {
    margin-top: 3rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px dashed var(--purple);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
}

/* CTA Footer */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
}

.cta-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.cta-note-footer {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        /* Reduced from 120px */
        gap: 1rem;
    }

    .hero-content {
        flex: auto;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-cards {
        width: 100%;
        height: 300px;
        flex: auto;
        margin-top: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .highlight-text,
    .highlight-text-2 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .cta-section {
        padding: 4rem 1rem;
    }
}

/* Base Mobile (Phones) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-hash {
        font-size: 1.4rem;
    }

    .btn-connect {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .btn-lang-toggle,
    .btn-theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        /* Smaller icon */
    }

    .hero-title {
        font-size: 2.4rem;
        /* Smaller for Farsi to prevent weird wrapping */
        line-height: 1.2;
    }

    .highlight-text,
    .highlight-text-2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .btn-cta {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    /* Network Nodes Optimization for Mobile */
    .network-node {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .node-icon {
        font-size: 1.2rem;
    }

    /* Stack nodes vertically or simplify layout */
    .node-1 {
        top: 0%;
        right: 50%;
        transform: translateX(50%) !important;
        /* Force center */
        left: auto;
    }

    .node-2 {
        top: 35%;
        left: 5%;
        right: auto;
        transform: none !important;
    }

    .node-3 {
        bottom: 10%;
        right: 5%;
        left: auto;
        transform: none !important;
    }

    /* Adjust for RTL/LTR mix if needed, but primarily assuming RTL for Fa */
    [dir="rtl"] .node-2 {
        left: 5%;
        right: auto;
    }

    [dir="rtl"] .node-3 {
        right: 5%;
        left: auto;
    }
}