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

/* 基础布局控制 */
html, body {
    height: 100%;
    overflow: hidden;
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* 顶部导航栏 */
.header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1890ff;
    text-decoration: none;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    color: #333;
}

.logo-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    margin-top: 8px;
}

.logo-tooltip p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.logo-container:hover .logo-tooltip {
    display: block;
}

.top-nav {
    display: flex;
    gap: 20px;
}

.top-nav .nav-item {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    font-size: 14px;
}

.top-nav .nav-item.active,
.top-nav .nav-item:hover {
    background: #1890ff;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.user-info:hover {
    background: #f0f0f0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.username {
    font-size: 14px;
    color: #333;
}

/* 主容器 */
.container {
    height: calc(100vh - 60px);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

/* 内容区域 */
.content-area {
    display: none;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.content-area.active {
    display: flex;
}

/* 设置区域特殊处理 */
#settings-area {
    overflow: hidden;
}

.settings-container {
    display: flex;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.settings-sidebar {
    width: 250px;
    flex-shrink: 0;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    background: #fff;
}

.settings-main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.settings-main-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 左侧边栏 */
#workspace-area .sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* 移除原sidebar-header样式，改为space-selector */

#workspace-area .sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

#workspace-area .nav-list {
    list-style: none;
}

#workspace-area .nav-item {
    margin-bottom: 4px;
}

#workspace-area .nav-item > .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 0;
    position: relative;
}

#workspace-area .nav-item > .nav-link:hover {
    background: #f0f8ff;
    color: #1890ff;
}

#workspace-area .nav-item > .nav-link.active {
    background: #e6f7ff;
    color: #1890ff;
    border-right: 3px solid #1890ff;
}

#workspace-area .nav-item i {
    width: 16px;
    text-align: center;
}

#workspace-area .nav-item span {
    flex: 1;
}

#workspace-area .submenu-arrow {
    transition: transform 0.3s;
    font-size: 12px !important;
}

#workspace-area .nav-item.has-submenu.active .submenu-arrow {
    transform: rotate(-90deg);
}

/* 子菜单 */
#workspace-area .submenu {
    list-style: none;
    background: #fafafa;
    display: none;
    padding: 5px 0;
}

#workspace-area .nav-item.has-submenu.active .submenu {
    display: block;
}

#workspace-area .submenu .nav-link {
    display: block;
    padding: 10px 20px 10px 52px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

#workspace-area .submenu .nav-link:hover {
    background: #e6f7ff;
    color: #1890ff;
}

#workspace-area .submenu .nav-link.active {
    background: #1890ff;
    color: #fff;
}

/* 主内容区域 */
#workspace-area .main-content {
    flex: 1;
    background: #fff;
    position: relative;
}

#workspace-area #content-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #workspace-area .sidebar {
        width: 200px;
    }
    
    .header-left {
        gap: 20px;
    }
    
    .top-nav {
        display: none;
    }
    
    #workspace-area .space-selector {
        padding-bottom: 60px; /* 为移动端菜单按钮留空间 */
    }
}

@media (max-width: 480px) {
    #workspace-area .sidebar {
        position: fixed;
        left: -250px;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 999;
        transition: left 0.3s;
        width: 250px;
    }
    
    #workspace-area .sidebar.active {
        left: 0;
    }
    
    #workspace-area .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-area {
        width: 100%;
    }
    
    .empty-area {
        padding: 20px;
    }
}

/* 空间选择器 */
#workspace-area .space-selector {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e8e8e8;
}

#workspace-area .space-current {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

#workspace-area .space-current:hover {
    background: #f5f5f5;
}

.space-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.space-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.space-details {
    flex: 1;
}

.space-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.space-type {
    font-size: 12px;
    color: #999;
}

.space-current i:last-child {
    color: #999;
    transition: transform 0.3s;
}

.space-current.active i:last-child {
    transform: rotate(180deg);
}

/* 空间选择下拉菜单 */
.space-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

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

.space-list {
    padding: 8px 0;
}

.space-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.space-item:hover {
    background: #f5f5f5;
}

.space-item.active {
    background: #e6f7ff;
    color: #1890ff;
}

