/* ========================================
   WEB 4.0 — THE SYMBIOTIC WEB SIMULATION
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(18, 18, 30, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --text-muted: #666680;
    --cyan: #00f0ff;
    --purple: #a855f7;
    --green: #06d6a0;
    --amber: #f59e0b;
    --pink: #ec4899;
    --red: #ef4444;
    --teal: #14b8a6;
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.3);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);
    --gradient-main: linear-gradient(135deg, var(--cyan), var(--purple));
    --gradient-warm: linear-gradient(135deg, var(--amber), var(--pink));
    --gradient-cool: linear-gradient(135deg, var(--green), var(--cyan));
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) #1a1a2e;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 3px;
}

body {
    font-family: var(--font-main);
    font-weight: 700;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor-glow { display: none !important; }
}

/* Custom Cursor */
.cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3), transparent 70%);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: screen;
}
.cursor-glow.hover {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 70%);
}

/* Canvas Backgrounds */
#particleCanvas, #neuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
#neuralCanvas {
    z-index: 1;
    opacity: 0.15;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}
.loading-content {
    text-align: center;
}
.loading-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
}
.ring-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 50%;
}
.ring-segment:nth-child(1) {
    border-top-color: var(--cyan);
    animation: spin 1.2s linear infinite;
}
.ring-segment:nth-child(2) {
    border-right-color: var(--purple);
    animation: spin 1.6s linear infinite reverse;
}
.ring-segment:nth-child(3) {
    border-bottom-color: var(--green);
    animation: spin 2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    margin-bottom: 30px;
}
.loading-label {
    display: block;
    font-size: 12px;
    letter-spacing: 6px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.loading-version {
    display: block;
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.loading-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 15px;
    overflow: hidden;
}
.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.loading-status {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}
.nav.visible {
    transform: translateY(0);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-icon svg {
    width: 32px;
    height: 32px;
}
.brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}
.brand-version {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links {
    display: flex;
    gap: 8px;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.3s;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-glass);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-main);
    border-radius: 1px;
}
.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--green);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(6, 214, 160, 0); }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 60px 60px;
    z-index: 2;
}
.hero-content {
    flex: 1;
    max-width: 650px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 8px 18px;
    border-radius: 20px;
    margin-bottom: 30px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
    animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.08); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.15); }
}
.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
.hero-title {
    font-size: clamp(48px, 7vw, 90px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
}
.title-line {
    display: block;
}
.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: none;
    transition: all 0.3s;
    font-family: var(--font-main);
}
.btn-primary {
    background: var(--gradient-main);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}
.btn-primary:hover::before {
    transform: translateX(100%);
}
.btn-primary:hover {
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}
.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--purple);
    background: rgba(168, 85, 247, 0.1);
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-suffix {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}
.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.orb-container {
    position: relative;
    width: 400px;
    height: 400px;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}
.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 240, 255, 0.15);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: float 6s ease-in-out infinite;
}
.orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(168, 85, 247, 0.15);
    bottom: 0;
    left: 0;
    animation: float 8s ease-in-out infinite reverse;
}
.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(6, 214, 160, 0.1);
    bottom: 30px;
    right: 0;
    animation: float 7s ease-in-out infinite 1s;
}
.orb-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-20px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.4;
    animation: fadeInUp 1s ease 2s both;
}
.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}
.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
.scroll-indicator span {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 0.4; transform: translateX(-50%) translateY(0); }
}

