/* 
 * 虚幻百宝箱AI - 主样式表
 * 兼容 UE5.2 SWebBrowser (Chromium 90)
 * 使用传统 CSS 特性，避免现代 CSS 语法
 */

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background-color: #1a1a2e;
    color: #e8e8e8;
    overflow-x: hidden;
}

/* 应用容器 */
#app {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ==================== 头部导航样式 ==================== */
.header {
    background: rgba(15, 52, 96, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(233, 69, 96, 0.2);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}

/* Logo区域 */
.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon-wrapper {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.logo-icon {
    font-size: 24px;
    filter: brightness(1.1);
}

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

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.logo-badge {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

/* 导航标签 */
.nav-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 12px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn .tab-icon {
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.tab-btn:hover .tab-icon {
    opacity: 1;
}

.tab-btn.active {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.tab-btn.active .tab-icon {
    opacity: 1;
}

/* 外部链接按钮样式 */
.tab-btn.external-link {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    margin-left: 8px;
}

.tab-btn.external-link:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.tab-btn.external-link::after {
    content: ' ↗';
    font-size: 12px;
}

/* 用户区域 */
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-login-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.25);
}

.nav-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* 用户下拉菜单 */
.user-dropdown {
    display: none;
    position: relative;
}

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

.user-info-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

.user-avatar[style*="display: flex"],
.user-avatar[style*="display:flex"] {
    display: flex;
}

.user-email {
    color: #e8e8e8;
    font-size: 13px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: 12px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-email {
    color: #e8e8e8;
    font-size: 13px;
    font-weight: 500;
}

.dropdown-role {
    color: #666;
    font-size: 11px;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.dropdown-item .item-icon {
    font-size: 16px;
}

/* 内容区域 */
.tab-content {
    display: none;
    flex: 1;
    padding: 20px;
}

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

/* AI 对话容器 */
.chat-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    background: #16213e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid #0f3460;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
}

.chat-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #ffffff;
}

.chat-header p {
    color: #a0a0a0;
    font-size: 13px;
}

/* UE5连接状态 */
.ue5-connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.status-dot.offline {
    background: #666;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    animation: pulse 2s infinite;
}

.status-text {
    color: #a0a0a0;
    flex: 1;
}

.btn-connect-ue5 {
    padding: 4px 12px;
    background: linear-gradient(135deg, #0f3460, #16213e);
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-connect-ue5:hover {
    background: linear-gradient(135deg, #16213e, #1a1a2e);
    border-color: #e94560;
}

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

/* UE5连接设置 */
.ue5-connection-settings {
    display: flex;
    gap: 8px;
    margin: 0 10px;
}

.ue5-connection-settings input {
    padding: 4px 8px;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: #1a1a2e;
    color: #e8e8e8;
    font-size: 12px;
    width: 100px;
}

.ue5-connection-settings input:focus {
    outline: none;
    border-color: #e94560;
}

.ue5-connection-settings input[type="number"] {
    width: 80px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #ffffff;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #0f3460, #16213e);
    color: #e94560;
    border: 2px solid #e94560;
}

.message-content {
    flex: 1;
    background: #1a1a2e;
    padding: 16px 20px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    max-width: 80%;
}

.message.user .message-content {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.message-content li {
    margin-bottom: 5px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #0f3460;
    display: flex;
    gap: 12px;
    background: #0f3460;
}

#user-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #16213e;
    border-radius: 12px;
    background: #16213e;
    color: #e8e8e8;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#user-input:focus {
    outline: none;
    border-color: #e94560;
}

#user-input::placeholder {
    color: #6b6b6b;
}

.send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

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

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 蓝图云存储容器 */
.cloud-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cloud-header {
    text-align: center;
    margin-bottom: 30px;
}

.cloud-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cloud-header p {
    color: #a0a0a0;
}

/* 上传区域 */
.upload-section {
    background: #16213e;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
}

.upload-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #0f3460;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
}

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

.required {
    color: #e94560;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #0f3460;
    border-radius: 10px;
    background: #1a1a2e;
    color: #e8e8e8;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e94560;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: #6b6b6b;
}

/* 文件上传框 */
.file-upload-box {
    border: 2px dashed #0f3460;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.file-upload-box:hover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

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

.upload-icon {
    font-size: 32px;
}

.upload-placeholder small {
    color: #6b6b6b;
    font-size: 12px;
}

.preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    display: none;
}

.preview-image.visible {
    display: block;
}

.files-list {
    width: 100%;
    text-align: left;
    margin-top: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1a1a2e;
    border-radius: 6px;
    margin-top: 5px;
    font-size: 13px;
}

.file-item-name {
    color: #e8e8e8;
}

.file-item-size {
    color: #6b6b6b;
    font-size: 12px;
}

/* 复选框 */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e94560;
}

/* 表单按钮 */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 10px;
}

.btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    padding: 12px 28px;
    background: transparent;
    border: 2px solid #0f3460;
    border-radius: 10px;
    color: #a0a0a0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #e94560;
    color: #e94560;
}

.btn-icon {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 16px;
    cursor: pointer;
}

/* 蓝图列表 */
.blueprints-section {
    background: #16213e;
    border-radius: 16px;
    padding: 24px;
}

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

.section-header h3 {
    font-size: 18px;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 10px 16px;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #e8e8e8;
    font-size: 14px;
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #e94560;
}

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

/* 蓝图卡片 */
.blueprint-card {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blueprint-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #0f3460, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    font-size: 48px;
    color: #2a2a4a;
}

.card-content {
    padding: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.card-desc {
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b6b6b;
}

.card-stats {
    display: flex;
    gap: 12px;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.load-more {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #0f3460;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.visible {
    display: flex;
}

.modal-content {
    background: #16213e;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e94560;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.modal-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-desc {
    color: #a0a0a0;
    margin-bottom: 20px;
    line-height: 1.8;
}

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

.btn-download {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #16213e;
    border: 1px solid #0f3460;
    padding: 14px 28px;
    border-radius: 10px;
    z-index: 2000;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: #4ade80;
    color: #4ade80;
}

.toast.error {
    border-color: #e94560;
    color: #e94560;
}

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 打字动画 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #e94560;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

::-webkit-scrollbar-track {
    background: #0f3460;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    
    .nav-tabs {
        margin-top: 10px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .blueprints-grid {
        grid-template-columns: 1fr;
    }
}


/* UE5 MCP控制面板样式 */
.ue5-control-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.control-header {
    text-align: center;
    margin-bottom: 30px;
}

.control-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.control-header p {
    color: #a0a0a0;
    font-size: 16px;
}

/* 连接状态 */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.status-indicator.online .status-dot {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    animation: pulse 2s infinite;
}

.status-indicator.offline .status-dot {
    background: #666;
}

.status-text {
    font-size: 15px;
    color: #a0a0a0;
}

.status-indicator.online .status-text {
    color: #4ade80;
}

.btn-connect {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0f3460, #16213e);
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-connect:hover {
    background: linear-gradient(135deg, #16213e, #1a1a2e);
    border-color: #e94560;
}

.btn-diagnose {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #4ade80;
    border-radius: 8px;
    color: #4ade80;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-diagnose:hover {
    background: rgba(74, 222, 128, 0.1);
}

.connection-buttons {
    display: flex;
    gap: 12px;
}

/* MCP工具面板 */
.mcp-tools-panel {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.mcp-tools-panel h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e8e8e8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: #e94560;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.2);
}

.tool-icon {
    font-size: 28px;
}

.tool-name {
    font-size: 13px;
    color: #a0a0a0;
}

/* 命令面板 */
.command-panel {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.command-panel h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #e8e8e8;
}

.command-editor {
    margin-bottom: 20px;
}

#python-input {
    width: 100%;
    padding: 16px;
    background: #0f0f1a;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #e8e8e8;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#python-input:focus {
    outline: none;
    border-color: #e94560;
}

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

.btn-execute {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-execute:hover {
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.btn-clear {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #a0a0a0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    border-color: #e94560;
    color: #e94560;
}

.command-output {
    background: #0f0f1a;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 16px;
}

.command-output h4 {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 12px;
}

#command-output {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #4ade80;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 快速创建面板 */
.quick-spawn-panel {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.quick-spawn-panel h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #e8e8e8;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-btn {
    padding: 12px 20px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    border-color: #e94560;
    background: #0f3460;
}

/* UE5设置 */
.ue5-settings {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 24px;
}

.ue5-settings h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e8e8e8;
}

.settings-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.setting-item {
    flex: 1;
    min-width: 150px;
}

.setting-item label {
    display: block;
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.setting-item input {
    width: 100%;
    padding: 12px;
    background: #0f0f1a;
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.setting-item input:focus {
    outline: none;
    border-color: #e94560;
}

.settings-help {
    background: #0f0f1a;
    border-radius: 8px;
    padding: 16px;
}

.settings-help p {
    font-size: 14px;
    color: #e8e8e8;
    margin-bottom: 10px;
}

.settings-help ol {
    margin-left: 20px;
    color: #a0a0a0;
    font-size: 13px;
    line-height: 1.8;
}

/* Pulse动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ==================== AI场景概念图生成样式 ==================== */

.scene-generator-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.generator-header {
    text-align: center;
    margin-bottom: 30px;
}

.generator-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.generator-header p {
    color: #a0a0a0;
    font-size: 15px;
}

.generator-header .model-info {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.generator-header .model-info strong {
    color: #e94560;
    font-weight: 600;
}

/* 生成主区域布局 */
.generator-main {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.input-section {
    flex: 0 0 400px;
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #0f3460;
}

.result-section {
    flex: 1;
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #0f3460;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* 输入区域样式 */
.prompt-area {
    margin-bottom: 20px;
}

.prompt-area label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e8e8e8;
}

.prompt-area textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #0f0f1a;
    color: #e8e8e8;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

.prompt-area textarea:focus {
    outline: none;
    border-color: #e94560;
}

.prompt-area textarea::placeholder {
    color: #666;
}

/* 风格选择器 */
.style-selector {
    margin-bottom: 20px;
}

.style-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #0f0f1a;
    border: 2px solid #0f3460;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.style-option:hover {
    border-color: #e94560;
    transform: translateY(-2px);
}

.style-option.active {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.1);
}

.style-option .style-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.style-option .style-name {
    font-size: 12px;
    color: #a0a0a0;
}

.style-option.active .style-name {
    color: #e94560;
}

/* 场景类型选择 */
.scene-type-selector {
    margin-bottom: 20px;
}

.scene-type-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.scene-type-selector select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #0f0f1a;
    color: #e8e8e8;
    font-size: 14px;
    cursor: pointer;
}

.scene-type-selector select:focus {
    outline: none;
    border-color: #e94560;
}

/* 生成按钮 */
.generate-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-generate {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-generate .btn-icon {
    font-size: 20px;
}

.generate-options {
    display: flex;
    align-items: center;
}

.generate-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a0a0;
    font-size: 14px;
}

.generate-options select {
    padding: 8px 12px;
    border: 1px solid #0f3460;
    border-radius: 6px;
    background: #0f0f1a;
    color: #e8e8e8;
    cursor: pointer;
}

/* 结果区域 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #0f3460;
}

.result-header h3 {
    font-size: 18px;
    color: #e8e8e8;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-actions button {
    padding: 8px 16px;
    font-size: 13px;
}

/* 生成中状态 */
.generating-status {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.generating-animation {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #e94560;
    border-radius: 50%;
    animation: pulseRing 1.5s ease-out infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.3s;
}

.pulse-ring:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.generating-icon {
    font-size: 48px;
    z-index: 1;
}

.generating-text {
    font-size: 18px;
    color: #e8e8e8;
    margin-bottom: 10px;
}

.generating-tip {
    color: #666;
    font-size: 13px;
}

/* 空状态 */
.empty-result {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-result p {
    color: #a0a0a0;
    margin-bottom: 8px;
}

.empty-tip {
    color: #666;
    font-size: 13px;
}

/* 结果网格 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.result-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #0f0f1a;
    aspect-ratio: 1;
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.result-item:hover img {
    transform: scale(1.05);
}

.result-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s;
}

.result-item:hover .result-item-overlay {
    opacity: 1;
}

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

.result-item-actions button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.result-item-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 提示模板 */
.prompt-templates {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #0f3460;
}

.prompt-templates h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e8e8e8;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.template-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #0f0f1a;
    border: 1px solid #0f3460;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.template-card:hover {
    border-color: #e94560;
    transform: translateY(-2px);
}

.template-card .template-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.template-card .template-name {
    font-size: 13px;
    color: #a0a0a0;
}

.template-card:hover .template-name {
    color: #e94560;
}

/* 历史记录 */
.history-section {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #0f3460;
}

.history-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e8e8e8;
}

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

.history-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.history-item:hover {
    transform: scale(1.02);
}

.history-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.history-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.history-item-info p {
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-history {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .generator-main {
        flex-direction: column;
    }
    
    .input-section {
        flex: none;
    }
}

@media (max-width: 768px) {
    .style-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 下载提示弹窗样式 ==================== */

.download-tip-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.download-tip-modal.visible {
    display: flex;
}

.download-tip-content {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    border: 1px solid #0f3460;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.download-tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #0f3460;
}

.download-tip-icon {
    font-size: 32px;
}

.download-tip-header h3 {
    color: #e8e8e8;
    font-size: 18px;
    margin: 0;
}

.download-tip-body {
    padding: 24px;
}

.download-tip-desc {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.download-tip-url {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.download-tip-url input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #0f0f1a;
    color: #e8e8e8;
    font-size: 13px;
    font-family: monospace;
}

.download-tip-url input:focus {
    outline: none;
    border-color: #e94560;
}

.btn-copy-url {
    padding: 12px 20px;
    background: #0f3460;
    border: 1px solid #1a3a5c;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-copy-url:hover {
    background: #1a3a5c;
}

.download-tip-note {
    color: #666;
    font-size: 13px;
    padding: 12px 16px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 8px;
    border-left: 3px solid #e94560;
}

.download-tip-footer {
    padding: 16px 24px;
    border-top: 1px solid #0f3460;
    text-align: center;
}

.btn-close-tip {
    padding: 12px 40px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-close-tip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

/* ==================== 认证系统样式 ==================== */

/* 登录/注册模态框样式 */
#login-modal .modal-header,
#register-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#login-modal .modal-header h3,
#register-modal .modal-header h3 {
    color: #e8e8e8;
    font-size: 20px;
    margin: 0;
}

#login-modal .modal-close,
#register-modal .modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

#login-modal .modal-close:hover,
#register-modal .modal-close:hover {
    color: #e94560;
}

#login-modal .modal-body,
#register-modal .modal-body {
    padding: 24px;
}

/* 认证表单样式 */
.auth-form .form-group {
    margin-bottom: 20px;
}

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

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    background: #0f0f1a;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.auth-form input::placeholder {
    color: #666;
}

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

.auth-form .btn-primary {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.auth-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-form .btn-secondary {
    flex: 1;
    padding: 12px;
    background: #0f3460;
    border: 1px solid #1a3a5c;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form .btn-secondary:hover {
    background: #1a3a5c;
}

/* 锁定UI样式 */
#app.locked {
    /* 不锁定整个app，只锁定内容区域 */
}

#app.locked .tab-content,
#app.locked main {
    pointer-events: none;
    opacity: 0.5;
    transition: all 0.3s ease;
}

#app.locked .header {
    pointer-events: auto;
    opacity: 1;
}

/* 登录/注册模态框样式 - 始终可交互 */
#login-modal,
#register-modal {
    z-index: 10000 !important;
    pointer-events: auto !important;
}

#login-modal.visible,
#register-modal.visible {
    display: flex !important;
    pointer-events: auto !important;
}

#login-modal .modal-content,
#register-modal .modal-content {
    pointer-events: auto !important;
    opacity: 1 !important;
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    border: 1px solid #0f3460;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#app.locked #login-modal,
#app.locked #register-modal {
    pointer-events: auto !important;
    opacity: 1 !important;
}

#app.locked #login-modal .modal-content,
#app.locked #register-modal .modal-content {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* 确保输入框始终可交互 */
#login-modal input,
#register-modal input,
#login-modal button,
#register-modal button {
    pointer-events: auto !important;
}

#app.locked .toast {
    pointer-events: auto;
}