.space-item i:first-child {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.space-item.active i:first-child {
    background: #1890ff;
    color: #fff;
}

.space-item > div {
    flex: 1;
}

.space-item .space-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.space-item .space-type {
    font-size: 12px;
    color: #999;
}

.space-item i:last-child {
    color: #1890ff;
    font-size: 16px;
}

/* 空间操作按钮 */
.space-actions {
    border-top: 1px solid #e8e8e8;
    padding: 8px;
    display: flex;
    gap: 8px;
}

.btn-space-action {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-space-action:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 空白页面样式 */
.empty-area {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: #fafafa;
}

.empty-content {
    text-align: center;
    color: #999;
}

.empty-content i {
    font-size: 64px;
    margin-bottom: 16px;
    color: #ccc;
}

.empty-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #666;
}

.empty-content p {
    font-size: 14px;
    color: #999;
}

/* 资源广场样式 */
#resource-area {
    display: flex;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 强制隐藏非激活状态的内容区域 */
#resource-area:not(.active) {
    display: none !important;
}

#workspace-area:not(.active) {
    display: none !important;
}

#resource-area .resource-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    flex-shrink: 0;
    padding: 20px 0;
}

#resource-area .resource-nav {
    padding: 0;
}

#resource-area .resource-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#resource-area .resource-nav-item {
    margin-bottom: 0;
}

#resource-area .resource-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    border-radius: 0;
}

#resource-area .resource-nav-link:hover {
    background: #f5f5f5;
    color: #333;
}

#resource-area .resource-nav-link.active {
    background: #e6f7ff;
    color: #1890ff;
}

#resource-area .resource-nav-link i {
    width: 16px;
    font-size: 16px;
    color: inherit;
}

/* 资源广场子菜单样式 */
#resource-area .resource-nav-item.has-submenu .submenu-arrow {
    transition: transform 0.3s;
    font-size: 12px !important;
    margin-left: auto;
}

#resource-area .resource-nav-item.has-submenu.active .submenu-arrow {
    transform: rotate(90deg);
}

#resource-area .resource-submenu {
    list-style: none;
    background: #f8f9fa;
    display: none;
    padding: 5px 0;
    margin: 0;
}

#resource-area .resource-nav-item.has-submenu.active .resource-submenu {
    display: block;
}

#resource-area .resource-submenu .resource-nav-link {
    padding: 10px 20px 10px 52px;
    font-size: 13px;
    font-weight: normal;
}

#resource-area .resource-submenu .resource-nav-link:hover {
    background: #e6f7ff;
    color: #1890ff;
}

#resource-area .resource-submenu .resource-nav-link.active {
    background: #1890ff;
    color: #fff;
}

/* 插件页面样式 */
.plugin-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

/* 搜索区域 */
.plugin-search-section {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 16px;
    z-index: 2;
}

.plugin-search-input,
.model-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.plugin-search-input:focus,
.model-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.plugin-search-input::placeholder,
.model-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-btn, .reset-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #4f46e5;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* 插件列表区域 */
.plugin-list-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.plugin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
}

/* 插件卡片 */
.plugin-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.plugin-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.plugin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.plugin-icon {
    width: 48px;
    height: 48px;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.icon-circle.red {
    background: #f56565;
}

.icon-circle.green {
    background: #48bb78;
}

.icon-circle.dark {
    background: #2d3748;
}

.icon-circle.pink {
    background: #ed8796;
}

.icon-circle.yellow {
    background: #f6d55c;
    color: #2d3748;
}

.icon-circle.purple {
    background: #805ad5;
}

.icon-circle.black {
    background: #1a202c;
}

.icon-circle span {
    font-size: 14px;
    font-weight: bold;
}

.icon-circle i {
    font-size: 20px;
}

.plugin-content {
    flex: 1;
}

.plugin-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plugin-category {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.plugin-category.business {
    background: #fff2e8;
    color: #fa8c16;
}

.plugin-category.dev {
    background: #f6ffed;
    color: #52c41a;
}

.plugin-category.file {
    background: #e6f7ff;
    color: #1890ff;
}

.plugin-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.plugin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.plugin-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 13px;
}

.plugin-likes i {
    font-size: 14px;
}

.plugin-likes i.fas {
    color: #ff4d4f;
}

/* 模型卡片样式 */
.model-page {
    padding: 20px;
    width: 100%;
    margin: 0;
}

.model-search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    text-align: center;
}