/* Section Styles */
section {
    position: relative;
    z-index: 2;
    padding: 120px 60px;
}
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
}
.section-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 16px;
    background: rgba(168, 85, 247, 0.1);
    padding: 6px 18px;
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Evolution Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--border), var(--purple), var(--border), transparent);
    transform: translateX(-50%);
}
.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}
.timeline-marker {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 30px;
    justify-content: flex-end;
}
.timeline-item:nth-child(even) .timeline-marker {
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--purple);
    z-index: 1;
}
.marker-dot.pulse {
    background: var(--purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}
.marker-year {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.timeline-card {
    flex: 0 0 50%;
    background: rgba(18, 18, 30, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s;
}
.timeline-card:hover {
    border-color: rgba(168, 85, 247, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.1);
}
.timeline-card.glow {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.1);
}
.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}
.timeline-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.era-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-weight: 500;
}
.era-badge.current {
    background: rgba(168, 85, 247, 0.15);
    color: var(--purple);
}
.timeline-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.tag.highlight {
    background: rgba(168, 85, 247, 0.1);
    color: var(--purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

/* Card Demos */
.card-demo {
    margin-top: 16px;
}
.demo-browser {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0d0d18;
}
.demo-browser.futuristic {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: inset 0 0 30px rgba(168, 85, 247, 0.05);
}
.browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border);
}
.browser-dots {
    display: flex;
    gap: 5px;
}
.browser-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.browser-dots span:nth-child(1) { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #06d6a0; }
.browser-url {
    flex: 1;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ai-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: pulse-dot 1.5s ease-in-out infinite;
}
.browser-content {
    padding: 16px;
    min-height: 80px;
}

/* Web 1.0 Demo */
.web1-content {
    background: #0d0d18;
    color: #e0e0e0;
    font-size: 12px;
}
.web1-content h4 {
    margin-bottom: 8px;
}
.visitor-counter {
    font-family: 'Courier New', monospace;
}

/* Web 2.0 Demo */
.web2-content {
    background: #0d0d18;
}
.social-post {
    display: flex;
    gap: 12px;
}
.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.post-body {
    flex: 1;
}
.post-body strong {
    font-size: 13px;
}
.post-body p {
    font-size: 13px;
    color: var(--text-primary);
    margin: 6px 0;
}
.post-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.post-action {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.post-action:hover, .post-action.liked {
    color: var(--pink);
}

/* Web 3.0 Demo */
.web3-content {
    background: #0d0d18;
}
.wallet-connect {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(6, 214, 160, 0.05);
    border: 1px solid rgba(6, 214, 160, 0.2);
    border-radius: 8px;
    margin-bottom: 12px;
}
.wallet-icon {
    font-size: 18px;
}
.wallet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.wallet-label {
    font-size: 10px;
    color: var(--text-muted);
}
.wallet-addr {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--green);
}
.wallet-balance {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.defi-stats {
    display: flex;
    gap: 12px;
}
.defi-stat {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: var(--bg-glass);
    border-radius: 6px;
}
.defi-label {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
}
.defi-value {
    font-size: 16px;
    font-weight: 700;
}

/* Web 4.0 Demo */
.web4-content {
    background: linear-gradient(135deg, #0d0d18, #1a1028);
    min-height: 100px;
}
.ai-greeting {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    position: relative;
    flex-shrink: 0;
}
.ai-avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--purple);
    animation: spin 3s linear infinite;
}
.ai-message {
    flex: 1;
    background: rgba(168, 85, 247, 0.1);
    padding: 12px 16px;
    border-radius: 0 12px 12px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    position: relative;
    background: rgba(18, 18, 30, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px;
    overflow: hidden;
    transition: all 0.4s ease;
}
.feature-card:hover {
    border-color: rgba(168, 85, 247, 0.35);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.12), 0 0 60px rgba(0, 240, 255, 0.04);
}
.feature-bg {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.03), transparent 50%);
    transition: all 0.5s;
}
.feature-card:hover .feature-bg {
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.06), transparent 50%);
}
.feature-icon {
    margin-bottom: 24px;
}
.feature-icon svg {
    width: 48px;
    height: 48px;
}
.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}
.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.feature-meter {
    margin-top: auto;
}
.feature-meter span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}
.meter-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.meter-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 1.5s ease;
}
.feature-card.visible .meter-fill {
    width: var(--fill);
}

