/* =====================================================
   $MOLTBOT - Decentralized AI Agent Economy Core Token
   Technical Hardcore + Ecosystem Utility Style
   ===================================================== */

/* ==================== CSS Variables ==================== */
:root {
    /* Core Colors */
    --color-primary: #121212;
    --color-accent: #00E096;
    --color-accent-glow: rgba(0, 224, 150, 0.4);
    --color-bg-dark: #0D0D0D;
    --color-bg-gradient: #1A1A2E;

    /* Code Highlight Colors */
    --color-code-green: #4ADE80;
    --color-code-blue: #60A5FA;
    --color-code-pink: #F472B6;
    --color-code-yellow: #FBBF24;
    --color-code-purple: #A78BFA;

    /* Neutral Colors */
    --color-text-light: #E5E7EB;
    --color-text-muted: #9CA3AF;
    --color-border: rgba(0, 224, 150, 0.2);

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-chinese: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-gradient) 100%);
    color: var(--color-text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body.zh {
    font-family: var(--font-chinese);
}

/* ==================== Typography ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.2;
}

.mono {
    font-family: var(--font-mono);
}

/* ==================== Container ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== Navigation ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-normal);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-light);
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.nav-logo-text {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.nav-logo-text .accent {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 14px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.45;
    z-index: 0;
}

#architecture-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 224, 150, 0.1);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 32px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-accent);
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-token {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    position: relative;
}

.token-core {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-code-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 60px var(--color-accent-glow),
        inset 0 2px 20px rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.token-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border-radius: 50%;
}

.token-ring {
    position: absolute;
    inset: -15px;
    border: 2px dashed var(--color-accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-title .accent {
    color: var(--color-accent);
    text-shadow: 0 0 40px var(--color-accent-glow);
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--color-text-muted);
    margin-bottom: 48px;
    font-family: var(--font-mono);
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.btn-primary:hover {
    background: #00C083;
    box-shadow: 0 8px 32px var(--color-accent-glow);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ==================== Token Flow Section ==================== */
.token-flow {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-accent);
    background: rgba(0, 224, 150, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
}

.section-desc {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.flow-line {
    position: absolute;
    top: 60px;
    left: 12.5%;
    width: 75%;
    height: 2px;
    background: linear-gradient(90deg,
            var(--color-accent) 0%,
            var(--color-code-blue) 33%,
            var(--color-code-pink) 66%,
            var(--color-code-purple) 100%);
    opacity: 0.4;
}

.flow-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: var(--transition-normal);
}

.flow-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.flow-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-bg-dark);
    font-size: 16px;
    box-shadow: 0 4px 20px var(--color-accent-glow);
}

.flow-icon {
    font-size: 48px;
    margin: 24px 0;
}

.flow-title {
    font-family: var(--font-mono);
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--color-text-light);
}

.flow-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ==================== Architecture Section ==================== */
.architecture {
    padding: var(--section-padding);
    background: rgba(0, 0, 0, 0.3);
}

.arch-terminal {
    background: #0A0A0A;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.arch-terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1A1A1A;
    border-bottom: 1px solid var(--color-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #FF5F56;
}

.terminal-dot.yellow {
    background: #FFBD2E;
}

.terminal-dot.green {
    background: #27CA3E;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-muted);
}

.arch-terminal-body {
    padding: 24px;
}

.arch-layer {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.4);
    border-left: 3px solid;
    transition: var(--transition-normal);
}

.arch-layer:hover {
    background: rgba(26, 26, 46, 0.8);
    transform: translateX(8px);
}

.arch-layer:nth-child(1) {
    border-color: var(--color-code-blue);
}

.arch-layer:nth-child(2) {
    border-color: var(--color-accent);
}

.arch-layer:nth-child(3) {
    border-color: var(--color-code-pink);
}

.arch-layer:nth-child(4) {
    border-color: var(--color-code-purple);
}

.arch-layer-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.arch-layer-content {
    flex: 1;
}

.arch-layer-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.arch-layer:nth-child(1) .arch-layer-name {
    color: var(--color-code-blue);
}

.arch-layer:nth-child(2) .arch-layer-name {
    color: var(--color-accent);
}

.arch-layer:nth-child(3) .arch-layer-name {
    color: var(--color-code-pink);
}

.arch-layer:nth-child(4) .arch-layer-name {
    color: var(--color-code-purple);
}

.arch-layer-desc {
    font-size: 13px;
    color: var(--color-text-muted);
}

.arch-layer-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.arch-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--color-text-muted);
}

/* ==================== Use Cases Section ==================== */
.use-cases {
    padding: var(--section-padding);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.case-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition-normal);
}

.case-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.case-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.case-title {
    font-family: var(--font-mono);
    font-size: 18px;
    margin-bottom: 12px;
}

.case-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    background: rgba(0, 224, 150, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}

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

/* ==================== Developer Section ==================== */
.developer {
    padding: var(--section-padding);
    background: rgba(0, 0, 0, 0.3);
}

.dev-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.dev-text h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 24px;
}

.dev-text p {
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.8;
}

.dev-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dev-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text-light);
    transition: var(--transition-normal);
}

.dev-link:hover {
    border-color: var(--color-accent);
    background: rgba(0, 224, 150, 0.1);
}

.dev-link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 224, 150, 0.2);
    border-radius: 8px;
    font-size: 18px;
}

.dev-link-text {
    font-family: var(--font-mono);
    font-size: 14px;
}

/* Code Preview */
.dev-code {
    background: #0A0A0A;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}

.dev-code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1A1A1A;
    border-bottom: 1px solid var(--color-border);
}

.dev-code-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
}

.dev-code-body .comment {
    color: var(--color-text-muted);
}

.dev-code-body .keyword {
    color: var(--color-code-pink);
}

.dev-code-body .function {
    color: var(--color-code-blue);
}

.dev-code-body .string {
    color: var(--color-accent);
}

.dev-code-body .variable {
    color: var(--color-code-purple);
}

/* ==================== Community Section ==================== */
.community {
    padding: var(--section-padding);
    text-align: center;
}

.community-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.community-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 32px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text-light);
    transition: var(--transition-normal);
    min-width: 140px;
}

.community-link:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.community-icon {
    font-size: 32px;
}

.community-name {
    font-family: var(--font-mono);
    font-size: 14px;
}

/* ==================== Footer ==================== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.3);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.footer-logo-text {
    font-family: var(--font-mono);
    font-size: 16px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .flow-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 24px;
    }

    .flow-line {
        display: none;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .nav-links {
        display: none;
    }

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

    .hero-token {
        width: 100px;
        height: 100px;
        margin-bottom: 32px;
    }

    .flow-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 24px;
    }

    .dev-links {
        grid-template-columns: 1fr;
    }

    .community-links {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }
}

/* ==================== Animations ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typing Animation */
.typing-text {
    overflow: hidden;
    border-right: 2px solid var(--color-accent);
    white-space: nowrap;
    animation: typing 3s steps(40) 1s forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Data Flow Animation */
@keyframes dataFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Glow Pulse */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--color-accent-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--color-accent-glow), 0 0 60px var(--color-accent-glow);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}