.model-list-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.model-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 280px;
    min-height: 280px;
}

.model-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

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

.model-icon {
    width: 48px;
    height: 48px;
}

.icon-diamond {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-diamond.blue {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.icon-diamond.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.icon-diamond.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

.icon-diamond.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.icon-diamond i,
.icon-diamond span {
    transform: rotate(-45deg);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.model-badges {
    display: flex;
    gap: 8px;
}

/* 复制图标样式 */
.copy-icon {
    font-size: 16px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

.copy-icon:hover {
    color: #4f46e5;
    background: #f3f4f6;
    transform: scale(1.1);
}

/* Toast 动画 */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.special-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.special-badge.qwen {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
}

.special-badge.performance {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.special-badge.cost {
    background: linear-gradient(45deg, #10b981, #059669);
}

.special-badge.new {
    background: linear-gradient(45deg, #ef4444, #dc2626);
}

.special-badge.hot {
    background: linear-gradient(45deg, #ec4899, #be185d);
}

.special-badge.efficient {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.model-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.model-title {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    min-height: 22px;
    flex: 1;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    min-height: 50px;
    align-content: flex-start;
    margin-top: 0;
}

.model-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
}

.model-tag.primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.model-tag.context {
    background: #fef3c7;
    color: #d97706;
}

.model-tag.tools {
    background: #d1fae5;
    color: #059669;
}

.model-tag.size {
    background: #f3e8ff;
    color: #7c3aed;
}

/* 模型价格样式 */
.model-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 8px 0;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 11px;
}

.pricing-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pricing-label {
    color: #6b7280;
    font-weight: 500;
}

.pricing-value {
    color: #dc2626;
    font-weight: 600;
}

.model-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-meta {
    margin-bottom: 0;
}

.model-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #9ca3af;
}

.provider {
    font-weight: 500;
    color: #6b7280;
}

.model-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.btn-model-action {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: white;
    color: #6b7280;
}

.btn-model-action.outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-model-action.primary {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.btn-model-action.primary:hover {
    background: #4338ca;
    border-color: #4338ca;
}

.btn-model-action i {
    font-size: 11px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .plugin-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .plugin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .model-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
    }
    
    .plugin-search-section, .model-search-section {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        max-width: none;
    }
    
    .search-input-wrapper {
        max-width: none;
    }
    
    .search-btn, .reset-btn {
        padding: 12px 20px;
        font-size: 14px;
        justify-content: center;
    }
    
    .plugin-list-section, .model-list-section {
        padding: 16px;
    }
    
    .model-page {
        padding: 16px;
    }
    
    .model-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-model-action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .plugin-grid {
        grid-template-columns: 1fr;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .plugin-card, .model-card {
        padding: 20px;
        height: auto;
        min-height: 260px;
    }
    
    .model-title {
        font-size: 16px;
    }
    
    .model-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .model-tags {
        min-height: 40px;
    }
}

#resource-area .resource-main-content {
    flex: 1;
    overflow-y: auto;
}

#resource-area .resource-content {
    display: none;
    height: 100%;
}

#resource-area .resource-content.active {
    display: block;
}



/* 资源广场响应式设计 */
@media (max-width: 768px) {
    #resource-area {
        flex-direction: column;
        height: auto;
    }
    
    #resource-area .resource-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        padding: 10px 0;
    }
    
    #resource-area .resource-nav {
        padding: 0 10px;
    }
    
    #resource-area .resource-nav-list {
        display: flex;
        overflow-x: auto;
        gap: 8px;
    }
    
    #resource-area .resource-nav-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    #resource-area .resource-nav-link {
        padding: 8px 16px;
        white-space: nowrap;
        border-radius: 6px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    #resource-area .resource-nav-link.active {
        border-left: none;
        border-bottom: 3px solid #1890ff;
        background: rgba(24, 144, 255, 0.1);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 我的收藏页面样式 */
.favorites-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    padding: 24px;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-content .page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.header-content .page-title i {
    color: #ff4d4f;
}

.page-description {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-toggle {
    display: flex;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    overflow: hidden;
}

.toggle-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: #1890ff;
    color: white;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.favorites-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.tab-btn.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.tab-btn.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.favorites-content {
    flex: 1;
    overflow-y: auto;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.favorite-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    cursor: pointer;
}

.favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.model-icon {
    background: #1890ff;
}

.plugin-icon {
    background: #52c41a;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #e6f7ff;
    color: #1890ff;
}

.favorite-btn.active {
    background: #ff4d4f;
    color: white;
}

.favorite-btn.active:hover {
    background: #ff7875;
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.item-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.item-tags .tag {
    padding: 4px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
}

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 12px;
}

.meta-item i {
    font-size: 12px;
}

/* 空状态样式 */
.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 32px;
    color: #ccc;
}

.empty-favorites h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
}

