/* CSS重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--foreground);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    background: var(--card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    font-weight: 300;
}

/* 离散系统特定样式 */
.discrete-controls-section {
    margin-bottom: 40px;
}

.section-description {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 系统类型标签 */
.system-type-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
    padding: 15px;
    border-radius: 20px;
}

.type-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: color-mix(in srgb, var(--card) 80%, transparent);
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
}

.type-tab i {
    font-size: 2rem;
    color: var(--primary);
}

.type-tab span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--foreground);
}

.type-tab small {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 5px;
}

.type-tab:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.type-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.type-tab.active i,
.type-tab.active span,
.type-tab.active small {
    color: white;
}

/* 映射分类容器 */
.map-category {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.map-category.active {
    display: block;
}

.map-category h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    color: var(--foreground);
    margin-bottom: 15px;
    font-weight: 600;
}

.category-description {
    color: var(--muted-foreground);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
}

/* 映射卡片增强样式 */
.map-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.map-card {
    background: linear-gradient(145deg, var(--card), var(--muted));
    border-radius: 15px;
    padding: 25px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.map-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    transition: height 0.3s ease;
}

.map-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.map-card:hover::before {
    height: 6px;
}

.map-card.active {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-5px);
}

.map-card.active::before {
    height: 6px;
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.map-preview {
    text-align: center;
    margin-bottom: 20px;
}

.map-preview i {
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.map-card:hover .map-preview i {
    transform: scale(1.1);
    color: var(--primary);
}

.map-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 10px;
    text-align: center;
}

.map-equation {
    font-family: 'Courier New', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--foreground);
    border-left: 3px solid var(--primary);
}

