/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: static;
    height: 60px;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
    color: #667eea;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.logo-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 8px;
}

.navbar-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    /* /* transition: all 0.2s ease; */ */
    position: relative;
}

.nav-item:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-item.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

/* 主容器布局 */
.container {
    display: flex;
    max-width: 1600px;
    width: 100%;
    margin: 5px auto 20px;
    gap: 20px;
    padding: 0 20px;
    height: calc(100vh - 240px);
    min-height: 600px;
    justify-content: center;
    align-items: flex-start;
}

/* 左侧栏 */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    padding-bottom: 120px;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    /* transition: all 0.3s ease; */
    color: #666;
}

.collapse-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #667eea;
}

.sidebar-content {
    padding: 20px;
    height: calc(100% - 80px);
    overflow-y: auto;
    padding-bottom: 0;
}

.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .config-section,
.sidebar.collapsed .config-actions {
    display: none;
}

.sidebar.collapsed .collapse-btn {
    transform: rotate(180deg);
}

/* 配置区域样式 */
.config-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #667eea;
}

.config-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-item {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    font-size: 13px;
    color: #666;
    background: white;
}

.config-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.config-item.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 500;
}

/* 推荐选项样式 */
.config-item.recommended {
    position: relative;
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0.05) 100%);
    color: #e67e22;
    font-weight: 500;
}

.config-item.recommended:hover {
    border-color: #e67e22;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.08) 100%);
    /* transform: translateY(-1px); */
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.config-item.recommended.active {
    border-color: #e67e22;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(243, 156, 18, 0.1) 100%);
    color: #d35400;
}

/* 禁用选项样式 */
.config-item.disabled {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    font-style: italic;
}

.config-item.disabled:hover {
    border-color: #e9ecef;
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

/* 模板列表样式 */
.template-category {
    margin-bottom: 15px;
}

.category-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-item {
    padding: 8px 12px;
    margin: 4px 0;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    background: white;
}

.template-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.template-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.template-item.active .template-name {
    color: #667eea;
    font-weight: 600;
}

.template-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.template-desc {
    font-size: 11px;
    color: #666;
}

/* 工具按钮样式 */
.tools-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.tools-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.tools-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    font-size: 12px;
    color: #666;
}

.tool-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-icon {
    font-size: 14px;
}

/* 右侧水平工具栏 */
.tools-section-horizontal {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e8e8e8;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 应用标题样式 */
.app-title {
    text-align: center;
    padding: 12px 0;
    background: #ffffff;
    position: sticky;
    top: 80px; /* 工具栏高度 + 间距 */
    z-index: 99;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.app-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.tool-btn-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    font-size: 13px;
    flex: 1;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tool-btn-horizontal:hover {
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); */
}

.tool-btn-horizontal:active {
    transform: translateY(0);
}

/* 配置按钮 */
.config-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.config-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    /* transition: all 0.3s ease; */
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

/* 横排模块区域 */
.horizontal-modules {
    max-width: 1600px;
    width: 100%;
    margin: 30px auto 10px;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: flex-end;
    min-height: 240px;
    align-items: stretch;
    box-sizing: border-box;
}

.horizontal-modules .beginner-guide {
    width: 960px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 240px;
    min-height: 240px;
    /* transition: all 0.3s ease; */
    flex-shrink: 0;
}

.horizontal-modules .guide-progress-horizontal {
    width: 576px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 240px;
    min-height: 240px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.horizontal-modules {
    width: 1600px;
    margin: 30px auto 20px;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: flex-end;
    min-height: 240px;
    align-items: stretch;
    box-sizing: border-box;
}

.horizontal-modules .progress-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}



/* 新手向导样式 */
.beginner-guide {
    margin-bottom: 30px;
}

.horizontal-modules .guide-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.guide-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.guide-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: stretch;
}

.horizontal-modules .guide-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: stretch;
    flex: 1;
}