.empty-favorites p {
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-explore:hover {
    background: #40a9ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .favorites-page {
        padding: 16px;
    }
    
    .favorites-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 20px;
    }
    
    .header-actions {
        justify-content: space-between;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .favorites-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
}

/* 个人中心样式 */
#profile-area {
    display: flex;
    height: 100%;
}

#profile-area:not(.active) {
    display: none;
}

/* 个人中心左侧边栏 */
.profile-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
}

.profile-nav {
    padding: 20px 0;
}

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

.profile-nav-item {
    margin-bottom: 4px;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 0;
}

.profile-nav-link:hover {
    background: #f0f8ff;
    color: #1890ff;
}

.profile-nav-link.active {
    background: #e6f7ff;
    color: #1890ff;
    border-right: 3px solid #1890ff;
}

.profile-nav-link i {
    width: 16px;
    text-align: center;
}

/* 个人中心主内容区域 */
.profile-main-content {
    flex: 1;
    background: #f5f5f5;
    overflow-y: auto;
}

.profile-content {
    display: none;
}

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

.profile-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
    position: relative;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.page-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.page-header .btn-primary {
    position: absolute;
    top: 0;
    right: 0;
}

/* 表单卡片 */
.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

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

.card-content {
    padding: 24px;
}

/* 头像部分 */
.avatar-section {
    margin-bottom: 24px;
    text-align: center;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    margin: 0 auto;
}

.btn-change-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1890ff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-change-avatar:hover {
    background: #40a9ff;
}

/* 表单组件 */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group input[readonly] {
    background: #f5f5f5;
    color: #999;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #e6e6e6;
    color: #333;
}

/* API Key 管理 */
.api-header {
    margin-bottom: 16px;
}

.btn-new-api-key {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-new-api-key:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.api-warning {
    background: #fffbf0;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.api-warning p {
    margin: 0;
    color: #8b6914;
    font-size: 14px;
    line-height: 1.5;
}

.api-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 16px;
    overflow: hidden;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
}

.api-table th {
    background: #fafafa;
    padding: 16px;
    text-align: left;
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.api-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.api-table tr:last-child td {
    border-bottom: none;
}

.api-row:hover {
    background: #fafafa;
}

.btn-toggle-visibility {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-toggle-visibility:hover {
    background: #f0f0f0;
    color: #1890ff;
}

.key-cell {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.key-cell:hover {
    background: #f5f5f5;
}

.key-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #333;
}

.key-description {
    color: #666;
}

.key-time {
    color: #999;
    font-size: 14px;
}

.key-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    background: #fff;
}

.btn-delete {
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
}

.btn-delete:hover {
    background: #fff1f0;
}

.btn-edit {
    border: 1px solid #1890ff;
    color: #1890ff;
}

.btn-edit:hover {
    background: #e6f7ff;
}

/* 调用示例样式 */
.api-examples {
    margin-top: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.examples-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.example-tabs {
    display: flex;
    gap: 12px;
}

.tab-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f5f5f5;
}

.tab-btn.active {
    background: #e6f7ff;
    color: #1890ff;
}

.example-content {
    display: none;
    padding: 24px;
}

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

.code-block {
    background: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
}

.code-header {
    padding: 12px 16px;
    background: #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-header span {
    color: #666;
    font-size: 14px;
}

.btn-copy {
    padding: 4px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-copy:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
}

.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 1000;
}

