:root {
    /* Color Palette */
    --color-primary: #FF7F66;    /* Coral - Lobster Primary */
    --color-primary-dark: #E66A52;
    --color-secondary: #48C0B9;  /* Teal - Lobster Secondary */
    --color-secondary-dark: #3AA19B;
    --color-twin: #9D85FF;       /* Soft Purple - Digital Twin Primary */
    --color-twin-dark: #7A5CFF;
    --color-bg: #FFFBF5;         /* Cream */
    --color-text: #4B4B4B;
    --color-text-light: #777777;
    --color-white: #FFFFFF;
    --color-border: #E5E5E5;
    
    /* Design Tokens */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.04);
    --shadow-push: 0 4px 0 rgba(0, 0, 0, 0.1);
    --font-main: 'Lexend', 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Heiti SC', system-ui, -apple-system, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.02em; /* 增加细微的字间距，提升中文呼吸感 */
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Dashboard Specific Locked Layout */
.layout-fixed, .layout-fixed body {
    height: 100%;
    overflow: hidden;
}

.layout-fixed body {
    display: flex;
    flex-direction: column;
}

/* --- Typography --- */
h1 { font-size: 2.5rem; font-weight: 800; color: var(--color-text); margin-bottom: 0.5rem; }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }
p { color: var(--color-text-light); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    user-select: none;
}

.btn-primary { background-color: var(--color-primary); color: white; box-shadow: 0 4px 0 var(--color-primary-dark); }
.btn-primary:active { box-shadow: 0 0 0 var(--color-primary-dark); transform: translateY(4px); }
.btn-twin { background-color: var(--color-twin); color: white; box-shadow: 0 4px 0 var(--color-twin-dark); }
.btn-twin:active { box-shadow: 0 0 0 var(--color-twin-dark); transform: translateY(4px); }
.btn-outline { background-color: white; color: var(--color-primary); border: 2px solid var(--color-border); box-shadow: 0 4px 0 var(--color-border); }
.btn-outline:active { box-shadow: 0 0 0 var(--color-border); transform: translateY(4px); }

/* --- Layout Utils --- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 60px; /* Rich breathing space */
}

.animate-fade-in { animation: fadeIn var(--transition-smooth) forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Splash/Hero Layout --- */
.hero-area {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;    /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    padding: 60px 40px;
    text-align: center;
}

/* --- Top Navigation --- */
.top-nav {
    height: 80px; background: white; border-bottom: 2px solid var(--color-border);
    display: grid; grid-template-columns: 20% 60% 20%; align-items: center;
    padding: 0 40px; position: sticky; top: 0; z-index: 1000;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); letter-spacing: 1px; }
.nav-links { display: flex; gap: 32px; justify-self: center; }
.top-nav > *:last-child { justify-self: end; }
.nav-link { text-decoration: none; color: var(--color-text-light); font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; transition: color var(--transition-fast); }
.nav-link:hover, .nav-link.active { color: var(--color-primary); }
.nav-link.twin-link { color: var(--color-twin); }
.status-pill { padding: 6px 14px; border-radius: 20px; border: 2px solid var(--color-border); font-size: 0.85rem; font-weight: 800; }