.horizontal-modules .option-card {
    flex: 1;
    min-height: 160px;
    padding: 18px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
}

.option-card {
    padding: 25px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.horizontal-modules .option-card.recommended {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    /* transform: translateY(-2px); */
}

.horizontal-modules .option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.horizontal-modules .option-icon {
    font-size: 20px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

.horizontal-modules .option-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.02em;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.option-icon {
    font-size: 20px;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.recommended-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.horizontal-modules .option-desc {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
    font-weight: 400;
}

.horizontal-modules .option-steps {
    text-align: center;
    color: #667eea;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
    margin-top: auto;
}

.horizontal-modules .option-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
}

.horizontal-modules .option-btn:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.option-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.option-steps {
    text-align: center;
    color: #667eea;
    font-size: 13px;
    font-weight: 500;
}

.option-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

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

.template-quick-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 8px;
}

.template-item-mini {
    padding: 12px 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    border-radius: 12px;
    font-size: 12px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-item-mini:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    color: #5a67d8;
}

/* 配置进度条 */
.guide-progress-horizontal {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.horizontal-modules .progress-header-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.horizontal-modules .progress-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.02em;
}

.progress-header-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.progress-count {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}

.horizontal-modules .step-guide-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex: 1;
}

.horizontal-modules .step-item-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 110px;
    padding: 12px 8px;
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.8);
    transition: all 0.3s ease;
}

.horizontal-modules .step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e4f3, #d1c7e8);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

.step-guide-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.step-item-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 120px;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e4f3, #d1c7e8);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.horizontal-modules .step-item-horizontal.active .step-number {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    /* transform: scale(1.1); */
}

.step-item-horizontal.completed .step-number {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 3px 8px rgba(139, 92, 246, 0.3);
}

.step-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    cursor: default;
}

.step-text:hover::after {
    content: attr(data-full-text);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInTooltip 0.3s ease forwards;
}

/* @keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
} */

.step-item-horizontal.active .step-text {
    color: #8b5cf6;
    font-weight: 600;
}

.step-status {
    font-size: 12px;
}

.step-arrow {
    color: #e1e5e9;
    font-size: 16px;
    font-weight: bold;
}

.config-hint-small {
    text-align: left;
    font-size: 12px;
    color: #4a5568;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: auto;
    border: 1px solid rgba(102, 126, 234, 0.1);
    font-weight: 500;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
}