/* AI Demo Section */
.demo-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}
.demo-tab {
    padding: 10px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-main);
}
.demo-tab:hover {
    border-color: var(--purple);
    color: var(--text-primary);
}
.demo-tab.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--purple);
    color: var(--text-primary);
}
.demo-panels {
    max-width: 800px;
    margin: 0 auto;
}
.demo-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}
.demo-panel.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat Container */
.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}
.chat-ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}
.ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
}
.chat-model {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.chat-messages {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chat-message {
    display: flex;
    gap: 12px;
    animation: messageIn 0.3s ease;
}
@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-message.user {
    flex-direction: row-reverse;
}
.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.chat-message.ai .message-avatar {
    background: var(--gradient-main);
    color: #000;
}
.chat-message.user .message-avatar {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}
.chat-message.ai .message-content {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 0 12px 12px 12px;
}
.chat-message.user .message-content {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px 0 12px 12px;
}
.message-time {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
}
.chat-suggestions {
    padding: 0 20px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.suggestion {
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}
.suggestion:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}
.chat-input-container {
    display: flex;
    padding: 16px 20px;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}
.chat-input {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: var(--purple);
}
.chat-input::placeholder {
    color: var(--text-muted);
}
.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--gradient-main);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-send:hover {
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

/* Sentiment Analysis */
.sentiment-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
}
.sentiment-container h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.sentiment-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.sentiment-input {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 24px;
}
.sentiment-input:focus {
    border-color: var(--purple);
}
.sentiment-input::placeholder {
    color: var(--text-muted);
}
.emotion-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}
.emotion-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.emotion-label {
    width: 70px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}
.emotion-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.emotion-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.emotion-fill.joy { background: var(--amber); }
.emotion-fill.trust { background: var(--green); }
.emotion-fill.surprise { background: var(--cyan); }
.emotion-fill.sadness { background: #6366f1; }
.emotion-fill.anger { background: var(--red); }
.emotion-value {
    width: 40px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.overall-sentiment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-glass);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.sentiment-emoji {
    font-size: 28px;
}
.overall-sentiment span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Predictive UI */
.predict-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
}
.predict-container h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.predict-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.predict-workspace {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.predict-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: all 0.5s ease;
}
.predict-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.predict-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.03);
}
.predict-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.predict-info {
    flex: 1;
}
.predict-label {
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.predict-detail {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}
.predict-confidence {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Voice Interface */
.voice-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}
.voice-container h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.voice-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}
.voice-orb-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.voice-orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.voice-core {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    z-index: 1;
    transition: all 0.3s;
}
.voice-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.ring-1 { inset: 0; }
.ring-2 { inset: -10px; }
.ring-3 { inset: -20px; }
.voice-orb.active .voice-core {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.5);
}
.voice-orb.active .ring-1 {
    animation: voiceRing 1.5s ease-in-out infinite;
    border-color: rgba(0, 240, 255, 0.4);
}
.voice-orb.active .ring-2 {
    animation: voiceRing 1.5s ease-in-out infinite 0.3s;
    border-color: rgba(168, 85, 247, 0.3);
}
.voice-orb.active .ring-3 {
    animation: voiceRing 1.5s ease-in-out infinite 0.6s;
    border-color: rgba(6, 214, 160, 0.2);
}
@keyframes voiceRing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.5; }
}
.voice-status {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.voice-waveform {
    width: 400px;
    height: 80px;
    display: none;
}
.voice-waveform.visible {
    display: block;
}
.voice-transcript {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-primary);
    min-height: 24px;
}

/* Ecosystem */
.ecosystem-visual {
    position: relative;
    max-width: 800px;
    height: 500px;
    margin: 0 auto;
}
#ecosystemCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.eco-nodes {
    position: relative;
    width: 100%;
    height: 100%;
}
.eco-node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
}
.eco-node-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s;
    min-width: 80px;
}
.eco-node:hover .eco-node-inner {
    border-color: var(--purple);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}