/* 模态框动画 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .logo-section {
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .nav-tabs {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
        background: transparent;
        padding: 0;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .tab-btn .tab-icon {
        display: none;
    }
    
    .user-section {
        flex: 0 0 auto;
    }
    
    .user-email {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .nav-login-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .nav-login-btn .login-text {
        display: none;
    }
}

/* 管理员面板样式 */
.admin-panel-content {
    max-width: 600px;
    width: 90%;
}

.pending-users-list {
    max-height: 400px;
    overflow-y: auto;
}

.pending-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pending-user-item .user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-user-item .user-email {
    font-weight: 600;
    color: #ffffff;
}

.pending-user-item .user-nickname {
    font-size: 13px;
    color: #a0a0a0;
}

.pending-user-item .user-time {
    font-size: 12px;
    color: #666;
}

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

.btn-approve,
.btn-reject {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-reject {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

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

.loading-text,
.empty-text,
.error-text {
    text-align: center;
    padding: 30px;
    color: #a0a0a0;
}

.error-text {
    color: #ef4444;
}

/* 注册提示 */
.register-tip {
    text-align: center;
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* 管理员专属按钮 */
.admin-only {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
}

.admin-only:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

/* ==================== 管理面板增强样式 ==================== */

.admin-panel-content {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 20px;
}

.admin-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #a0a0a0;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: #ffffff;
}

.admin-tab.active {
    color: #e94560;
    border-bottom-color: #e94560;
}

.admin-section {
    display: none;
    padding: 20px;
}

.admin-section.active {
    display: block;
}

/* 工具栏 */
.admin-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
}

.admin-search-input:focus {
    outline: none;
    border-color: #e94560;
}

.admin-filter-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.admin-filter-select:focus {
    outline: none;
    border-color: #e94560;
}

.admin-filter-select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* 用户表格 */
.users-list {
    max-height: 450px;
    overflow-y: auto;
}

.users-table {
    width: 100%;
}

.users-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 0.8fr 1.2fr 1.5fr;
    gap: 8px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 13px;
    color: #a0a0a0;
}

