@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    font-family: var(--font-main);
    background-color: #020617;
    color: #cbd5e1;
    overflow-x: hidden;
}

/* --- Backgrounds & Particles --- */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.2) 1px, transparent 1px);
    background-size: 35px 35px;
    z-index: -2;
}

.background-aurora {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.25) 0%, transparent 50%);
    transform: translate(-50%, -50%);
    animation: pulse-aurora 15s infinite ease-in-out;
    z-index: -1;
}

@keyframes pulse-aurora {
    0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 3px; height: 3px;
    background: #a5b4fc;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px #a5b4fc, 0 0 20px #a5b4fc;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
  0% { transform: translate(var(--x-start), var(--y-start)) scale(0.5); opacity: 0; }
  10%, 90% { opacity: 0.7; }
  100% { transform: translate(var(--x-end), var(--y-end)) scale(1.5); opacity: 0; }
}


/* --- Header & Navigation --- */
.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: white;
}

.language-selector {
    position: relative;
}
.language-selector-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(56, 66, 95, 0.5);
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.language-selector-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 0.5rem;
    min-width: 160px;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.language-selector:hover .language-selector-dropdown {
    display: block;
}
.language-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    border-radius: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}
.language-option:hover {
    background: #334155;
    color: white;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background-color: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.mobile-nav-link {
    font-size: 1.125rem;
    font-weight: 700;
    color: #94a3b8;
}

/* --- General Components --- */
.heading-gradient {
    background: linear-gradient(90deg, #e0e7ff, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: animated-gradient 5s ease infinite;
}
@keyframes animated-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary {
    background: #4f46e5;
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
.btn-primary:hover {
    background: #6366f1;
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}
.section-subtitle {
    text-align: center;
    margin-top: 0.5rem;
    color: #94a3b8;
}

/* --- Countdown --- */
#countdown { font-family: var(--font-mono); }
.countdown-item {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(56, 66, 95, 0.5);
    padding: 1rem 1.5rem; border-radius: 1.5rem; min-width: 80px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3);
}
.countdown-item span { font-size: 2.5rem; font-weight: 800; line-height: 1; transition: transform 0.2s ease-out; }
.countdown-item small { font-size: 0.75rem; text-transform: uppercase; color: #94a3b8; margin-top: 0.5rem; }
.tick { animation: tick-kf 0.3s ease-out; }
@keyframes tick-kf {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}


/* --- Cards --- */
@keyframes float-card {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.feature-card, .info-card, .reward-card {
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 66, 95, 0.5); padding: 1.5rem;
    border-radius: 1.5rem; transition: all 0.3s ease;
    animation: float-card 8s ease-in-out infinite;
}
.feature-card:nth-child(2), .info-card:nth-child(2), .reward-card:nth-child(2) { animation-delay: -2s; }
.feature-card:nth-child(3), .info-card:nth-child(3), .reward-card:nth-child(3) { animation-delay: -4s; }
.info-card:nth-child(4) { animation-delay: -6s; }

.feature-card:hover, .info-card:hover, .reward-card:hover { 
    transform: translateY(-8px) !important;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2), 0 0 30px rgba(99, 102, 241, 0.2);
    animation-play-state: paused;
}
.feature-icon, .reward-icon {
    width: 48px; height: 48px; border-radius: 0.75rem; display: flex;
    align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem;
    animation: pulse-icon-kf 4s ease-in-out infinite;
}
@keyframes pulse-icon-kf {
    0%, 100% { box-shadow: 0 0 15px -5px currentColor; }
    50% { box-shadow: 0 0 25px 0px currentColor; }
}
.feature-card h4, .info-card h4 { font-size: 1.125rem; font-weight: 700; color: white; margin-bottom: 0.5rem; }
.feature-card p, .info-card p { font-size: 0.9rem; color: #94a3b8; line-height: 1.6; }

/* --- Reward Cards --- */
.reward-card { background: transparent; text-align: center; }
.reward-icon {
    width: 56px; height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.reward-card h4 { font-size: 1.125rem; font-weight: 700; color: white; margin-bottom: 0.5rem; }
.reward-card p { font-size: 0.875rem; color: #94a3b8; line-height: 1.6; }

/* --- Tokenomics --- */
.token-flow { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 3rem; }
.token-flow-item { text-align: center; max-width: 250px; }
.token-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.75rem; border: 2px solid; }
.token-icon.usdt { border-color: #26a17b80; background: #26a17b20; color: #5eead4; }
.token-icon.elements { border-color: #38bdf880; background: #38bdf820; color: #7dd3fc; }
.token-icon.feng { border-color: #818cf880; background: #818cf820; color: #a5b4fc; }
.token-icon.chaos { border-color: #f472b680; background: #f472b620; color: #f9a8d4; }
.token-flow-item h5 { font-size: 1.125rem; font-weight: 700; color: white; margin-bottom: 0.5rem; }
.token-flow-item p { font-size: 0.9rem; color: #94a3b8; }
.token-flow-arrow { color: #475569; font-size: 1.5rem; transform: rotate(90deg); }
@media (min-width: 768px) {
    .token-flow { flex-direction: row; justify-content: center; align-items: flex-start; gap: 0; }
    .token-flow-arrow { transform: rotate(0); margin: 0 1rem; margin-top: 30px; }
}

/* --- Roadmap --- */
.roadmap-timeline { position: relative; max-width: 800px; margin: 3rem auto 0; padding: 0 1rem; }
.roadmap-timeline::before {
    content: ''; position: absolute; left: 1.25rem; top: 0; bottom: 0;
    width: 2px; background: rgba(56, 66, 95, 0.5);
}
.timeline-item { position: relative; padding-left: 3.5rem; margin-bottom: 2.5rem; }
.timeline-dot {
    position: absolute; left: 0; top: 4px; width: 40px; height: 40px; border-radius: 50%;
    background: #0f172a; border: 2px solid rgba(56, 66, 95, 0.5); display: flex;
    align-items: center; justify-content: center;
}
.timeline-dot::before {
    content: ''; width: 12px; height: 12px; background: #4f46e5; border-radius: 50%;
    box-shadow: 0 0 10px #4f46e5;
}
.timeline-content h5 { font-size: 1.125rem; font-weight: 700; color: white; margin-bottom: 0.25rem; }
.timeline-content p { color: #94a3b8; font-size: 0.9rem; }

/* --- FAQ --- */
.faq-container { max-width: 800px; margin: 3rem auto 0; }
.faq-item { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(56, 66, 95, 0.5); border-radius: 1rem; margin-bottom: 1rem; padding: 1.25rem; }
.faq-question { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: white; cursor: pointer; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; transition: transform 0.2s; }
.faq-item[open] .faq-question::after { transform: rotate(180deg); }
.faq-answer { color: #94a3b8; margin-top: 1rem; font-size: 0.9rem; line-height: 1.7; }

/* --- Footer --- */
.social-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; font-weight: 600; color: #94a3b8; transition: color 0.2s ease;
}
.social-link:hover { color: #a5b4fc; }

/* --- Scroll Reveal Animation --- */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }
.scroll-reveal.is-visible .feature-card,
.scroll-reveal.is-visible .info-card,
.scroll-reveal.is-visible .reward-card,
.scroll-reveal.is-visible .token-flow-item,
.scroll-reveal.is-visible .token-flow-arrow {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- RTL Support for Arabic --- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .space-x-3 { margin-left: 0.75rem; margin-right: 0; }
[dir="rtl"] .space-x-4 { margin-left: 1rem; margin-right: 0; }
[dir="rtl"] .space-x-8 { margin-left: 2rem; margin-right: 0; }
[dir="rtl"] .ml-2 { margin-right: 0.5rem; margin-left: 0; }
[dir="rtl"] .nav-link { margin-left: 2rem; margin-right: 0; }
[dir="rtl"] .token-flow-arrow i { transform: rotate(180deg); }
[dir="rtl"] .faq-question::after { content: '\f077'; }
[dir="rtl"] .faq-item[open] .faq-question::after { transform: rotate(-180deg); }
[dir="rtl"] .roadmap-timeline::before { left: auto; right: 1.25rem; }
[dir="rtl"] .timeline-item { padding-left: 0; padding-right: 3.5rem; }
[dir="rtl"] .timeline-dot { left: auto; right: 0; }
@media (min-width: 768px) {
    [dir="rtl"] .token-flow-arrow i { transform: rotate(180deg); }
}