.eco-node-inner.center-node {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
}
.eco-icon {
    font-size: 24px;
}
.eco-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.eco-info {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    overflow: hidden;
}
.dash-card.span-2 {
    grid-column: span 3;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dash-title {
    font-size: 14px;
    font-weight: 600;
}
.dash-live {
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(6, 214, 160, 0.1);
    color: var(--green);
    border-radius: 4px;
    font-weight: 600;
    animation: pulse-dot 2s ease-in-out infinite;
}
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nodes-map canvas {
    width: 100%;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.metric {
    text-align: center;
    padding: 16px;
    background: var(--bg-glass);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}
.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    font-family: var(--font-mono);
}
.metric-spark {
    height: 30px;
    margin-top: 8px;
}

/* Footer */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 60px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 40px;
}
.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}
.footer-links {
    display: flex;
    gap: 60px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}
.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: var(--cyan);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}
.footer-tech {
    font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 120px 30px 60px; }
    section { padding: 80px 30px; }
}
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 40px;
    }
    .hero-content { max-width: 100%; }
    .hero-description { max-width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dash-card.span-2 { grid-column: span 1; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .nav-status { display: none; }
    .nav { padding: 12px 20px; }
    .timeline-item, .timeline-item:nth-child(even) {
        flex-direction: column;
    }
    .timeline-marker, .timeline-item:nth-child(even) .timeline-marker {
        flex: none;
        justify-content: flex-start;
        padding: 0 0 10px;
    }
    .timeline-card { flex: none; }
    .timeline-line { left: 8px; }
    .predict-workspace { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 30px; }
    .footer-links { gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 8px; }
    .footer { padding: 40px 20px; }
    section { padding: 60px 20px; }
    .section-header { margin-bottom: 40px; }
}

/* ========================================
   AGENTIC AI LIVING WORLD
   ======================================== */

/* World Hero Header */
.world-hero-header {
    max-width: 700px;
}
.world-hero-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 4px;
    animation: badgePulse 3s ease-in-out infinite;
}
.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(6, 214, 160, 0.5);
}
.world-main-title {
    font-size: clamp(36px, 5vw, 56px) !important;
    line-height: 1.15 !important;
    letter-spacing: -1px;
}
.title-glow-text {
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 0 60px rgba(168, 85, 247, 0.15);
    font-weight: 900;
}
.world-hero-header .section-desc {
    font-size: 15px;
    max-width: 540px;
    margin: 0 auto 24px;
}
.world-hero-header .section-desc strong {
    color: var(--cyan);
    font-weight: 700;
}
.world-hero-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.wh-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s;
}
.wh-stat:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.08);
    transform: translateY(-2px);
}
.wh-stat-icon {
    font-size: 16px;
}
.wh-stat-text {
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}
.world-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    background: rgba(18, 18, 30, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.world-clock {
    display: flex;
    flex-direction: column;
    margin-left: 8px;
    padding: 6px 14px;
    background: rgba(0, 240, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.12);
}
.clock-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.clock-value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--cyan);
}
.world-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.25);
    background: #0a0a12;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.08), 0 0 80px rgba(0, 240, 255, 0.04);
}
#agenticWorldCanvas {
    width: 100%;
    height: 500px;
    display: block;
}
.world-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(4px);
    transition: opacity 0.5s, visibility 0.5s;
}
.world-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.world-start-msg {
    text-align: center;
    color: var(--text-secondary);
}
.world-start-icon {
    color: var(--purple);
    margin-bottom: 12px;
    animation: pulse-dot 2s ease-in-out infinite;
}
.world-start-msg p {
    font-size: 14px;
}