/* 右栏 - 指令树制作器 */
.right-panel {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 新手指南美化样式 */
.guide-interface {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    color: white;
}

.guide-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rocket-icon {
    font-size: 32px;
    margin-right: 10px;
    /* animation: bounce 2s infinite; */
}

/* @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
} */

.guide-intro {
    text-align: center;
    margin-bottom: 30px;
}

.intro-text {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.guide-modes h4 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.clipboard-icon {
    font-size: 24px;
    margin-right: 8px;
}

.mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.mode-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card:hover {
    /* transform: translateY(-5px); */
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.mode-card.recommended {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mode-card.recommended::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    border-radius: 16px 16px 0 0;
}

.mode-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.mode-icon {
    font-size: 32px;
    margin-right: 5px;
}

.mode-title {
    font-size: 20px;
    font-weight: 700;
    margin-right: 10px;
}

.recommended-badge,
.experience-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.recommended-badge {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
}

.experience-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mode-desc p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
    opacity: 0.9;
}

.mode-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode-steps span {
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.mode-steps span:hover {
    background: rgba(255, 255, 255, 0.2);
    /* transform: scale(1.05); */
}

.guide-tips h4 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tip-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tip-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 5px;
}

.tip-content h5 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.tip-content p {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.ready-section {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ready-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.ready-text {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .mode-cards {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-interface {
        margin: 10px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .guide-content h3 {
        font-size: 24px;
    }
    
    .mode-card {
        padding: 20px;
    }
    
    .tip-item {
        flex-direction: column;
        text-align: center;
    }
}

.right-header {
    padding: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.right-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.right-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.right-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: transparent;
}

/* 树形结构样式 */
.tree-canvas {
    min-height: 400px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 25px;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 树形节点样式 */
.tree-node {
    margin-bottom: 12px;
    position: relative;
    /* 改善拖拽体验 */
    touch-action: none;
    -webkit-user-drag: element;
}

/* 树形连接线 */
.tree-node::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.tree-node::after {
    content: '';
    position: absolute;
    left: -15px;
    top: 24px;
    width: 12px;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.tree-node:last-child::before {
    height: 24px;
}

/* 根节点不显示连接线 */
.tree-node[style*="margin-left: 0px"]::before,
.tree-node[style*="margin-left: 0px"]::after {
    display: none;
}

.node-content {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(5px);
    position: relative;
}

.node-content:hover {
    border-color: #9db5a0;
    box-shadow: 0 4px 12px rgba(157, 181, 160, 0.15);
    /* transform: translateY(-1px); */
}

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

.node-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.node-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.node-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.has-requirements-badge {
    font-size: 12px;
    background: linear-gradient(135deg, #9db5a0, #7a9b7e);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 8px;
}

.node-actions {
    display: flex;
    gap: 3px;
    opacity: 0.7;
    flex-wrap: wrap;
    /* transition: opacity 0.3s ease; */
}

.node-content:hover .node-actions {
    opacity: 1;
}

.node-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid #e1e5e9;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    backdrop-filter: blur(3px);
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-btn:hover {
    background: #f8f9fa;
    border-color: #9db5a0;
    color: #333;
}

.node-btn.add:hover {
    background: linear-gradient(135deg, #9db5a0, #7a9b7e);
    color: white;
    border-color: #9db5a0;
}

.node-btn.edit:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-color: #8b5cf6;
}

.node-btn.delete:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-color: #ff6b6b;
}

.node-btn.promote:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border-color: #ff9800;
}

.node-btn.sort-up:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-color: #2196f3;
}

.node-btn.sort-down:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-color: #2196f3;
}

/* 右键菜单样式 */
.context-menu {
    font-family: inherit;
    font-size: 14px;
    user-select: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #333;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item.danger:hover {
    background-color: #ffebee;
    color: #d32f2f;
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

.menu-disabled {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.menu-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

.node-requirements {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.requirements-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.requirements-text {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #8b5cf6;
}

/* 编辑弹窗样式 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* animation: fadeIn 0.3s ease; */
}

/* @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
} */

.edit-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* animation: slideIn 0.3s ease; */
}

/* @keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
} */

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.edit-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

.edit-modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #f0f0f0;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e5e9;
}

.btn-cancel:hover {
    background: #e9ecef;
    color: #333;
}

.btn-save {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

.btn-save:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 树形容器样式优化 */
.tree-container {
    /* animation: fadeInUp 0.5s ease; */
}

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

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.tree-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.add-root-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.add-root-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 节点动画效果 */
.tree-node {
    /* animation: slideInLeft 0.3s ease; */
}

/* @keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} */

/* 空树状态样式 */
.empty-tree {
    text-align: center;
    padding: 80px 40px 60px;
    color: #6c757d;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.8) 100%);
    border: 2px dashed #dee2e6;
    border-radius: 16px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.empty-tree::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.03) 50%, transparent 70%);
    pointer-events: none;
}

.empty-tree p {
    margin: 0;
    font-size: 14px;
}

.empty-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

/* 引导操作按钮样式 */
.guide-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

.guide-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

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

.guide-action-btn.secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 1px solid #dee2e6;
}

.guide-action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.guide-action-btn.secondary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.guide-action-btn .btn-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.guide-action-btn:hover .btn-icon {
    transform: scale(1.1);
}

.guide-action-btn .btn-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 树形结构头部操作按钮容器 */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.header-actions .guide-action-btn {
    font-size: 13px;
    padding: 8px 16px;
    min-height: 36px;
}

.header-actions .guide-action-btn .btn-icon {
    font-size: 14px;
}

.header-actions .guide-action-btn .btn-text {
    font-size: 13px;
}

.guide-interface {
    text-align: center;
}

.guide-content h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.guide-intro {
    margin-bottom: 20px;
}

.intro-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.guide-modes h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mode-card {
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.mode-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mode-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mode-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .container {
        width: 100%;
        max-width: 1600px;
        padding: 15px;
        gap: 15px;
    }
    
    .sidebar,
    .right-panel {
        flex: 1;
        min-width: 0;
    }
    
    .sidebar {
        max-width: 280px;
    }
    
    .right-panel {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        width: 100%;
    }
    
    .sidebar,
    .right-panel {
        width: 100%;
        max-width: none;
        flex: none;
        border-radius: 12px;
    }
    
    .sidebar {
        max-height: 400px;
        order: 1;
    }
    
    .right-panel {
        order: 2;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 15px;
    }
    
    .navbar-menu {
        gap: 15px;
    }
    
    .nav-item {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .container {
        margin: 75px 15px 15px;
        padding: 0;
    }
    
    .guide-options {
        grid-template-columns: 1fr;
    }
    
    .step-guide-horizontal {
        flex-direction: column;
        gap: 10px;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

/* 新的专业拖拽样式 */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #007bff;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: rotate(3deg);
    opacity: 0.8;
}

.drag-active {
    cursor: grabbing !important;
    user-select: none;
}

.drag-active * {
    cursor: grabbing !important;
    user-select: none;
}

.drop-zone {
    position: relative;
}

.drop-zone.drag-over {
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
    border-radius: 4px;
}

.drop-indicator {
    position: absolute;
    height: 2px;
    background-color: #007bff;
    border-radius: 1px;
    z-index: 1000;
    transition: all 0.2s ease;
}

.drop-indicator::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
}

.drop-indicator::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
}

.node-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.drop-target-highlight {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border: 2px dashed #007bff !important;
    border-radius: 4px !important;
    transition: all 0.2s ease;
}

.drop-before {
    border-top: 3px solid #007bff !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.drop-after {
    border-bottom: 3px solid #007bff !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.drop-inside {
    background-color: rgba(76, 175, 80, 0.1) !important;
    border: 2px dashed #4caf50 !important;
    border-radius: 8px !important;
}

.tree-node.pre-dragging {
    cursor: grabbing;
}

.tree-node.dragging {
    opacity: 0.6;
    transform: scale(0.98);
    cursor: grabbing;
}

.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.is-dragging * {
    cursor: grabbing !important;
}
    transition: all 0.2s ease;
}

.tree-node {
    position: relative;
    transition: all 0.2s ease;
}

.tree-node:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.node-item {
    cursor: grab;
    transition: all 0.2s ease;
}

.node-item:active {
    cursor: grabbing;
}

/* 插入位置指示器 - 简化版 */
.insert-indicator {
    position: absolute;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #4caf50;
    z-index: 1001;
    opacity: 0;
}

.insert-indicator.active {
    opacity: 1;
}

/* 自定义弹窗系统 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    /* animation: modalFadeIn 0.3s ease; */
    backdrop-filter: blur(4px);
}

/* @keyframes modalFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(4px);
    }
} */

.custom-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.custom-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-bottom: 1px solid #e8ecf4;
}