/* 运行状态提示 */
.run-status {
    margin-top: 12px;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.run-status.running {
    background: #e6f7ff;
    color: #1890ff;
}

.run-status.success {
    background: #f6ffed;
    color: #52c41a;
}

.run-status.error {
    background: #fff2f0;
    color: #ff4d4f;
}

/* 模型选择器样式 */
.model-selector {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

.model-selector:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
    outline: none;
}

/* System Prompt 输入区 */
.system-prompt {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    resize: vertical;
    font-family: monospace;
    margin-bottom: 16px;
}

.system-prompt:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
    outline: none;
}

/* 模板选择按钮 */
.template-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: white;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.template-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.template-btn i {
    font-size: 14px;
}

/* 添加 User Prompt 按钮 */
.add-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    background: #fafafa;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
}

.add-prompt-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.add-prompt-btn i {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 10px auto;
    }

    .modal-content {
        flex-direction: column;
        padding: 16px;
    }

    .modal-left,
    .modal-right {
        width: 100%;
    }

    .modal-divider {
        width: auto;
        height: 1px;
        margin: 12px 0;
    }
}

/* 使用统计页面样式 */
.stats-search {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.search-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.api-key-select {
    flex: 1;
}

.select-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.search-btn {
    padding: 8px 24px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #4f46e5;
}

/* 统计卡片样式 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stats-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon.purple {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.card-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.card-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.card-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.card-info {
    flex: 1;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.card-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* 详细信息表格样式 */
.stats-details {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.details-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.details-header h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
}

.details-table {
    padding: 0 24px;
}

.details-table table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 1px solid #f0f0f0;
}

.details-table td {
    padding: 16px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.empty-row td {
    padding: 48px 0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-state img {
    width: 120px;
    height: 120px;
    opacity: 0.5;
}

.empty-state p {
    color: #9ca3af;
    margin: 0;
}

/* 管理中心样式 */
.settings-container {
    display: flex;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

/* 左侧菜单栏样式 */
.settings-sidebar {
    width: 250px;
    flex-shrink: 0;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    background: #fff;
}

.settings-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    color: #1890ff;
    background: #e6f7ff;
    border-left-color: #1890ff;
}

.menu-item.active {
    color: #1890ff;
    background: #e6f7ff;
    border-left-color: #1890ff;
}

.menu-item i {
    font-size: 16px;
    width: 16px;
    text-align: center;
}

/* 右侧内容区域样式 */
.settings-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.settings-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1;
}

.panel-desc {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}

/* 资源统计卡片样式 */
.resource-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stats-card {
    background: #f7f9fc;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #e6f7ff;
    color: #1890ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stats-info h3 {
    font-size: 13px;
    color: #666;
    margin: 0 0 4px;
    line-height: 1;
}

.stats-value {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    line-height: 1;
    margin: 0;
}

/* 资源表格样式 */
.resource-table {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.table-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    line-height: 1;
}

.table-header h3 i {
    font-size: 14px;
    color: #666;
}

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

.table-filter {
    display: flex;
    gap: 4px;
}

.filter-item {
    padding: 4px 8px;
    border-radius: 2px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.filter-item:hover,
.filter-item.active {
    color: #1890ff;
    background: #e6f7ff;
}

.search-box {
    position: relative;
    height: 28px;
}

.search-box i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
}

.search-box input {
    height: 28px;
    padding: 0 8px 0 26px;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    width: 180px;
    font-size: 13px;
    transition: all 0.2s;
    line-height: 26px;
}

.search-box input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}

.refresh-btn {
    height: 28px;
    padding: 0 12px;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 26px;
}

.refresh-btn:hover {
    color: #1890ff;
    border-color: #1890ff;
    background: #f0f8ff;
}

.refresh-btn i {
    font-size: 12px;
}

/* 表格样式 */
.table-container {
    flex: 1;
    overflow: auto;
}

.resource-table table {
    width: 100%;
    border-collapse: collapse;
}

.resource-table th {
    background: #fafafa;
    padding: 10px 16px;
    text-align: left;
    font-weight: 500;
    color: #333;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    line-height: 1.4;
}

.resource-table td {
    padding: 10px 16px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
}

.resource-table tr:hover td {
    background: #fafafa;
}

.empty-state {
    text-align: center;
    padding: 32px 0;
    color: #999;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.empty-state i {
    font-size: 28px;
    margin-bottom: 8px;
    color: #d9d9d9;
}