/* Agent Panels */
.agent-panels {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.agent-panel {
    background: rgba(18, 18, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s;
}
.agent-panel:hover {
    border-color: rgba(168, 85, 247, 0.2);
}
.agent-panel.wide {
    min-width: 0;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(168, 85, 247, 0.04);
    flex-shrink: 0;
}
.panel-header h4 {
    font-size: 13px;
    font-weight: 600;
}
.panel-badge {
    font-size: 11px;
    background: var(--gradient-main);
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 240, 255, 0.25);
}
.agent-list, .activity-feed, .leaderboard {
    overflow-y: auto;
    flex: 1;
    padding: 8px;
}
.agent-empty {
    text-align: center;
    padding: 30px 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Individual Agent Card */
.agent-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.02);
}
.agent-card:hover, .agent-card.selected {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.08);
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.1);
    transform: translateX(2px);
}
.agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}
.agent-avatar .status-ring {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--green);
}
.agent-avatar .status-ring.busy {
    border-color: var(--amber);
    animation: spin 2s linear infinite;
}
.agent-avatar .status-ring.learning {
    border-color: var(--cyan);
    animation: pulse-dot 1.5s ease-in-out infinite;
}
.agent-info {
    flex: 1;
    min-width: 0;
}
.agent-name {
    font-size: 12px;
    font-weight: 700;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agent-role {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    font-weight: 700;
}
.agent-bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}
.agent-minibar {
    display: flex;
    align-items: center;
    gap: 4px;
}
.agent-minibar span {
    font-size: 9px;
    width: 12px;
    text-align: center;
}
.minibar-track {
    flex: 1;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.minibar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}
.minibar-fill.energy { background: var(--green); }
.minibar-fill.intel { background: var(--cyan); }
.minibar-fill.money { background: var(--amber); }
.minibar-fill.happy { background: var(--pink); }

/* Activity Feed Items */
.feed-filter {
    display: flex;
    gap: 4px;
}
.filter-btn {
    padding: 3px 10px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
    font-weight: 700;
}
.filter-btn:hover, .filter-btn.active {
    border-color: var(--purple);
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
}
.feed-item {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    animation: feedSlideIn 0.3s ease;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
}
.feed-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.feed-item.work { border-left-color: var(--amber); }
.feed-item.learn { border-left-color: var(--cyan); }
.feed-item.social { border-left-color: var(--pink); }
.feed-item.earn { border-left-color: var(--green); }
.feed-item.think { border-left-color: var(--purple); }
.feed-item.innovate { border-left-color: var(--teal); }
.feed-item.content { border-left-color: #ef4444; }
.feed-item.defi { border-left-color: #06d6a0; }
@keyframes feedSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
.feed-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}
.feed-body {
    flex: 1;
    min-width: 0;
}
.feed-agent {
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
}
.feed-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 700;
}
.feed-time {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: 700;
}

/* World Stats */
.world-stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
}
.wstat {
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: all 0.2s;
}
.wstat:hover {
    background: rgba(0, 240, 255, 0.04);
    border-color: rgba(0, 240, 255, 0.15);
}
.wstat-label {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.wstat-value {
    display: block;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* Leaderboard */
.leader-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
}
.leader-item:hover {
    background: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.15);
}
.leader-rank {
    font-size: 12px;
    font-weight: 800;
    width: 20px;
    text-align: center;
    color: var(--amber);
}
.leader-rank:nth-child(1) { color: #ffd700; }
.leader-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
}
.leader-score {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--green);
}

@media (max-width: 1024px) {
    .agent-panels {
        grid-template-columns: 1fr;
    }
    .agent-panel {
        max-height: 300px;
    }
}
@media (max-width: 768px) {
    .world-controls {
        gap: 8px;
    }
    .world-clock {
        margin-left: 0;
    }
    #agenticWorldCanvas {
        height: 350px;
    }
}

/* Utility animations */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ========================================
   PAPER / WHITEPAPER SECTION
   Bitcoin whitepaper style — white bg, serif
   ======================================== */
.paper-section {
    background: #fff;
    color: #1a1a1a;
    border-top: 1px solid #e0e0e0;
}
.paper-section .section-header {
    max-width: 700px;
}
.paper-section .section-tag {
    background: rgba(168, 85, 247, 0.1);
    color: #7c3aed;
}
.paper-section .section-title {
    color: #111;
}
.paper-section .section-desc {
    color: #555;
}

