:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #43e97b;
    --warning-color: #fee140;
    --danger-color: #fa709a;
    --info-color: #4facfe;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-top: 64px;
}

/* Loading spinner */
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(226, 232, 240, 0.5);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    display: block;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    height: 64px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-img {
    height: 32px;
    width: auto;
    vertical-align: middle;
}

.logo-label {
    font-size: 0.35em;
    color: var(--text-secondary);
    font-weight: normal;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.user-name {
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1001;
    animation: dropdownFadeIn 0.2s ease;
    border: 1px solid var(--border-color);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: var(--bg-primary);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item.logout {
    color: var(--danger-color);
    font-weight: 500;
}

/* 主容器布局 */
.main-container {
    display: flex;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 84px;
    height: fit-content;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-link:hover {
    background-color: var(--bg-primary);
    color: var(--primary-color);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.sidebar-icon {
    font-size: 1.2rem;
}

/* 主内容区 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 欢迎卡片 */
.welcome-card {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-content p {
    opacity: 0.9;
    font-size: 1rem;
}

.welcome-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-agent-list {
    background: linear-gradient(135deg, var(--primary-color) 0%, #bfb1cf 100%);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-agent-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-agent-list:active {
    transform: translateY(0);
}

/* 统计卡片区域 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-card.success .stat-icon {
    color: var(--success-color);
}

.stat-card.warning .stat-icon {
    color: var(--warning-color);
}

.stat-card.danger .stat-icon {
    color: var(--danger-color);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

/* 账户总资产使用小spinner */
.asset-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Agent加载使用大spinner */
.agent-loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* AI Agent 收益卡片 */
.agent-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.agent-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f0f4f8 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.agent-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--agent-bg-image, url('/static/imgs/jiqiren1.png'));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 0;
}

.agent-card:hover::after {
    transform: scale(1.1);
    opacity: 1;
}

.agent-card>* {
    position: relative;
    z-index: 1;
}

.agent-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.agent-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.agent-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 15px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.agent-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.agent-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.agent-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.agent-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 进度条 */
.progress-container {
    margin-top: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
}



.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--info-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 投资策略标签 */
.strategy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.strategy-tag {
    background: linear-gradient(135deg, var(--info-color), #00f2fe);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 图表区域 */
.chart-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-container {
    width: 100%;
    height: 350px;
    position: relative;
}

#performanceChart {
    width: 100% !important;
    height: 100% !important;
}

/* 核心功能区域 */
.features-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 风险提示 */
.risk-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 20px;
}

.risk-warning h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ICP备案信息样式 */
.icp-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc2626;
}

.icp-text {
    transition: color 0.3s ease;
}

.icp-text:hover {
    color: #b91c1c;
}

.icp-divider {
    color: #fecaca;
    font-weight: bold;
}

/* 可点击统计卡片样式 */
.clickable-stat {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clickable-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clickable-stat::after {
    content: '点击查看详情';
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 10px;
    color: #6b7280;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-stat:hover::after {
    opacity: 1;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 新建Agent卡片 */
.new-agent-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.new-agent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.new-agent-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Agent卡片样式 */
.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.agent-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.agent-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.agent-content {
    width: 100%;
}

.agent-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.agent-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

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

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.agent-progress {
    margin-bottom: 15px;
}

.progress-bar {
    height: 30px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #ffe0e0);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.progress-text {
    font-size: 0.85rem;
    opacity: 0.8;
    display: block;
    text-align: right;
}

/* 运行动画效果 */
.running-animation {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.running-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background:
        linear-gradient(45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.8) 50%,
            transparent 75%);
    background-size: 20px 20px;
    animation: wave 2s infinite linear;
}

.running-text {
    color: #ffffff;
    font-weight: bold;
    text-align: right;
    opacity: 1;
    font-size: 0.9rem;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes wave {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.running-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

.agent-strategy {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.strategy-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.new-agent-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* 模态框样式 - 新增 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    display: flex;
    flex: 1;
    min-height: 500px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
}

/* 科技感机器人区域 */
.character-section {
    width: 35%;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    border-right: 2px solid rgba(59, 130, 246, 0.3);
}

.character-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.08) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(59, 130, 246, 0.1) 1px, rgba(59, 130, 246, 0.1) 2px);
}

.character-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
    animation: glow-line 4s infinite;
}

@keyframes glow-line {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

.character-container {
    position: relative;
    width: 260px;
    height: 320px;
    margin-bottom: 15px;
    z-index: 2;
    transform: perspective(1000px) rotateY(5deg);
}

.character-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 180px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 15px 15px 10px 10px;
    box-shadow: 0 12px 30px rgba(147, 197, 253, 0.2), inset 0 -5px 15px rgba(147, 197, 253, 0.1);
    z-index: 2;
    overflow: hidden;
    border: 2px solid #93c5fd;
}

.character-body::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
    opacity: 0.8;
    animation: scan 3s infinite linear;
}

.character-head {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 130px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 20px 20px 10px 10px;
    box-shadow: 0 10px 25px rgba(147, 197, 253, 0.2),
        inset 0 -5px 10px rgba(147, 197, 253, 0.1),
        0 0 20px rgba(14, 165, 233, 0.3);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #93c5fd;
}

/* 传感器和装饰 */
.character-sensors {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.character-sensor {
    width: 8px;
    height: 8px;
    background: #f87171;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.8);
    animation: sensor-pulse 2s infinite;
}

.character-sensor:nth-child(2) {
    background: #0ea5e9;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.8);
    animation-delay: 0.5s;
}

.character-sensor:nth-child(3) {
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
    animation-delay: 1s;
}

/* 机械臂 */
.character-arm {
    position: absolute;
    top: 60px;
    width: 20px;
    height: 60px;
    background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
    border-radius: 10px;
    border: 1px solid #93c5fd;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.character-arm.left {
    left: -30px;
    transform: rotate(-10deg);
}

.character-arm.right {
    right: -30px;
    transform: rotate(10deg);
}

.character-arm::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: linear-gradient(to top, #0ea5e9, #0284c7);
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
    border: 1px solid #7dd3fc;
}

.character-face {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.character-eyes {
    display: flex;
    justify-content: space-between;
    width: 80px;
    margin-bottom: 10px;
}

.character-eye {
    width: 30px;
    height: 10px;
    background: #0369a1;
    border-radius: 5px;
    position: relative;
    animation: scan-eyes 2s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(3, 105, 161, 0.8);
    transform: skewX(-5deg);
}

.character-eye::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 2px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
}

.character-mouth {
    width: 40px;
    height: 4px;
    background: #3b82f6;
    border-radius: 2px;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
}

.character-mouth::before,
.character-mouth::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 6px;
    background: #3b82f6;
    top: -2px;
}

.character-mouth::before {
    left: 5px;
    transform: rotate(-30deg);
}

.character-mouth::after {
    right: 5px;
    transform: rotate(30deg);
}

.character-accessory {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 0 0 4px #1e293b, 0 0 15px rgba(59, 130, 246, 0.8);
    z-index: 4;
    transition: all 0.5s ease;
    animation: pulse 2s infinite;
    border: 1px solid #60a5fa;
}

/* 添加动画关键帧 */
@keyframes scan {
    0% {
        transform: translateX(-100%);
    }

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

@keyframes scan-eyes {

    0%,
    100% {
        height: 8px;
    }

    50% {
        height: 10px;
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px #1e293b, 0 0 15px rgba(59, 130, 246, 0.8);
    }

    50% {
        box-shadow: 0 0 0 4px #1e293b, 0 0 25px rgba(59, 130, 246, 1);
    }
}

@keyframes sensor-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.character-details {
    text-align: center;
    color: #1e293b;
    margin-top: 20px;
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}

.character-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
    color: #0369a1;
    letter-spacing: 0.5px;
}

.character-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 8px;
    gap: 8px;
}

