:root {
    --primary: #4a6bff;
    --secondary: #ff6b6b;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --normal: #a8a878;
    --fire: #f08030;
    --water: #6890f0;
    --electric: #f8d030;
    --grass: #78c850;
    --ice: #98d8d8;
    --fighting: #c03028;
    --poison: #a040a0;
    --ground: #e0c068;
    --flying: #a890f0;
    --psychic: #f85888;
    --bug: #a8b820;
    --rock: #b8a038;
    --ghost: #705898;
    --dragon: #7038f8;
    --dark: #705848;
    --steel: #b8b8d0;
    --fairy: #ee99ac;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 380px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border);
    transition: all 0.3s ease;
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-x: hidden; 
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
}
.collapsed .explain{
    display: none;
}
/* 视图模式切换按钮 */
.view-mode-toggle {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}

.collapsed .view-mode-toggle {
    display: none;
}

.view-mode-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background-color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-mode-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.view-mode-btn:not(.active):hover {
    background-color: #f0f0f0;
}

/* 设计搜索框 */
.design-search {
    display: flex;
    margin: 10px 15px 15px;
    gap: 8px;
}

.collapsed .design-search {
    display: none;
}

.design-search input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}

.design-search button {
    padding: 0 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.design-search button:hover {
    background-color: #3a5bef;
}

.new-design-btn {
    display: block;
    width: calc(100% - 30px);
    margin: 15px;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.restore-design {
    /* 布局 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    
    /* 视觉 */
    background: #f0f4f8; /* 柔和的浅灰色背景 */
    color: #486581; /* 深灰蓝色文字 */
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    
    /* 文字 */
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.25px;
    
    /* 过渡效果 */
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    
    /* 图标样式 */
    & i {
      font-size: 12px;
      transition: transform 0.2s ease;
    }
  }
.new-design-btn:hover {
    background-color: #3a5bef;
}

.collapsed .new-design-btn {
    display: none;
}

.collapsed .new-design-btn span {
    display: none;
}

.history-list {
    list-style: none;
    padding: 0 15px;
}

.history-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: var(--background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.history-item-delete {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 5px;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.collapsed .history-item-delete {
    display: none;
}

.history-item:hover {
    background-color: #e0e5ff;
}

.history-item.active {
    background-color: #d0d8ff;
    border-left: 4px solid var(--primary);
}

.history-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.history-item-id {
    font-size: 0.8em;
    color: var(--text-light);
    cursor: help;
    margin-left: 8px;
}

.copy-id-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    margin-left: 4px;
    padding: 2px;
}

.copy-id-btn:hover {
    color: var(--primary);
}

.collapsed .sidebar-header {
    justify-content: center;
    padding: 15px 0;
}

.collapsed .sidebar-title,
.collapsed .history-item-name,
.collapsed .history-item-date,
.collapsed .history-item-id {
    display: none;
}

.collapsed .history-item {
    justify-content: center;
    padding: 12px;
}
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: var(--background);
    border-radius: 8px;
    transition: all 0.2s;
    margin: 0;
}

.collapsed .pagination-controls {
    display: none;
}

.pagination-controls button {
    padding: 2px 1px;
    background-color: var(--primary-color, #28a745);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: var(--primary-hover, #218838);
    transform: translateY(-1px);
}

.pagination-controls button:active:not(:disabled) {
    transform: translateY(0);
}

.pagination-controls button:disabled {
    background-color: var(--disabled-bg, #e9ecef);
    color: var(--disabled-text, #6c757d);
    cursor: not-allowed;
}

.pagination-controls span {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    margin: 0 5px;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 10px;
    /* word-break: break-all; */
}

.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bef;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #e05a5a;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background-color: #f0f0f0;
}

/* 宝可梦设计卡片 */
.pokemon-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.pokemon-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.pokemon-image-container {
    width: 512px;
    height: 512px;
    border-radius: 12px;
    /* background-color: #f0f0f0; */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 30px;
    position: relative;
    overflow: hidden;
}

.pokemon-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pokemon-basic-info {
    flex: 1;
}

.pokemon-name {
    font-size: 2rem;
    font-weight: 700;
}

.pokemon-types {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap; 
}

.type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.pokemon-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-right: 6px;
}

.stat-value {
    font-weight: 500;
    z-index: 9999;
}

/* 视图模式特定样式 */
.local-view .history-item {
    background-color: #f0f8ff;
}

.server-view .history-item {
    background-color: #fff8f0;
}

.local-view .history-item.active {
    background-color: #d0e8ff;
    border-left: 4px solid var(--primary);
}

.server-view .history-item.active {
    background-color: #ffe8d0;
    border-left: 4px solid var(--secondary);
}
/* 属性部分 */
.pokemon-attributes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.attribute-section {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary);
}

.description-text {
    line-height: 1.6;
    color: var(--text-light);
}

.abilities-list {
    list-style: none;
}

.ability-item {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.ability-name {
    font-weight: 500;
}

.ability-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* 种族值图表 */
.stats-chart {
    margin-top: 20px;
}

.stat-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    font-weight: 600;
}

.stat-total-label {
    color: var(--text-light);
}

.stat-total-value {
    color: var(--primary);
    font-size: 1.1rem;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.stat-label {
    width: 50px;
    font-weight: 500;
}

.stat-bar-container {
    flex: 1;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.stat-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
    z-index: 1;
}

.stat-value {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: white;
    text-shadow: 1px 1px 5px black;
    z-index: 2;
}
.stat-value-SHEN {
    /* position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%); */
    font-size: 0.8rem;
    color: black;
}
/* 技能部分 */
.moves-section {
    margin-top: 30px;
}

.move-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.move-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.move-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.move-tab:hover:not(.active) {
    background-color: #f0f0f0;
}

.move-list {
    display: none;
}

.move-list.active {
    display: block;
}

.move-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.move-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.move-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.move-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-align: center;
}

.move-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
}

.move-stat {
    font-size: 0.9rem;
}

.move-stat-label {
    color: var(--text-light);
    margin-right: 4px;
}

.move-desc {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* AI对话部分 */
.ai-section {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ai-title {
    font-size: 1.5rem;
    font-weight: 600;
}
.ai-title img{
    width: 50px;
    height: 50px;
}
.ai-settings {
    display: flex;
    gap: 15px;
}

.setting-group {
    display: flex;
    align-items: center;
}

.setting-label {
    margin-right: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.setting-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: white;
}

.ai-conversation {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 900px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
}

.message-user {
    background-color: #e0e5ff;
    margin-left: auto;
}

.message-ai {
    background-color: white;
    margin-right: auto;
    border: 1px solid var(--border);
}

.message-loading {
    background-color: white;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-light);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

.ai-input-area {
    display: flex;
    gap: 10px;
}

.ai-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
    resize: none;
    height: 60px;
    max-height: 300px;
    white-space: pre-wrap;
}

.ai-submit {
    padding: 0 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ai-submit:hover {
    background-color: #3a5bef;
}

.ai-submit:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 折叠内容 */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    white-space: pre-wrap;
    transition: max-height 0.3s ease;
}

.toggle-collapse {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.toggle-collapse i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.toggle-collapse.active i {
    transform: rotate(180deg);
}

/* 表单元素 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

/* 表单基础样式优化 */
.form-input, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 40px;
    height: auto;
    box-sizing: border-box;
    font-family: inherit;
}

/* 选择框特殊样式 */
.form-select {
    background-color: white;
    cursor: pointer;
    padding-right: 25px; /* 为下拉箭头留出空间 */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23333333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-select option {
    padding: 10px;
    line-height: 1.5;
}

/* 输入框聚焦状态样式 */
.form-input:focus, 
.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2);
}

/* 调整编辑区域选择框和输入框行高 */
.edit-move-item input,
.edit-move-item select,
.edit-move-item textarea {
    padding: 8px 12px;
    line-height: 1.5;
    font-family: inherit;
}

/* 修复移动设备上的选择框显示问题 */
@media (max-width: 768px) {
    .form-select {
        font-size: 16px; /* 防止iOS上缩放 */
    }
    
    .form-input {
        font-size: 16px;
    }
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* 图片上传样式 */
.image-upload-container {
    margin-bottom: 20px;
}

.image-preview {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 1px dashed var(--border);
    margin-bottom: 10px;
    display: none;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-input {
    display: none;
}

.image-upload-label {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.text-link {
    color: #3a5bef;
    text-decoration: none;
    font-weight: 500;
}

.image-upload-label:hover {
    background-color: #3a5bef;
}

.image-upload-label i {
    margin-right: 8px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.share-preview {
    width: 100%;
    max-width: 500px;
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

.share-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.share-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#copyImageBtn {
    background-color: var(--primary);
}

#saveImageBtn {
    background-color: var(--secondary);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* 所有技能显示样式 */
.all-moves-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.moves-category {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
}

.moves-category h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.moves-category h4 i {
    color: var(--primary);
}

.moves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.move-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    width: 100%; /* 确保宽度适应容器 */
    max-width: 300px; /* 限制最大宽度，避免卡片过大 */
    margin: 10px auto; /* 居中显示 */
}

.move-card:hover {
    transform: translateY(-2px);
}

.move-card .move-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.move-card .move-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.move-card .move-category-icon {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.move-card .move-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.move-card .move-stat {
    display: flex;
    flex-direction: column;
}

.move-card .move-stat-label {
    color: var(--text-light);
    font-size: 0.8rem;
}

.move-card .move-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

#showAllMoves {
    transition: color 0.2s;
}

#showAllMoves:hover {
    color: var(--primary);
}

#back-to-top {
    position: fixed;
    bottom: 10px;
    right: 60px;
    width: 50px;
    height: 50px;
    background-color:#f0f6f2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--black);
    border-radius: 50%;
    /* border: 3px solid var(--border); */
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    /* background-color: var(--primary); */
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .pokemon-attributes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 0px ;
        z-index: 9;
    }
    .collapsed .explain{
        display: none;
    }
    .sidebar.collapsed {
        width: 100%;
        height: 50px;
        overflow: hidden;
        background-color: transparent;
    }

    .collapsed .sidebar-header {
        justify-content: space-between;
        border-bottom: 0px;
    }

    .collapsed .toggle-sidebar {
        display: block;
        position: absolute;
        right: 20px;
        top: 30px;
    }

    .collapsed .history-list {
        display: none;
    }

    .pokemon-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pokemon-image-container {
        width: 300px;
        height: 300px;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .ai-settings {
        flex-direction: column;
        gap: 10px;
    }
    .ai-title img{
        display: block;
    }
    .move-card {
        padding: 12px; /* 减少内边距 */
        margin: 10px auto; /* 调整外边距 */
        max-width: 80%; /* 允许卡片宽度占满屏幕 */
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); /* 更柔和的阴影 */
    }
}

/* 分享模式下的技能分类标题 */
.temp-category-title {
    background-color: var(--background);
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary);
}