/* --- Dashboard Specifics --- */
.dashboard-layout {
    display: grid; grid-template-columns: 350px 1fr 350px;
    flex: 1; min-height: 0; max-width: 1440px; width: 100%; margin: 0 auto; background: white;
}
.system-panel { display: flex; flex-direction: column; padding: 40px 30px; height: 100%; min-height: 0; overflow-y: auto; }
.sidebar-left { border-right: 2px solid var(--color-border); background: #FFFBF9; }
.sidebar-right { border-left: 2px solid var(--color-border); background: #FAF9FF; }
.main-chat { background: var(--color-bg); display: flex; flex-direction: column; min-height: 0; }

/* --- Display Components --- */
.entity-display { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.bottom-info-bar { background: white; border: 2px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-soft); width: 100%; }
.lobster-theme .bottom-info-bar { border-bottom: 6px solid var(--color-primary); }
.twin-theme .bottom-info-bar { border-bottom: 6px solid var(--color-twin); }

/* --- Stat Bars --- */
.stat-item { margin-bottom: 12px; width: 100%; }
.stat-label { font-size: 0.75rem; font-weight: 800; display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--color-text-light); }
.stat-track { height: 8px; background: #EEE; border-radius: 4px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 4px; background: var(--color-primary); }

/* --- Progress Rings --- */
.progress-ring-container { width: 100px; height: 100px; margin: 10px auto; position: relative; display: flex; align-items: center; justify-content: center; }
.progress-ring-svg { transform: rotate(-90deg); }
.progress-ring-circle { fill: none; stroke: var(--color-twin); stroke-width: 8; stroke-dasharray: 251.2; stroke-dashoffset: 165; stroke-linecap: round; }
.progress-ring-bg { fill: none; stroke: #E9E6FF; stroke-width: 8; }

/* --- Chat Elements --- */
.chat-container { flex: 1; padding: 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; position: relative; }
.chat-msg { display: flex; gap: 16px; max-width: 80%; animation: slideIn 0.3s ease-out forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 16px 20px; border-radius: 18px; font-size: 0.95rem; line-height: 1.5; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.bubble.lobster { background: white; border-bottom-left-radius: 4px; border: 2px solid var(--color-border); }
.bubble.user { background: var(--color-primary); color: white; border-bottom-right-radius: 4px; }

/* Skill Suggestion Card */
.skill-suggestion {
    margin-top: 10px;
    background: linear-gradient(135deg, #FFF5F1 0%, #FAFAFF 100%);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 10px 25px rgba(255,127,102,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes bounceIn { from { opacity: 0; scale: 0.95; } to { opacity: 1; scale: 1; } }

.skill-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,127,102,0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

.chat-input-wrapper { padding: 30px 40px; background: white; border-top: 2px solid var(--color-border); }
.input-box { background: #F5F5F5; border-radius: 30px; padding: 12px 24px; display: flex; align-items: center; gap: 15px; }
.input-box input { flex: 1; background: none; border: none; outline: none; font-size: 1rem; font-family: inherit; }

/* --- Skills Library --- */
.filter-tabs { display: flex; gap: 12px; margin-bottom: 40px; }
.tab { padding: 10px 24px; border-radius: 20px; background: #F5F5F5; color: var(--color-text-light); font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.tab.active { background: var(--color-primary); color: white; }
.search-bar-wrapper { margin-bottom: 24px; max-width: 600px; }
.search-bar-v2 { width: 100%; padding: 14px 20px; border-radius: var(--radius-sm); border: 2px solid var(--color-border); font-size: 1rem; font-family: inherit; outline: none; }
.card-dashed { border: 3px dashed var(--color-primary); background: #FFF9F8; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.card { background: var(--color-white); border: 2px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; transition: transform var(--transition-fast); }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06); }
.source-badge { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; margin-top: 8px; display: inline-block; }
.source-official { background: #E0F5F4; color: var(--color-secondary); }
.source-community { background: #F3E5F5; color: var(--color-twin); }
.source-mine { background: #FFE5E0; color: var(--color-primary); }

/* --- Digital Twin Chamber (Indigo Theme) --- */
.chamber-bg {
    background: #0F0E1E; /* Deep Indigo */
    color: white !important;
    min-height: 100vh;
}

.chamber-bg h1, .chamber-bg h2, .chamber-bg h3 { color: white; }
.chamber-bg .top-nav { background: rgba(15, 14, 30, 0.9); border-bottom: 2px solid #2D2B4D !important; }
.chamber-bg .logo { color: var(--color-twin); }
.chamber-bg .nav-link { color: #A0AEC0 !important; }
.chamber-bg .nav-link.active { color: var(--color-twin) !important; }

.lobster-card-v2 {
    border: 3px solid var(--color-border);
    padding: 60px 24px; /* More vertical padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    background: white;
    position: relative;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 480px; /* Force vertical slenderness */
}

.lobster-card-v2.selected {
    border-color: var(--color-primary);
    border-width: 5px; /* Thicker selected border */
    box-shadow: 0 15px 45px rgba(255, 127, 102, 0.15); /* Deep shadow */
    transform: translateY(-10px);
}

.hero-silhouette {
    height: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fragment {
    position: absolute;
    background: rgba(157, 133, 255, 0.1);
    border: 1px solid rgba(157, 133, 255, 0.3);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    backdrop-filter: blur(4px);
    animation: float 10s infinite ease-in-out;
}

/* --- Milestone Track --- */
.milestone-track {
    height: 12px;
    background: #2D2B4D;
    border-radius: 6px;
    position: relative;
    margin: 60px 0 80px;
}
.milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, #7A5CFF 0%, #9D85FF 100%);
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(157, 133, 255, 0.4);
}
.milestone-point {
    position: absolute;
    top: -40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    width: 120px;
    transform: translateX(-50%);
}
.milestone-point.locked { color: #4A5568 !important; }
.milestone-icon {
    width: 28px;
    height: 28px;
    background: #2D2B4D;
    border: 2px solid #7A5CFF;
    border-radius: 50%;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.milestone-point.done .milestone-icon { background: var(--color-twin); color: white; border-color: var(--color-white); }
.milestone-label { white-space: nowrap; margin-top: 50px; position: absolute; }

/* --- Memory Graph --- */
.graph-container {
    background: rgba(157, 133, 255, 0.02);
    border: 1px solid rgba(157, 133, 255, 0.1);
    border-radius: var(--radius-lg);
    height: 500px;
    position: relative;
    overflow: hidden;
}

.graph-node {
    position: absolute;
    padding: 12px 20px;
    background: rgba(15, 14, 30, 0.8);
    border: 1px solid var(--color-twin);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-twin);
    box-shadow: 0 0 15px rgba(157, 133, 255, 0.2);
}

.soul-stat-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(157, 133, 255, 0.1);
    padding: 30px;
    border-radius: var(--radius-lg);
}

.soul-card {
    background: rgba(157, 133, 255, 0.05);
    border: 1px solid rgba(157, 133, 255, 0.15);
    padding: 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    transition: all 0.3s;
}
.soul-card:hover { background: rgba(157, 133, 255, 0.08); border-color: var(--color-twin); transform: translateX(5px); }
.soul-card-title { font-size: 0.7rem; font-weight: 800; color: #7A5CFF; text-transform: uppercase; margin-bottom: 5px; }
.soul-card-value { font-size: 0.95rem; font-weight: 600; color: #E2E8F0; }


/* --- Community Extensions --- */
.community-header-stats {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.status-mini-card {
    background: white;
    padding: 12px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-soft);
}

.featured-banner {
    background: linear-gradient(135deg, #FFF5F1 0%, #F5F3FF 100%);
    border: 2px solid #EEE;
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    background: #F5F5F5;
    padding: 6px;
    border-radius: 30px;
    width: fit-content;
}

.sub-tab {
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: #888;
}

.sub-tab.active.lobster-tab { background: var(--color-primary); color: white; }
.sub-tab.active.twin-tab { background: var(--color-twin); color: white; }

/* Visual variations for cards */
.card-lobster { border-bottom: 6px solid var(--color-primary); }
.card-twin { border-bottom: 6px solid var(--color-twin); background: #FAF9FF; }

.verified-badge {
    background: #FFD700;
    color: #856404;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 8px;
    text-transform: uppercase;
}

/* --- Twin Sidebar States --- */
.sidebar-locked { background: #F2F2F5 !important; transition: all 0.4s ease; }
.twin-disabled-filter { filter: grayscale(100%) opacity(0.6); pointer-events: none; }
.disabled-symbol { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; opacity: 0.5;
}
.disabled-symbol::after {
    content: "/"; font-size: 160px; font-weight: 100; color: #777;
    transform: rotate(20deg);
}

/* Custom Toggle Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #EEE; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: var(--color-twin); }
input:checked + .slider:before { transform: translateX(20px); }

/* --- Twin Calibration Cards --- */
.calibration-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 24px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.sidebar-right.twin-theme { padding-top: 20px; }

.calibration-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.calibration-card:first-of-type {
    margin-top: 2px;
}

.calibration-card:hover {
    background: white;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-twin);
    box-shadow: 0 8px 32px rgba(157, 133, 255, 0.1);
    transform: translateY(-2px);
}

.calibration-question {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.calibration-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.calibration-opt {
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s;
    color: #666;
}
.calibration-card:hover .calibration-opt {
    background: rgba(157, 133, 255, 0.05);
}
.calibration-opt:hover { 
    border-color: var(--color-twin) !important; 
    color: var(--color-twin) !important; 
    background: rgba(157, 133, 255, 0.1) !important; 
}

.calibration-input {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.calibration-card:hover .calibration-input {
    background: rgba(255, 255, 255, 0.8);
}
.calibration-input:focus { 
    border-color: var(--color-twin); 
    background: white !important;
}