.map-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.feature-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-tag.chaos {
    background: linear-gradient(135deg, var(--destructive), #c0392b);
}

.feature-tag.bifurcation {
    background: linear-gradient(135deg, var(--chart-4), #e67e22);
}

.feature-tag.attractor {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.feature-tag.fractal {
    background: linear-gradient(135deg, #e91e63, #ad1457);
}

.feature-tag.periodic {
    background: linear-gradient(135deg, var(--secondary), #2980b9);
}

.feature-tag.smooth {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.feature-tag.piecewise {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

.feature-tag.stable {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.feature-tag.matrix {
    background: linear-gradient(135deg, #5dade2, var(--secondary));
}

.feature-tag.simple {
    background: linear-gradient(135deg, #58d68d, #28b463);
}

.feature-tag.analytical {
    background: linear-gradient(135deg, #f7dc6f, #f4d03f);
    color: var(--foreground);
}

.feature-tag.rotation {
    background: linear-gradient(135deg, #bb8fce, #a569bd);
}

.feature-tag.dimension {
    background: linear-gradient(135deg, #85929e, #566573);
}

.map-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.map-description p {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

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

/* 导航样式 */
.navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    backdrop-filter: blur(10px);
}

/* 导航分组样式 */
.nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.nav-group:hover {
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-group-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid #eee;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-group .nav-btn {
    margin: 0 5px;
    font-size: 0.9rem;
    padding: 10px 18px;
}

/* 主页按钮特殊样式 */
.navigation > .nav-btn {
    font-size: 1.1rem;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    color: var(--card);
    border: none;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(255, 234, 167, 0.4);
    margin-bottom: 10px;
}

.navigation > .nav-btn:hover {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 234, 167, 0.6);
}

.navigation > .nav-btn.active {
    background: linear-gradient(135deg, #00b894, #00cec9);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--card);
    border: none;
    border-radius: 12px;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 10%, transparent);
    border: 2px solid transparent;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.6);
}

/* 分组容器 */
.nav-groups-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

/* 主内容区域 */
.main-content {
    background: var(--card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    backdrop-filter: blur(10px);
}

/* 系统介绍卡片 */
.system-intro-section {
    margin-bottom: 50px;
}

.system-intro-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    color: var(--foreground);
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
}

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

.system-card {
    background: linear-gradient(145deg, var(--muted), var(--muted));
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    transition: height 0.3s ease;
}

.system-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.system-card:hover::before {
    height: 8px;
}

.linear-card::before {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.nonlinear-card::before {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.tools-card::before {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.linear-card .card-icon {
    color: #74b9ff;
}

.nonlinear-card .card-icon {
    color: #fd79a8;
}

.tools-card .card-icon {
    color: #00b894;
}

.system-card:hover .card-icon {
    transform: scale(1.1);
}

.system-card h3 {
    font-size: 1.5rem;
    color: var(--foreground);
    margin-bottom: 15px;
    font-weight: 600;
}

.system-card p {
    color: var(--muted-foreground);
    margin-bottom: 20px;
    line-height: 1.6;
}

.system-card ul {
    list-style: none;
    margin-bottom: 25px;
    text-align: left;
}

.system-card li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--foreground);
    font-size: 0.9rem;
}

.system-card li i {
    color: var(--primary);
    width: 16px;
}

.linear-card li i {
    color: #74b9ff;
}

.nonlinear-card li i {
    color: #fd79a8;
}

.tools-card li i {
    color: #00b894;
}

.card-actions {
    margin-top: 25px;
}

.card-btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card-btn.primary {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.card-btn.secondary {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

.card-btn.accent {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--foreground) 20%, transparent);
}

/* Enhanced Test Section Styles */
.test-section {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 40px;
}

.test-section h3 {
    margin-bottom: 30px;
    color: var(--foreground);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.test-category {
    margin-bottom: 30px;
}

.test-category h4 {
    margin-bottom: 20px;
    color: var(--foreground);
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 0 auto;
    max-width: 800px;
}

.test-btn {
    background: linear-gradient(135deg, var(--muted), var(--card));
    border: 2px solid var(--muted);
    padding: 20px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.test-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.test-btn i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.test-btn:hover i {
    color: white;
}

.test-btn div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.test-title {
    font-weight: 600;
    font-size: 1rem;
}

.test-btn small {
    color: var(--muted-foreground);
    font-size: 0.85rem;
    opacity: 0.8;
}

.test-btn:hover small {
    color: var(--card);
}

/* Educational Notes Styling */
.educational-note {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.educational-note p {
    margin: 0;
    color: var(--foreground);
    font-size: 0.95rem;
    line-height: 1.5;
}

.educational-note i {
    color: var(--primary);
    margin-right: 8px;
}

/* Enhanced Analysis Results */
.analysis-overview {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.analysis-description {
    font-size: 1.1rem;
    color: var(--foreground);
    margin: 10px 0 0 0;
}

.fixed-points-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.fixed-points-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    font-family: 'Courier New', monospace;
}

.point-label {
    font-weight: 600;
    color: var(--primary);
    min-width: 60px;
}

.point-value {
    color: var(--foreground);
    font-weight: 500;
}

.stability-item {
    background: color-mix(in srgb, var(--card) 80%, transparent);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 5%, transparent);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.periodic-orbit {
    background: color-mix(in srgb, var(--card) 80%, transparent);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #9c27b0;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.lyapunov-result {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

/* Parameter Examples Styling */
.parameter-examples {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.parameter-examples h5 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

.example-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Educational Panel Styles */
.educational-panel {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--muted), var(--card));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
}

.education-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-education-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid color-mix(in srgb, var(--card) 30%, transparent);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.toggle-education-btn:hover {
    background: color-mix(in srgb, var(--card) 30%, transparent);
    transform: translateY(-1px);
}

.education-content {
    padding: 30px;
}

.education-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    background: #f1f3f4;
    padding: 5px;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.edu-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-weight: 500;
    color: var(--muted-foreground);
}

.edu-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.edu-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.edu-panel {
    display: none;
    animation: fadeInEducation 0.4s ease-in-out;
}

.edu-panel.active {
    display: block;
}

@keyframes fadeInEducation {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.edu-panel h4 {
    text-align: center;
    color: var(--foreground);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.concept-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary);
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.concept-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    font-size: 1.5rem;
}

.concept-card h5 {
    text-align: center;
    color: var(--foreground);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.concept-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 15px;
}

.concept-formula {
    background: linear-gradient(135deg, var(--muted), var(--muted));
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

/* Example Systems */
.example-systems {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.system-example {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary);
}

.system-example h5 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--foreground);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.system-example h5 i {
    color: var(--primary);
}

.system-equation {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 20px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.system-description p {
    color: var(--foreground);
    line-height: 1.6;
    margin-bottom: 15px;
}

.system-description ul {
    list-style: none;
    padding: 0;
}

.system-description li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: var(--foreground);
}

.system-description li:last-child {
    border-bottom: none;
}

/* Application Grid */
.application-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.app-category {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.app-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    font-size: 1.8rem;
}

.app-category h5 {
    color: var(--foreground);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.app-category p {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 15px;
}

.app-example {
    background: linear-gradient(135deg, var(--muted), var(--muted));
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--foreground);
    border-left: 3px solid var(--primary);
}

.app-example strong {
    color: var(--primary);
}

/* Enhanced Analysis Panel Styling */
.analysis-panel {
    background: linear-gradient(135deg, var(--muted), var(--card));
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.analysis-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    background: #f1f3f4;
    padding: 8px;
    border-radius: 15px;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--muted-foreground);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInTab 0.5s ease-out;
}

@keyframes slideInTab {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, var(--muted), var(--muted));
    border-radius: 15px;
    border-left: 5px solid var(--primary);
}

.plot-header h3 {
    margin: 0;
    color: var(--foreground);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plot-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-btn.primary {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.action-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.plot-container {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 15px;
    min-height: 400px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.plot-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 1s;
}

.plot-container:hover::before {
    left: 100%;
}

/* Parameter Input Improvements */
.parameter-controls {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.parameter-controls h3 {
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.9rem;
}

.param-input {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.param-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.param-range {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* Loading and Error Improvements */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--foreground) 80%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

.loading-content p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--foreground);
    font-weight: 500;
}

.matrix-input-section h2 {
    color: var(--foreground);
    margin-bottom: 25px;
    font-weight: 600;
}

.matrix-container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.matrix-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--muted), var(--muted));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.bracket-left, .bracket-right {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary);
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.matrix-input {
    width: 80px;
    height: 50px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.matrix-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.analyze-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* 预设按钮 */
.presets {
    text-align: center;
}

.presets h3 {
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 500;
}

.preset-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    background: color-mix(in srgb, var(--card) 80%, transparent);
    border: 2px solid var(--border);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preset-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* 结果显示区域 */
.results-section {
    margin-top: 40px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--muted);
}

.result-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
}

.values-display {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--muted);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.phase-btn {
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: white;
}

.trajectory-btn {
    background: linear-gradient(135deg, #e53935, #ef5350);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 相图页面特定样式 */
.controls-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.matrix-input-compact {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.matrix-display-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}

.matrix-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.matrix-input-small {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.matrix-input-small:focus {
    outline: none;
    border-color: var(--primary);
}

.generate-btn {
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.parameters-section {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.parameter-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.param-input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin: 0 8px;
}

.slider {
    width: 120px;
    margin: 0 10px;
}

/* 相图显示区域 */
.portrait-section {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.portrait-container {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 400px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 20%, transparent);
    overflow: hidden;
}

.placeholder {
    color: #ccc;
    text-align: center;
}

.placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 1;
    color: #999;
}

.portrait-container img {
    max-width: 100%;
    max-height: 650px;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

.portrait-info {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--muted);
}

/* 轨迹页面特定样式 */

/* 新的页面布局：左右分栏 */
.trajectory-page-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
    align-items: start;
    padding: 20px !important;
}

/* 左侧控制面板 */
.trajectory-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 左侧面板各个卡片统一样式 */
.trajectory-left-panel > div {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border);
}

/* 覆盖子元素已有背景，避免重复 */
.trajectory-left-panel .matrix-input-compact,
.trajectory-left-panel .initial-point-input,
.trajectory-left-panel .animation-controls {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.trajectory-left-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 右侧显示区域 */
.trajectory-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 旧样式兼容 */
.trajectory-controls {
    margin-bottom: 30px;
}

.control-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.initial-point-input {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.point-inputs {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.coord-input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 6px;
    text-align: center;
}

.add-point-btn {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.animation-controls {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn.play {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.control-btn.pause {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
}

.control-btn.reset {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
}

.control-btn.clear {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.animation-settings {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
}

.time-input {
    width: 80px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-left: 8px;
}

/* 轨迹显示区域（旧样式，已废弃） */
.trajectory-display {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* 新布局：Canvas容器 */
.trajectory-page-layout .canvas-container {
    position: relative;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 15%, transparent);
    border: 2px solid var(--border);
}

/* 旧布局兼容 */
.canvas-container {
    position: relative;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 20%, transparent);
}

/* 新布局：调整Canvas尺寸 */
.trajectory-page-layout #trajectoryCanvas {
    border: 2px solid var(--foreground);
    border-radius: 10px;
    background: var(--foreground);
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 450px;
}

/* 旧布局：默认Canvas样式 */
#trajectoryCanvas {
    border: 2px solid var(--foreground);
    border-radius: 10px;
    background: var(--foreground);
    display: block;
    margin: 0 auto;
}

.canvas-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
}

.axis-labels {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.x-label {
    bottom: 10px;
    right: 10px;
}

.y-label {
    top: 10px;
    left: 10px;
}

.current-point-info {
    position: absolute;
    top: 10px;
    right: 10px;
    background: color-mix(in srgb, var(--foreground) 80%, transparent);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* 新布局：轨迹列表样式 */
.trajectory-page-layout .trajectory-list {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border);
    max-height: 350px;
    overflow-y: auto;
}

/* 旧布局：默认轨迹列表样式 */
.trajectory-list {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-height: 600px;
    overflow-y: auto;
}

.trajectory-list h3 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trajectory-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trajectory-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--muted);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.no-trajectories {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--foreground) 70%, transparent);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 30%, transparent);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.2rem;
    color: var(--foreground);
    font-weight: 500;
}

/* Mathematical Derivation Modal Styles */
.derivation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--foreground) 80%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.derivation-content {
    background: linear-gradient(135deg, var(--card), var(--muted));
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px color-mix(in srgb, var(--foreground) 30%, transparent);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.derivation-header {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.derivation-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: color-mix(in srgb, var(--card) 30%, transparent);
    transform: scale(1.1);
}

.derivation-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

.derivation-body::-webkit-scrollbar {
    width: 8px;
}

.derivation-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.derivation-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border-radius: 4px;
}

.derivation-section {
    margin-bottom: 35px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary);
}

.derivation-section h3 {
    color: var(--foreground);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.math-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.math-step {
    background: linear-gradient(135deg, var(--muted), var(--muted));
    padding: 15px 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.math-step:hover {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    transform: translateX(5px);
}

.stability-conditions {
    margin-bottom: 20px;
}

.condition {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    font-weight: 500;
}

.reasoning ul {
    list-style: none;
    padding: 0;
}

.reasoning li {
    background: linear-gradient(135deg, var(--card)3e0, #fce4ec);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    position: relative;
    padding-left: 35px;
}

.reasoning li::before {
    content: "→";
    position: absolute;
    left: 15px;
    color: #ff9800;
    font-weight: bold;
}

.lyapunov-content {
    background: linear-gradient(135deg, #f3e5f5, #e1f5fe);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.lyapunov-function {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
}

.lyapunov-function code {
    background: var(--muted);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    display: block;
    margin-top: 8px;
}

.derivation-footer {
    background: var(--muted);
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--muted);
}

.export-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.derivation-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.advanced-analysis {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f8ff, #f8f0ff);
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.advanced-analysis ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.advanced-analysis li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    padding-left: 20px;
}

.advanced-analysis li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.advanced-analysis li:last-child {
    border-bottom: none;
}

/* Enhanced Phase Portrait Styles */
.enhanced-controls-section {
    background: linear-gradient(135deg, var(--muted), var(--card));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    color: var(--foreground);
    border: 2px solid var(--border);
    box-shadow: 0 10px 40px color-mix(in srgb, var(--foreground) 8%, transparent);
}

.control-panel h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.matrix-sliders-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--card);
    border-radius: 15px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.slider-group-enhanced {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-group-enhanced label {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matrix-slider-enhanced {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--muted), var(--border));
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
}

.matrix-slider-enhanced::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 20%, transparent);
    transition: all 0.3s ease;
}

.matrix-slider-enhanced::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 40%, transparent);
}

/* Firefox滑块样式 */
.matrix-slider-enhanced::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 20%, transparent);
    transition: all 0.3s ease;
}

.matrix-slider-enhanced::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 40%, transparent);
}

.realtime-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.analysis-card {
    background: var(--card);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.analysis-card h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
}

.preset-exploration {
    background: var(--card);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.preset-exploration h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preset-buttons-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.preset-btn-enhanced {
    background: var(--background);
    border: 2px solid var(--border);
    color: var(--foreground);
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    box-shadow: var(--shadow);
}

.preset-btn-enhanced:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.enhanced-visualization {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

.viz-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.phase-portrait-enhanced,
.bifurcation-analysis {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.phase-portrait-enhanced h3,
.bifurcation-analysis h3 {
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.enhanced-visualization .plot-container {
    width: 100%;
    min-height: 420px;
    height: auto;
    padding: 0;
    margin-bottom: 15px;
    display: block;
    position: relative;
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
}

.viz-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.viz-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.viz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.viz-btn.active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.bifurcation-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.bifurcation-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--foreground);
}

.param-input-small {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
}

.generate-btn-small {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.generate-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.analysis-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eigenvalue-trajectory,
.stability-map,
.math-insights,
.export-section {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.eigenvalue-trajectory h4,
.stability-map h4,
.math-insights h4,
.export-section h4 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.mini-plot {
    width: 100%;
    height: 240px;
    border-radius: 10px;
    border: 1px solid var(--muted);
    overflow: hidden;
    position: relative;
}

@media (max-width: 1200px) {
    .enhanced-visualization {
        grid-template-columns: 1fr;
    }
    .analysis-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }
    .analysis-sidebar > div {
        flex: 1 1 320px;
    }
}


.insights-content {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.insight-item {
    margin-bottom: 10px;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.export-btn-small {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.export-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

/* Tutorial Styles */
.tutorial-section {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    display: none;
}

.tutorial-content h3 {
    color: #2e7d32;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tutorial-steps {
    margin-bottom: 25px;
}

.tutorial-step {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #4caf50;
}

.tutorial-step.active {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    animation: slideInUp 0.5s ease-out;
}

.step-number {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content p {
    color: var(--foreground);
    line-height: 1.6;
}

.tutorial-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.tutorial-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.tutorial-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tutorial-btn.close {
    background: linear-gradient(135deg, #f44336, #ef5350);
}

.tutorial-btn.close:hover {
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

/* Chaos Analysis Styles */
.chaos-controls-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 40px rgba(26, 26, 46, 0.5);
}

.attractor-selection h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e6ed;
}

.attractor-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.attractor-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid color-mix(in srgb, var(--card) 10%, transparent);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.attractor-card:hover {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    border-color: color-mix(in srgb, var(--card) 30%, transparent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--foreground) 30%, transparent);
}

.attractor-card.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.attractor-preview {
    text-align: center;
    margin-bottom: 15px;
}

.attractor-preview i {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.8;
}

.attractor-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.attractor-card p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
    line-height: 1.4;
}

.attractor-equations {
    background: color-mix(in srgb, var(--foreground) 30%, transparent);
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.attractor-equations div {
    margin-bottom: 4px;
}

.attractor-equations div:last-child {
    margin-bottom: 0;
}

.parameter-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.parameter-controls h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter-sliders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.parameter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.parameter-group label {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(102, 126, 234, 0.5));
    border-radius: 3px;
    outline: none;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.simulation-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: color-mix(in srgb, var(--foreground) 20%, transparent);
    border-radius: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.generate-btn-chaos,
.animate-btn,
.reset-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.generate-btn-chaos:hover,
.animate-btn:hover,
.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.animate-btn.active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.chaos-visualization {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.main-viz-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
}

.attractor-3d-panel,
.poincare-panel {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
    display: flex;
    flex-direction: column;
}

.attractor-3d-panel h3,
.poincare-panel h3 {
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.attractor-3d-container {
    background: #0a0a0a;
    border-radius: 15px;
    margin-bottom: 15px;
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.poincare-container {
    background: #2d2d2d;
    border-radius: 15px;
    margin-bottom: 15px;
    min-height: 420px;
    width: 100%;
    overflow: hidden;
    position: relative;
    flex: 1;
    height: 100%;
}

#poincareMap {
    width: 100%;
    height: 100%;
    min-height: 420px;
}

.view-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.view-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.view-btn.active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.poincare-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.poincare-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.poincare-button-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.btn-precise {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-precise:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-precise:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.poincare-status {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    font-style: italic;
}

.section-slider {
    width: 120px;
    margin-left: 10px;
}

.chaos-analysis-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lyapunov-panel,
.fractal-panel,
.chaos-indicators,
.export-chaos {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lyapunov-panel h4,
.fractal-panel h4,
.chaos-indicators h4,
.export-chaos h4 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.lyapunov-display,
.fractal-display {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.lyapunov-item,
.fractal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.lyapunov-item:last-child,
.fractal-item:last-child {
    border-bottom: none;
}

.lyapunov-sum {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
    font-weight: 600;
}

.lyapunov-label,
.fractal-label {
    font-weight: 500;
    color: var(--foreground);
}

.lyapunov-value,
.fractal-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--foreground);
}

.calculate-btn {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.indicator-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--muted);
    color: #6c757d;
    transition: all 0.3s ease;
}

.indicator-icon.active.chaos {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
    animation: pulse 2s infinite;
}

.indicator-icon.active.periodic {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.indicator-icon.active.strange {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    color: white;
}

.indicator-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--foreground);
    text-align: center;
}

.export-buttons-chaos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.export-btn-chaos {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.export-btn-chaos:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

/* Educational Content Styles */
.chaos-education {
    background: linear-gradient(135deg, var(--muted), var(--card));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.education-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    background: var(--muted);
    padding: 5px;
    border-radius: 12px;
}

.edu-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: #6c757d;
}

.edu-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.edu-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.education-content {
    position: relative;
}

.edu-panel {
    display: none;
}

.edu-panel.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.edu-panel h3 {
    margin-bottom: 25px;
    color: var(--foreground);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.theory-card,
.app-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary);
    transition: all 0.3s ease;
}

.theory-card:hover,
.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.theory-card h4,
.app-card h4 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theory-card p,
.app-card p {
    color: var(--foreground);
    line-height: 1.6;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary));
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 30px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 20%, transparent);
}

.timeline-year {
    position: absolute;
    left: -80px;
    top: 25px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.timeline-content h4 {
    margin-bottom: 10px;
    color: var(--foreground);
    font-weight: 600;
}

.timeline-content p {
    color: var(--foreground);
    line-height: 1.6;
}

/* Chaos Loading Animation */
.chaos-loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.chaos-orbit {
    position: absolute;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: chaosRotate 2s linear infinite;
}

.chaos-orbit:nth-child(1) {
    width: 80px;
    height: 80px;
    animation-duration: 2s;
}

.chaos-orbit:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: var(--primary);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.chaos-orbit:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #ff9800;
    animation-duration: 1s;
}

@keyframes chaosRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .controls-section {
        grid-template-columns: 1fr;
    }

    .control-group {
        grid-template-columns: 1fr;
    }

    .trajectory-display {
        grid-template-columns: 1fr;
    }

    /* 新布局响应式 */
    .trajectory-page-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .trajectory-left-panel {
        position: static;
        max-height: none;
    }

    .trajectory-page-layout #trajectoryCanvas {
        max-width: 100%;
    }

    .trajectory-page-layout .trajectory-list {
        max-height: 400px;
    }

    #trajectoryCanvas {
        width: 100%;
        height: auto;
    }

    .matrix-container {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: slideInUp 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.control-btn.play:not(:disabled):hover {
    animation: pulse 1s infinite;
}

/* 矩阵滑块样式 */
.matrix-sliders {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 10px;
    border: 1px solid #e1bee7;
}

.slider-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.slider-group label {
    font-weight: 500;
    color: var(--foreground);
    min-width: 100px;
}

.matrix-slider {
    flex: 1;
    margin: 0 15px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--primary), var(--primary));
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
}

.matrix-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--card);
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.matrix-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.realtime-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.realtime-btn.active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    animation: pulse 2s infinite;
}