.custom-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.custom-modal-icon.confirm {
    background: linear-gradient(135deg, #fef3cd, #fff3cd);
    color: #856404;
    border: 2px solid #ffeaa7;
}

.custom-modal-icon.alert {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #f1b0b7;
}

.custom-modal-icon.prompt {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 2px solid #abdde5;
}

.custom-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
}

.custom-modal-body {
    padding: 24px;
    text-align: center;
}

.custom-modal-message {
    font-size: 15px;
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
}

.custom-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    background: #fafbfc;
}

.custom-modal-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.custom-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    background: #fafbfc;
}

.custom-modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.custom-modal-btn:active::before {
    width: 300px;
    height: 300px;
}

.custom-modal-btn.cancel {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.custom-modal-btn.cancel:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #495057;
    /* transform: translateY(-1px); */
    /* box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2); */
}

.custom-modal-btn.confirm {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: 2px solid transparent;
}

.custom-modal-btn.confirm:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    /* transform: translateY(-1px); */
    /* box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); */
}

.custom-modal-btn.danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 2px solid transparent;
}

.custom-modal-btn.danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    /* transform: translateY(-1px); */
    /* box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4); */
}

/* 单按钮布局 */
.custom-modal-footer.single {
    justify-content: center;
}

.custom-modal-footer.single .custom-modal-btn {
    flex: 0 0 120px;
}