.temp-category-title i {
    margin-right: 10px;
    color: var(--primary);
}

/* 空技能提示 */
.empty-message {
    padding: 15px;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 10px 0;
}

/* 修改模态框内的种族值样式 */
.modal .form-group input[type="number"] {
    max-width: 100%;
    appearance: textfield; /* 去除默认的上下箭头 */
}

/* 确保选择框中的文字显示完整 */
.form-select {
    padding-top: 10px;
    padding-bottom: 10px;
    text-overflow: ellipsis;
}

/* 确保模态框内部内容不超出 */
.modal .form-row {
    flex-wrap: wrap;
}

/* 设计表单模态框布局优化 */
#designFormModal .modal-content {
    overflow-y: auto;
    max-height: 90vh;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* 模态框内部滚动容器 */
.design-form-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-right: 5px;
}

/* 技能修改相关样式 */
.skills-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 技能编辑标签页 */
.edit-move-tabs {
    position: flex;
    top: 0;
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
    background-color: white;
    z-index: 5;
    padding-top: 10px;
}

.edit-move-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.edit-move-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.edit-move-tab:hover:not(.active) {
    background-color: #f0f0f0;
}

.edit-move-list {
    display: none;
}

.edit-move-list.active {
    display: block;
}

/* 移除内部容器的滚动条，让主滚动条处理所有滚动 */
.edit-moves-container {
    margin-bottom: 15px;
    max-height: none;
    overflow-y: visible;
}