/* 智能生成器页面样式 */
.text-input-section {
    margin-bottom: 40px;
}

.text-input-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    color: var(--foreground);
    margin-bottom: 20px;
    font-weight: 600;
}

.text-input-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.description-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid var(--muted);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--background);
    color: var(--foreground);
}

.description-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.description-textarea::placeholder {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

/* 紧凑的快速操作布局 */
.quick-actions-wrapper {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.example-buttons-compact {
    flex: 1;
}

.example-buttons-compact h4 {
    margin-bottom: 12px;
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.example-btn-compact {
    background: var(--background);
    border: 1.5px solid var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--foreground);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.example-btn-compact:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.example-btn-compact:active {
    transform: translateY(0);
}

.generate-ai-btn-compact {
    background: linear-gradient(135deg, var(--primary) 0%, #5a7ae8 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    height: fit-content;
}

.generate-ai-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.generate-ai-btn-compact:active {
    transform: translateY(0);
}

/* 保留旧样式以兼容 */

.example-buttons {
    margin: 25px 0;
}

.example-buttons h4 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 500;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.example-btn {
    background: var(--card);
    border: 2px solid var(--muted);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-size: 0.95rem;
}

.example-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.generate-ai-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.generate-ai-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.test-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.test-section {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.test-section h4 {
    margin-bottom: 15px;
    color: var(--foreground);
    font-weight: 600;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.test-buttons .test-btn {
    margin: 0;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* 生成的矩阵显示 */
.generated-matrix-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f0f8ff, var(--card));
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.generated-matrix-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
}

.matrix-display-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.matrix-grid-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.matrix-element {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.explanation {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--foreground) 5%, transparent);
}

.explanation h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
}

.explanation p {
    color: var(--foreground);
    line-height: 1.6;
}

/* 矩阵编辑功能样式 */
.matrix-input-edit {
    width: 70px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    background: white;
    color: var(--foreground);
    transition: all 0.3s ease;
}

.matrix-input-edit:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

.matrix-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.edit-matrix-btn, .save-matrix-btn, .cancel-edit-btn, .randomize-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.edit-matrix-btn {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
}

.save-matrix-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.cancel-edit-btn {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
}

.randomize-btn {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    color: white;
}

.edit-matrix-btn:hover, .save-matrix-btn:hover, 
.cancel-edit-btn:hover, .randomize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 手动添加初始点样式 */
.manual-point-input {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.manual-point-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.9rem;
}

.point-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coord-input-small {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    background: white;
}

.coord-input-small:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.control-btn.add-point {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    padding: 6px 12px;
    font-size: 0.9rem;
    min-width: auto;
}

.control-btn.clear-all {
    background: linear-gradient(135deg, #9c27b0, #e91e63);
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* 可视化区域 */
.visualization-section {
    margin-bottom: 40px;
}

.viz-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: start;
}

.phase-portrait-display {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.phase-portrait-display h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
}

.portrait-container-ai {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 20%, transparent);
}

.trajectory-display-ai {
    background: linear-gradient(135deg, var(--muted), var(--card));
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 10%, transparent);
}

.trajectory-display-ai h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--foreground);
    font-weight: 600;
}