.empty-state p {
    font-size: 13px;
    margin: 0;
    line-height: 1;
}

/* 新建按钮 */
.add-record {
    padding: 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    justify-content: center;
}

.add-btn {
    height: 32px;
    padding: 0 16px;
    border: 1px dashed #d9d9d9;
    border-radius: 2px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 30px;
}

.add-btn:hover {
    color: #1890ff;
    border-color: #1890ff;
    background: #f0f8ff;
}

/* 授权标签样式 */
.auth-required-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4d4f;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.model-card.auth-required {
    position: relative;
}

.model-card.auth-required::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    pointer-events: none;
}

.auth-tooltip {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
}

.model-card.auth-required:hover .auth-tooltip {
    display: block;
}

/* 授权申请弹窗样式 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-modal.show {
    display: flex;
}

.auth-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

.auth-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.auth-form-group {
    margin-bottom: 16px;
}

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

.auth-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
}

.auth-form-input:disabled {
    background: #f5f5f5;
}

.auth-form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
}

.auth-form-submit {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
}

.auth-form-submit:hover {
    background: #40a9ff;
} 

/* 授权相关样式 */
.model-tag.auth-required {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.model-card.need-auth {
    position: relative;
}

.auth-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.model-card.need-auth:hover .auth-overlay {
    display: flex;
}

.auth-overlay-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    cursor: pointer;
}

.auth-overlay-text:hover {
    background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .settings-main-content {
        flex: 1;
        height: 0; /* 确保flex:1生效 */
    }
    
    .settings-main-content iframe {
        height: 100%;
    }
}

/* 确保模态框始终显示在最上层 */
.modal-overlay {
    position: fixed !important;
    z-index: 9999 !important;
}

/* 统一权限管理样式 */
#unified-permission-area {
    display: none;
    width: 100%;
    height: 100%;
}

#unified-permission-area.active {
    display: flex !important;
}

.unified-permission-container {
    width: 100%;
    height: 100%;
    display: flex;
    background-color: #f5f7fa;
}

/* 左侧菜单样式 */
.permission-sidebar {
    width: 220px;
    min-width: 220px;
    background-color: white;
    border-right: 1px solid #e8e8e8;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

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

.permission-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.permission-nav-item {
    margin: 4px 0;
}

.permission-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #595959;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.permission-nav-link:hover {
    color: #1890ff;
    background-color: #e6f7ff;
}

.permission-nav-link.active {
    color: #1890ff;
    background-color: #e6f7ff;
    border-right: 3px solid #1890ff;
    font-weight: 500;
}

.permission-nav-link i {
    width: 16px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.permission-nav-link span {
    font-size: 14px;
    white-space: nowrap;
}

/* 右侧内容区域样式 */
.permission-main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    height: 100vh;
    background-color: #f5f7fa;
}

.permission-main-content .empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.permission-main-content .empty-state i {
    font-size: 48px;
    color: #8c8c8c;
    margin-bottom: 16px;
}

.permission-main-content .empty-state p {
    margin: 0;
    color: #8c8c8c;
    font-size: 14px;
}

/* 权限管理区域样式 */
#permission-area {
    display: none;
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    background: #fff;
}

#permission-area.active {
    display: block;
}

.permission-nav-list {
    position: fixed !important;
    left: 0 !important;
    top: 60px !important;
    bottom: 0 !important;
    width: 220px !important;
    min-width: 220px !important;
    background: #fff !important;
    border-right: 1px solid #e8e8e8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
    overflow-y: auto !important;
    height: 100vh !important;
}

.permission-nav-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 24px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

.permission-nav-item i {
    margin-right: 10px !important;
    width: 16px !important;
    text-align: center !important;
}

.permission-nav-item:hover {
    background-color: #f5f5f5 !important;
}

.permission-nav-item.active {
    background-color: #e6f7ff !important;
    color: #1890ff !important;
    border-right: 3px solid #1890ff !important;
}

.permission-nav-item.active i {
    color: #1890ff !important;
}

#permission-content-frame {
    position: absolute !important;
    left: 220px !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: calc(100% - 220px) !important;
    height: 100% !important;
    border: none !important;
    background: #fff !important;
}