.users-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 0.8fr 1.2fr 1.5fr;
    gap: 8px;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    align-items: center;
}

.users-table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.users-table-row.is-self {
    background: rgba(233, 69, 96, 0.05);
}

.col-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-nickname,
.col-time {
    color: #a0a0a0;
}

/* 徽章样式 */
.role-badge,
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.role-user {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-disabled {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* 操作按钮 */
.col-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-toggle {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.btn-toggle:hover {
    background: rgba(251, 191, 36, 0.3);
}

.btn-promote {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.btn-promote:hover {
    background: rgba(139, 92, 246, 0.3);
}

.btn-demote {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.btn-demote:hover {
    background: rgba(59, 130, 246, 0.3);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.self-label {
    font-size: 12px;
    color: #a0a0a0;
    font-style: italic;
}

.users-stats {
    text-align: right;
    padding: 12px 8px;
    color: #666;
    font-size: 12px;
}

/* ==================== 个人中心样式 ==================== */

.profile-modal-content {
    max-width: 500px;
    width: 90%;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-section h4 {
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 15px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-info-item label {
    font-size: 12px;
    color: #a0a0a0;
}

.profile-value {
    color: #ffffff;
    font-size: 14px;
}

.profile-input {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
}

.profile-input:focus {
    outline: none;
    border-color: #e94560;
}

.profile-edit-row {
    display: flex;
    gap: 8px;
}

.profile-edit-row .profile-input {
    flex: 1;
}

/* 密码表单 */
.password-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 12px;
    color: #a0a0a0;
}

.password-form .btn-primary {
    align-self: flex-start;
    margin-top: 8px;
    padding: 10px 24px;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .users-table-header,
    .users-table-row {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    
    .col-time,
    .col-nickname {
        display: none;
    }
    
    .col-actions {
        grid-column: span 2;
        margin-top: 8px;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-toolbar {
        flex-direction: column;
    }
    
    .admin-search-input,
    .admin-filter-select {
        width: 100%;
    }
}

/* ==================== 公告系统样式 ==================== */

/* 公告栏（用户可见） */
.public-announcements-bar {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.public-announcements-bar:not(:empty) {
    padding: 12px 20px;
    max-height: 200px;
    overflow-y: auto;
}

.public-announcement-item {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

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

.public-announcement-item.ann-type-info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.public-announcement-item.ann-type-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.public-announcement-item.ann-type-success {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.public-announcement-item.ann-type-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

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

.pinned-icon {
    font-size: 12px;
}

.public-ann-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.public-ann-content {
    color: #a0a0a0;
    font-size: 13px;
    line-height: 1.5;
}

/* 管理面板 - 公告管理 */
.announcement-form {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-form h4 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 14px;
}

.admin-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}

.admin-input:focus {
    outline: none;
    border-color: #e94560;
}

.admin-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-textarea:focus {
    outline: none;
    border-color: #e94560;
}

.form-row-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a0a0;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.announcements-list h4 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 14px;
}

/* 公告列表项 */
.announcement-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.announcement-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.announcement-item.is-pinned {
    border-color: rgba(233, 69, 96, 0.3);
    background: rgba(233, 69, 96, 0.05);
}

.announcement-item.is-inactive {
    opacity: 0.6;
}

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

.ann-type-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.ann-type-badge.ann-type-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.ann-type-badge.ann-type-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.ann-type-badge.ann-type-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.ann-type-badge.ann-type-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.ann-pinned-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(233, 69, 96, 0.2);
    color: #f472b6;
}

.ann-inactive-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.ann-time {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

.announcement-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 6px;
}

.announcement-content {
    color: #a0a0a0;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
}

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

/* ==================== VIP中心样式 ==================== */

.vip-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.vip-status-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(40, 40, 70, 0.9));
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vip-status-card.level-premium {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.3));
    border-color: rgba(59, 130, 246, 0.3);
}

.vip-status-card.level-ultimate {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.3));
    border-color: rgba(234, 179, 8, 0.3);
}

.vip-status-card.level-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
    border-color: rgba(239, 68, 68, 0.3);
}

.vip-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.vip-icon {
    font-size: 32px;
}

.vip-level-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.vip-status-info {
    display: flex;
    gap: 32px;
}

.vip-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vip-info-item label {
    font-size: 12px;
    color: #888;
}

.vip-info-item span {
    font-size: 16px;
    color: #ffffff;
}

.vip-levels-section {
    margin-bottom: 24px;
}

.vip-levels-section h4 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 16px;
}

.vip-levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.vip-level-card {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.vip-level-card:hover {
    transform: translateY(-4px);
}

.vip-level-card.free {
    border-color: rgba(107, 114, 128, 0.3);
}

.vip-level-card.premium {
    border-color: rgba(59, 130, 246, 0.3);
}

.vip-level-card.premium:hover {
    border-color: rgba(59, 130, 246, 0.6);
}

.vip-level-card.ultimate {
    border-color: rgba(234, 179, 8, 0.3);
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(50, 45, 30, 0.9));
}

.vip-level-card.ultimate:hover {
    border-color: rgba(234, 179, 8, 0.6);
}

.vip-level-card .level-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.vip-level-card .level-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vip-level-card .level-icon {
    font-size: 28px;
}

.vip-level-card .level-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.vip-level-card .level-price {
    font-size: 32px;
    font-weight: 700;
    color: #e94560;
    margin-bottom: 16px;
}

.vip-level-card .level-price span {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.vip-level-card .level-features {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

.vip-level-card .level-features li {
    padding: 8px 0;
    color: #a0a0a0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vip-level-card .level-features li:last-child {
    border-bottom: none;
}

.vip-level-card .level-features .limit {
    float: right;
    color: #888;
    font-weight: 500;
}

.vip-level-card .level-features .limit.unlimited {
    color: #34d399;
}

.vip-level-card .btn-upgrade {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.vip-level-card .btn-upgrade:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.vip-level-card .btn-upgrade.ultimate {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.vip-level-card .btn-upgrade.ultimate:hover {
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
}

.vip-notice {
    background: rgba(30, 30, 50, 0.6);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.vip-notice p {
    color: #888;
    font-size: 13px;
    margin: 4px 0;
}

/* 用户列表VIP等级样式 */
.vip-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.vip-badge.vip-free {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.vip-badge.vip-premium {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.vip-badge.vip-ultimate {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.vip-badge.vip-admin {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.vip-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 50, 0.8);
    color: #e8e8e8;
    font-size: 12px;
    cursor: pointer;
}

.vip-select:focus {
    outline: none;
    border-color: #e94560;
}

/* 下拉菜单角色样式 */
.dropdown-role {
    font-size: 12px;
    color: #888;
}

.dropdown-role.admin {
    color: #f87171;
}

.dropdown-role.premium {
    color: #60a5fa;
}

.dropdown-role.ultimate {
    color: #fbbf24;
}

/* 用户表格VIP列 */
.users-table .col-vip {
    width: 80px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .vip-levels-grid {
        grid-template-columns: 1fr;
    }
    
    .vip-status-info {
        flex-direction: column;
        gap: 12px;
    }
}



/* ==================== 蓝图编辑器页面样式 ==================== */
.bp-editor-wrapper {
    width: 100%;
    height: calc(100vh - 140px);
    padding: 0;
    overflow: hidden;
    background: #1a1a2e;
}

#bp-editor-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 蓝图编辑器标签页特殊样式 */
#blueprint-editor.tab-content {
    padding: 0;
    display: none;
    flex: 1;
}

#blueprint-editor.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* 蓝图编辑器相关工具提示 */
.bp-tooltip {
    position: absolute;
    background: rgba(30, 30, 50, 0.95);
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid #3a3a5a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 蓝图节点搜索高亮 */
.bp-node-item.highlight {
    background: rgba(64, 128, 255, 0.2);
    border-left: 3px solid #4080ff;
}

/* 响应式 */
@media (max-width: 768px) {
    .bp-editor-wrapper {
        height: calc(100vh - 180px);
    }
}