/* 固定浮动的添加根节点按钮 */
.floating-add-root-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    user-select: none;
    min-width: 140px;
    justify-content: center;
}

.floating-add-root-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

.floating-add-root-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.floating-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn-icon svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.floating-add-root-btn:hover .floating-btn-icon svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.floating-add-root-btn:active .floating-btn-icon svg {
    transform: scale(0.95) rotate(0deg);
}

.floating-btn-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.floating-add-root-btn:hover .floating-btn-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateX(2px);
}

/* 按钮隐藏状态 */
.floating-add-root-btn.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

/* 按钮显示动画 */
.floating-add-root-btn.show {
    animation: floatingBtnSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* 按钮脉冲效果 */
.floating-add-root-btn.pulse {
    animation: floatingBtnPulse 2s infinite;
}

.floating-add-root-btn.pulse .floating-btn-icon svg {
    animation: iconBreathe 2s ease-in-out infinite;
}

/* SVG图标通用样式 */
svg {
    transition: all 0.2s ease;
}

/* 导航栏Logo图标 */
.logo-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 步骤状态图标 */
.step-status svg {
    color: #ff6b6b;
}

.step-item-horizontal.completed .step-status svg {
    color: #51cf66;
}

/* 选项图标 */
.option-icon svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 工具按钮图标 */
.tool-btn-horizontal .btn-icon svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.tool-btn-horizontal:hover .btn-icon svg {
    transform: scale(1.1);
}

/* 步骤箭头 */
.step-arrow svg {
    color: #74c0fc;
    opacity: 0.8;
}

/* 提示图标 */
.hint-icon svg {
    color: #ffd43b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 模板快速列表图标 */
.template-item-mini svg {
    margin-right: 6px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.template-item-mini:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

/* 指令树制作器图标 */
.tree-header h3 svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.add-root-btn svg {
    margin-right: 6px;
}

.guide-action-btn svg {
    margin-right: 6px;
}

/* 侧边栏折叠按钮 */
.collapse-btn svg {
    transition: transform 0.3s ease;
}

.collapse-btn:hover svg {
    transform: scale(1.1);
}

.sidebar.collapsed .collapse-btn svg {
    transform: rotate(180deg);
}

@keyframes floatingBtnPulse {
    0% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5), 0 0 0 10px rgba(255, 107, 107, 0.2);
    }
    100% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
    }
}

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

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    .floating-add-root-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
        min-width: 120px;
        font-size: 13px;
    }
    
    .floating-btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .floating-btn-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .floating-btn-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .floating-add-root-btn {
        bottom: 15px;
        right: 15px;
        padding: 12px 16px;
        min-width: 100px;
        font-size: 12px;
        border-radius: 40px;
    }
    
    .floating-btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .floating-btn-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .floating-btn-text {
        font-size: 12px;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .custom-modal-content {
        margin: 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .custom-modal-header {
        padding: 20px 20px 12px;
    }
    
    .custom-modal-body {
        padding: 20px;
    }
    
    .custom-modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }
    
    .custom-modal-btn {
        flex: none;
    }
}