.edit-move-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid; /* 移除固定颜色，由JS控制 */
    transition: all 0.2s ease;
}

.edit-move-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.edit-move-item input, 
.edit-move-item select, 
.edit-move-item textarea {
    background-color: white;
}

.edit-move-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-move-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.add-move-btn {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.delete-move-btn {
    color: var(--danger);
    border-color: var(--danger);
    padding: 6px 12px;
    font-size: 0.9rem;
}

.delete-move-btn:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

/* 输入框自适应优化 */
.edit-move-item textarea {
    min-height: 60px;
    height: auto;
    resize: vertical;
    overflow-y: hidden; /* 隐藏滚动条，使用JS自动调整高度 */
    transition: height 0.2s ease;
}

.edit-move-item input[type="text"] {
    min-height: 40px;
    transition: height 0.2s ease;
}

/* 长文本输入框样式优化 */
.form-input.edit-move-description {
    line-height: 1.5;
    padding: 10px;
    font-family: inherit;
}

/* 统一表单组件样式 */
.section-divider {
    height: 1px;
    background-color: var(--border);
    margin: 10px 0 20px;
}

/* 表单分组和布局优化 */
.form-section {
    padding: 15px;
    background-color: #fafafa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单提交按钮优化 */
#saveDesignForm {
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}