.character-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 10px;
    border-radius: 6px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all 0.3s ease;
}

.character-stat:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #0284c7;
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.3);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    color: #94a3b8;
    font-weight: 500;
}

/* 表单区域 */
.form-section {
    width: 60%;
    padding: 30px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

.attribute-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.attribute-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.attribute-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #6366f1;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.attribute-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #6366f1;
}

.attribute-card.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.attribute-card.active::before {
    transform: scaleX(1);
    background: #f59e0b;
}

.attribute-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.attribute-title {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.attribute-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 止损规则样式 */
.risk-rule-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.risk-rule-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.risk-rule-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.risk-rule-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.risk-rule-number {
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 10px;
}

.risk-rule-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ef4444;
}

/* 止盈规则样式 */
.profit-rule-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profit-rule-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.profit-rule-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
}

.profit-rule-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.profit-rule-number {
    background: #22c55e;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 10px;
}

.profit-rule-title {
    font-size: 1rem;
    font-weight: 600;
    color: #22c55e;
}

/* 表单行布局 */
.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .risk-rule-item,
    .profit-rule-item {
        padding: 12px;
    }
}

.frequency-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.frequency-option {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
}

.frequency-option:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.1);
}

.frequency-option.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.15);
}

.frequency-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    min-width: 120px;
    text-align: center;
}

.frequency-right {
    flex: 1;
}

.frequency-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.frequency-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

.frequency-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.frequency-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.step-content {
    display: none;
    flex: 1;
}

.step-content.active {
    display: block;
}

/* 步骤指示器 */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 20px;
}

.steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: var(--border-color);
    z-index: 1;
    border-radius: 2px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.step.completed .step-number {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.step.active .step-label {
    color: #6366f1;
}

/* 动画效果 */
@keyframes blink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

@keyframes bounce {

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .sidebar-nav::-webkit-scrollbar {
        height: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }

    .sidebar-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .sidebar-link {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .sidebar-title {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .header {
        height: 60px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .main-container {
        padding: 16px;
        gap: 16px;
    }

    .welcome-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .welcome-actions {
        flex-direction: column;
        width: 100%;
    }

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

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

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .agent-cards,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 300px;
    }

    .steps {
        flex-wrap: wrap;
        gap: 16px;
    }

    .steps::before {
        display: none;
    }

    .step {
        flex: 1;
        min-width: 120px;
    }

    .modal-body {
        flex-direction: column;
    }

    .character-section,
    .form-section {
        width: 100%;
    }

    .character-section {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .icp-info {
        flex-direction: column;
        gap: 6px;
        font-size: 0.8rem;
    }

    .icp-divider {
        display: none;
    }

    .user-profile {
        gap: 8px;
        padding: 6px 12px;
    }

    .user-name {
        display: none;
    }

    .character-container {
        width: 220px;
        height: 280px;
    }

    .character-body {
        width: 140px;
        height: 170px;
    }

    .character-head {
        width: 100px;
        height: 100px;
        top: 20px;
    }

    .character-accessory {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .attribute-cards,
    .frequency-options {
        grid-template-columns: 1fr;
    }
}