.paper-container {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Table of Contents */
.paper-toc {
    flex: 0 0 200px;
    position: sticky;
    top: 80px;
    height: fit-content;
    border-right: 2px solid #e5e7eb;
    padding-right: 20px;
}
.paper-toc h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 16px;
    font-family: var(--font-main);
}
.toc-link {
    display: block;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -22px;
    transition: all 0.2s;
    font-family: var(--font-main);
}
.toc-link:hover {
    color: #111;
}
.toc-link.active {
    color: #7c3aed;
    border-left-color: #7c3aed;
    font-weight: 600;
}

/* Paper Body */
.paper-body {
    flex: 1;
    min-width: 0;
}
.paper-sec {
    display: none;
}
.paper-sec.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.paper-sec h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    font-family: 'Times New Roman', Georgia, serif;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}
.paper-sec p {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
    font-family: 'Times New Roman', Georgia, serif;
}
.paper-sec ul {
    margin: 16px 0;
    padding-left: 24px;
}
.paper-sec li {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Georgia, serif;
}
.paper-sec strong {
    color: #111;
}

/* Paper Blockquote */
.paper-quote {
    border-left: 4px solid #7c3aed;
    padding: 16px 20px;
    margin: 20px 0;
    background: #f9f5ff;
    font-style: italic;
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
    font-family: 'Times New Roman', Georgia, serif;
    border-radius: 0 8px 8px 0;
}

/* Paper Code Block */
.paper-code {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 20px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 20px 0;
    white-space: pre;
}
.paper-code .c-comment { color: #6c7086; }
.paper-code .c-kw { color: #cba6f7; }
.paper-code .c-fn { color: #89b4fa; }
.paper-code .c-str { color: #a6e3a1; }
.paper-code .c-num { color: #fab387; }

/* Paper Table */
.paper-table {
    margin: 20px 0;
    overflow-x: auto;
}
.paper-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-family: var(--font-main);
}
.paper-table th {
    background: #f3f4f6;
    color: #111;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid #d1d5db;
}
.paper-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #444;
}
.paper-table tr:hover td {
    background: #f9fafb;
}

/* Paper Definition */
.paper-definition {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.def-term {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    font-family: 'Times New Roman', Georgia, serif;
}
.def-phonetic {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    font-style: italic;
}
.def-pos {
    font-size: 13px;
    color: #7c3aed;
    font-style: italic;
    margin: 4px 0 12px;
}
.paper-definition ol {
    padding-left: 20px;
}
.paper-definition li {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Georgia, serif;
}
.def-sub {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Paper Terminal */
.paper-terminal {
    background: #0d0d0d;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 20px 0;
    white-space: pre;
}
.paper-terminal .t-dim { color: #666; }
.paper-terminal .t-w { color: #fff; font-weight: bold; }
.paper-terminal .t-g { color: #4ade80; }
.paper-terminal .t-y { color: #facc15; }

/* Paper Diagram */
.paper-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 24px;
    margin: 20px 0;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.pd-node {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #333;
    font-family: var(--font-mono);
}
.pd-node.hl {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}
.pd-arrow {
    font-size: 18px;
    color: #999;
    font-weight: bold;
}

/* Paper Game of Life Demo */
.paper-gol-demo {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.paper-gol-demo canvas {
    width: 100%;
    height: 200px;
    display: block;
}

/* Paper Responsive */
@media (max-width: 768px) {
    .paper-container {
        flex-direction: column;
    }
    .paper-toc {
        position: static;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .paper-toc h4 {
        width: 100%;
    }
    .toc-link {
        border-left: none;
        margin-left: 0;
        padding: 4px 10px;
        border-radius: 4px;
        background: #f3f4f6;
        font-size: 12px;
    }
    .toc-link.active {
        background: #7c3aed;
        color: #fff;
    }
}