.canvas-container-ai {
    position: relative;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px color-mix(in srgb, var(--foreground) 20%, transparent);
}

#trajectoryCanvas {
    border: 2px solid var(--foreground);
    border-radius: 10px;
    background: var(--foreground);
    display: block;
    margin: 0 auto;
}

.animation-controls-compact {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.control-buttons-compact {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-btn.generate-points {
    background: linear-gradient(135deg, #9c27b0, #e91e63);
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-control label {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trajectory-list-compact {
    background: color-mix(in srgb, var(--card) 80%, transparent);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--muted);
    max-height: 200px;
    overflow-y: auto;
}

.trajectory-list-compact h4 {
    margin-bottom: 10px;
    color: var(--foreground);
    font-weight: 600;
    font-size: 1rem;
}

.trajectory-items-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trajectory-item-compact {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--muted);
    font-size: 0.9rem;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--foreground) 5%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.trajectory-item-compact:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 10%, transparent);
    transform: translateY(-1px);
}

.trajectory-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.trajectory-label {
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.95rem;
}

.trajectory-coords {
    color: var(--muted-foreground);
    font-size: 0.85rem;
}

.trajectory-points {
    color: #888;
    font-size: 0.8rem;
}

.trajectory-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.trajectory-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.trajectory-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 20%, transparent);
}

.visibility-btn.visible {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.visibility-btn.hidden {
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
}

.delete-btn {
    background: linear-gradient(135deg, #f44336, #ef5350);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #e53935);
}

/* 操作按钮 */
.action-buttons-ai {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-btn-ai {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--foreground) 10%, transparent);
    font-size: 1rem;
}

.action-btn-ai.regenerate {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
}

.action-btn-ai.export {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.action-btn-ai.share {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
}

.action-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .viz-grid {
        grid-template-columns: 1fr;
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    /* 紧凑布局响应式 */
    .quick-actions-wrapper {
        flex-direction: column;
    }

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

    .example-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .action-buttons-ai {
        flex-direction: column;
        align-items: center;
    }
    
    .control-buttons-compact {
        justify-content: center;
    }
}

/* 非线性系统分析样式 */
.nonlinear-input-section {
    margin-bottom: 40px;
    background: var(--muted);
    padding: 30px;
    border-radius: 15px;
}

.nonlinear-input-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    color: var(--foreground);
    margin-bottom: 25px;
    font-weight: 600;
}

.equation-display {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.equation-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.equation-row:last-child {
    margin-bottom: 0;
}

.equation-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    width: 80px;
}

.equation-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.equation-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.math-functions {
    margin-bottom: 25px;
}

.math-functions h3 {
    color: var(--foreground);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.function-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.func-btn {
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--foreground);
}

.func-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.equation-presets {
    margin-bottom: 25px;
}

.equation-presets h3 {
    color: var(--foreground);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.preset-equation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.preset-eq-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.preset-eq-btn:hover {
    background: #f0f0f0;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.analyze-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.clear-btn {
    background: var(--destructive);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.nonlinear-results-section {
    margin-top: 40px;
}

.system-analysis-info {
    background: var(--muted);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.system-analysis-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    color: var(--foreground);
    margin-bottom: 20px;
}

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

.analysis-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.analysis-item strong {
    display: block;
    color: var(--foreground);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.analysis-item ul {
    list-style: none;
    padding: 0;
}

.analysis-item li {
    padding: 5px 0;
    font-family: 'Courier New', monospace;
}

#equilibriumPoints ul.equilibrium-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#equilibriumPoints .eq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #1f1f1f;
    font-family: 'Courier New', monospace;
}

#equilibriumPoints .eq-point {
    font-weight: 600;
}

#equilibriumPoints .eq-separator {
    color: #888;
}

#equilibriumPoints .eq-type {
    font-weight: 600;
    letter-spacing: 0.5px;
}

#equilibriumPoints .eq-type-stable {
    color: #1e8b4d;
}

#equilibriumPoints .eq-type-unstable {
    color: #d64541;
}

#equilibriumPoints .eq-type-neutral {
    color: #c49b0b;
}

.visualization-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

.phase-portrait-panel,
.trajectory-panel {
    background: var(--muted);
    padding: 25px;
    border-radius: 15px;
}

.phase-portrait-panel h3,
.trajectory-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--foreground);
    margin-bottom: 20px;
}

.phase-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.phase-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--foreground);
}

.time-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.trajectory-items {
    max-height: 200px;
    overflow-y: auto;
}

.trajectory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--muted);
    border-radius: 6px;
    border-left-width: 3px;
    border-left-style: solid;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--destructive);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.no-trajectories {
    text-align: center;
    color: var(--muted-foreground);
    font-style: italic;
    padding: 20px;
}

/* ========== 离散动力学系统增强样式 ========== */

/* 离散系统控制区域 */
.discrete-controls-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.discrete-controls-section h2 {
    color: #64ffda;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.discrete-controls-section h2 i {
    background: linear-gradient(45deg, #64ffda, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 系统类型标签页 */
.system-type-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.type-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #b0bec5;
    padding: 20px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.type-tab i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.type-tab span {
    font-weight: 600;
    font-size: 1.1rem;
}

.type-tab small {
    font-size: 0.85rem;
    opacity: 0.8;
}

.type-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.type-tab:hover:not(.active) {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    transform: translateY(-1px);
}

/* 映射类别 */
.map-category {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.map-category.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.map-category h3 {
    color: #81c784;
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-description {
    color: #b0bec5;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

/* 映射卡片画廊 */
.map-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.map-card {
    background: linear-gradient(145deg, #2a2a3e, #1e1e32);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.map-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64ffda, #00bcd4, #3f51b5);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.map-card:hover::before,
.map-card.active::before {
    transform: scaleX(1);
}

.map-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(100, 255, 218, 0.3);
}

.map-card.active {
    border-color: #64ffda;
    background: linear-gradient(145deg, #2e2e4a, #252541);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(100, 255, 218, 0.2);
}

.map-preview {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.map-preview i {
    font-size: 2.5rem;
    color: white;
}

.map-card h4 {
    color: #64ffda;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.map-equation {
    background: color-mix(in srgb, var(--foreground) 30%, transparent);
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    font-size: 0.95rem;
    margin-bottom: 15px;
    border-left: 3px solid #64ffda;
}

.map-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.feature-tag.chaos {
    background: rgba(255, 64, 129, 0.15);
    color: #ff4081;
    border-color: rgba(255, 64, 129, 0.3);
}

.feature-tag.bifurcation {
    background: rgba(255, 193, 7, 0.15);
    color: var(--chart-4);
    border-color: rgba(255, 193, 7, 0.3);
}

.feature-tag.attractor {
    background: rgba(156, 39, 176, 0.15);
    color: #9c27b0;
    border-color: rgba(156, 39, 176, 0.3);
}

.feature-tag.periodic {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.map-description {
    color: #b0bec5;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 参数控制区域 */
.parameter-controls {
    background: linear-gradient(135deg, #1e1e32, #2a2a3e);
    border-radius: 16px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.parameter-controls h3 {
    color: #81c784;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.param-range {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* 初始条件和迭代控制 */
.initial-conditions,
.iteration-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.initial-conditions h4,
.iteration-controls h4 {
    color: #64ffda;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 分析面板 */
.analysis-panel {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.analysis-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #b0bec5;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn:hover {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 绘图头部 */
.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.plot-header h3 {
    color: #64ffda;
    font-size: 1.4rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plot-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #26a69a, #00796b);
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #009688, #00695c);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.4);
}

.input-group.inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.input-group.inline label {
    white-space: nowrap;
    margin: 0;
}

.input-group.inline input,
.input-group.inline select {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    min-width: 100px;
}

/* 绘图容器 */
.plot-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
    position: relative;
}

/* 分析结果 */
.analysis-results {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(63, 81, 181, 0.1));
    border-radius: 16px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.analysis-results h4 {
    color: #64ffda;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #64ffda;
}

.analysis-section h5 {
    color: #81c784;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 测试区域 */
.test-section {
    background: linear-gradient(135deg, #2a2a3e, #1e1e32);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.test-section h3 {
    color: #ff9800;
    font-size: 1.6rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-category h4 {
    color: #64ffda;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.test-btn {
    background: linear-gradient(135deg, #37474f, #263238);
    border: 2px solid color-mix(in srgb, var(--card) 10%, transparent);
    color: white;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.test-btn:hover {
    background: linear-gradient(135deg, #455a64, #37474f);
    border-color: #64ffda;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--foreground) 30%, transparent);
}

.test-btn i {
    font-size: 1.8rem;
    color: #64ffda;
    min-width: 30px;
}

.test-title {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    display: block;
    margin-bottom: 4px;
}

.test-btn small {
    color: #b0bec5;
    font-size: 0.85rem;
}

/* 教育内容面板 */
.educational-panel {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

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

.education-header h3 {
    color: #4caf50;
    font-size: 1.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-education-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-education-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.education-content {
    animation: slideDown 0.4s ease when visible;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .discrete-controls-section,
    .analysis-panel,
    .test-section,
    .educational-panel {
        padding: 20px;
        margin-bottom: 20px;
    }

    .system-type-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .map-gallery {
        grid-template-columns: 1fr;
    }

    .parameter-inputs {
        grid-template-columns: 1fr;
    }

    .plot-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .plot-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .test-buttons {
        grid-template-columns: 1fr;
    }

    .analysis-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: center;
    }
}

/* 非线性系统分析样式 */
.nonlinear-input-section {
    margin-bottom: 40px;
    background: var(--muted);
    padding: 30px;
    border-radius: 15px;
}

.nonlinear-input-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    color: var(--foreground);
    margin-bottom: 25px;
    font-weight: 600;
}

.equation-display {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.equation-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.equation-row:last-child {
    margin-bottom: 0;
}

.equation-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    width: 80px;
}

.equation-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.equation-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.math-functions {
    margin-bottom: 25px;
}

.math-functions h3 {
    color: var(--foreground);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.function-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.func-btn {
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--foreground);
}

.func-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.equation-presets {
    margin-bottom: 25px;
}

.equation-presets h3 {
    color: var(--foreground);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.preset-equation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.preset-eq-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.preset-eq-btn:hover {
    background: #f0f0f0;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.analyze-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.clear-btn {
    background: var(--destructive);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.nonlinear-results-section {
    margin-top: 40px;
}

.system-analysis-info {
    background: var(--muted);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.system-analysis-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    color: var(--foreground);
    margin-bottom: 20px;
}

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

.analysis-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.analysis-item strong {
    display: block;
    color: var(--foreground);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.analysis-item ul {
    list-style: none;
    padding: 0;
}

.analysis-item li {
    padding: 5px 0;
    font-family: 'Courier New', monospace;
}

#equilibriumPoints ul.equilibrium-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#equilibriumPoints .eq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #1f1f1f;
    font-family: 'Courier New', monospace;
}

#equilibriumPoints .eq-point {
    font-weight: 600;
}

#equilibriumPoints .eq-separator {
    color: #888;
}

#equilibriumPoints .eq-type {
    font-weight: 600;
    letter-spacing: 0.5px;
}

#equilibriumPoints .eq-type-stable {
    color: #1e8b4d;
}

#equilibriumPoints .eq-type-unstable {
    color: #d64541;
}

#equilibriumPoints .eq-type-neutral {
    color: #c49b0b;
}

.visualization-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

.phase-portrait-panel,
.trajectory-panel {
    background: var(--muted);
    padding: 25px;
    border-radius: 15px;
}

.phase-portrait-panel h3,
.trajectory-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--foreground);
    margin-bottom: 20px;
}

.portrait-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portrait-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.placeholder {
    text-align: center;
    color: var(--muted-foreground);
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.phase-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.phase-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--foreground);
}

.slider {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
}

.canvas-container {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

#nonlinearTrajectoryCanvas {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: crosshair;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.axis-labels {
    position: absolute;
    bottom: 25px;
    right: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.x-label {
    position: absolute;
    right: 0;
    bottom: 0;
}

.y-label {
    position: absolute;
    right: 15px;
    bottom: -5px;
}

.animation-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.control-btn {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.control-btn:hover {
    background: #f0f0f0;
    border-color: var(--primary);
}

.control-btn.play {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.control-btn.pause {
    background: var(--chart-4);
    color: white;
    border-color: var(--chart-4);
}

.control-btn.reset {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.control-btn.clear {
    background: var(--destructive);
    color: white;
    border-color: var(--destructive);
}

.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.initial-point-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.initial-point-controls label {
    font-weight: 500;
    color: var(--foreground);
}

.coord-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

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

.time-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.trajectory-list {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.trajectory-list h4 {
    font-size: 1.1rem;
    color: var(--foreground);
    margin-bottom: 15px;
}

.trajectory-items {
    max-height: 200px;
    overflow-y: auto;
}

.trajectory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--muted);
    border-radius: 6px;
    border-left-width: 3px;
    border-left-style: solid;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--destructive);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.no-trajectories {
    text-align: center;
    color: var(--muted-foreground);
    font-style: italic;
    padding: 20px;
}

/* ========== 离散动力学系统增强样式 ========== */

/* 离散系统控制区域 */
.discrete-controls-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.discrete-controls-section h2 {
    color: #64ffda;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.discrete-controls-section h2 i {
    background: linear-gradient(45deg, #64ffda, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 系统类型标签页 */
.system-type-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.type-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #b0bec5;
    padding: 20px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.type-tab i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.type-tab span {
    font-weight: 600;
    font-size: 1.1rem;
}

.type-tab small {
    font-size: 0.85rem;
    opacity: 0.8;
}

.type-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.type-tab:hover:not(.active) {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    transform: translateY(-1px);
}

/* 映射类别 */
.map-category {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.map-category.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.map-category h3 {
    color: #81c784;
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-description {
    color: #b0bec5;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

/* 映射卡片画廊 */
.map-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.map-card {
    background: linear-gradient(145deg, #2a2a3e, #1e1e32);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.map-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64ffda, #00bcd4, #3f51b5);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.map-card:hover::before,
.map-card.active::before {
    transform: scaleX(1);
}

.map-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(100, 255, 218, 0.3);
}

.map-card.active {
    border-color: #64ffda;
    background: linear-gradient(145deg, #2e2e4a, #252541);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(100, 255, 218, 0.2);
}

.map-preview {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.map-preview i {
    font-size: 2.5rem;
    color: white;
}

.map-card h4 {
    color: #64ffda;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.map-equation {
    background: color-mix(in srgb, var(--foreground) 30%, transparent);
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    font-size: 0.95rem;
    margin-bottom: 15px;
    border-left: 3px solid #64ffda;
}

.map-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.feature-tag.chaos {
    background: rgba(255, 64, 129, 0.15);
    color: #ff4081;
    border-color: rgba(255, 64, 129, 0.3);
}

.feature-tag.bifurcation {
    background: rgba(255, 193, 7, 0.15);
    color: var(--chart-4);
    border-color: rgba(255, 193, 7, 0.3);
}

.feature-tag.attractor {
    background: rgba(156, 39, 176, 0.15);
    color: #9c27b0;
    border-color: rgba(156, 39, 176, 0.3);
}

.feature-tag.periodic {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.map-description {
    color: #b0bec5;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 参数控制区域 */
.parameter-controls {
    background: linear-gradient(135deg, #1e1e32, #2a2a3e);
    border-radius: 16px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.parameter-controls h3 {
    color: #81c784;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.param-range {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* 初始条件和迭代控制 */
.initial-conditions,
.iteration-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.initial-conditions h4,
.iteration-controls h4 {
    color: #64ffda;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 分析面板 */
.analysis-panel {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--foreground) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.analysis-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #b0bec5;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn:hover {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 绘图头部 */
.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.plot-header h3 {
    color: #64ffda;
    font-size: 1.4rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plot-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #26a69a, #00796b);
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #009688, #00695c);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.4);
}

.input-group.inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.input-group.inline label {
    white-space: nowrap;
    margin: 0;
}

.input-group.inline input,
.input-group.inline select {
    background: color-mix(in srgb, var(--card) 10%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    min-width: 100px;
}

/* 绘图容器 */
.plot-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
    position: relative;
}

/* 分析结果 */
.analysis-results {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(63, 81, 181, 0.1));
    border-radius: 16px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.analysis-results h4 {
    color: #64ffda;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #64ffda;
}

.analysis-section h5 {
    color: #81c784;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 测试区域 */
.test-section {
    background: linear-gradient(135deg, #2a2a3e, #1e1e32);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

.test-section h3 {
    color: #ff9800;
    font-size: 1.6rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-category h4 {
    color: #64ffda;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.test-btn {
    background: linear-gradient(135deg, #37474f, #263238);
    border: 2px solid color-mix(in srgb, var(--card) 10%, transparent);
    color: white;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.test-btn:hover {
    background: linear-gradient(135deg, #455a64, #37474f);
    border-color: #64ffda;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--foreground) 30%, transparent);
}

.test-btn i {
    font-size: 1.8rem;
    color: #64ffda;
    min-width: 30px;
}

.test-title {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    display: block;
    margin-bottom: 4px;
}

.test-btn small {
    color: #b0bec5;
    font-size: 0.85rem;
}

/* 教育内容面板 */
.educational-panel {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid color-mix(in srgb, var(--card) 10%, transparent);
}

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

.education-header h3 {
    color: #4caf50;
    font-size: 1.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-education-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-education-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.education-content {
    animation: slideDown 0.4s ease when visible;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .discrete-controls-section,
    .analysis-panel,
    .test-section,
    .educational-panel {
        padding: 20px;
        margin-bottom: 20px;
    }

    .system-type-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .map-gallery {
        grid-template-columns: 1fr;
    }

    .parameter-inputs {
        grid-template-columns: 1fr;
    }

    .plot-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .plot-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .test-buttons {
        grid-template-columns: 1fr;
    }

    .analysis-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: center;
    }
}
