        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
  /* 水印效果 */
body::after {
  content: '明奇优化';
  position: fixed;
  top: 120px;
  leftt: 30px;
  color: rgba(0,32,72,0.08);
  font-size: 3em;
  font-family: '华文楷体', cursive;
  font-weight: 700;
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: 1;
}
        body {
            background: linear-gradient(135deg, #1a2a6c 0%, #3a7bd5 50%, #00d2ff 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 0;
            color: #333;
            line-height: 1.6;
            overflow-x: hidden;
        }
        .container {
            width: 100%;
            max-width: 100%;
            background: rgba(255, 255, 255, 0.98);
            min-height: 100vh;
            overflow: hidden;
        }
        @media (min-width: 768px) {
            body {
                padding: 20px 15px;
                align-items: center;
            }
            .container {
                max-width: 450px;
                border-radius: 20px;
                box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
                min-height: auto;
                backdrop-filter: blur(10px);
            }
        }
        .header {
            background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
            color: white;
            padding: 20px;
            text-align: center;
            position: relative;
        }
        .header h1 {
            font-size: 22px;
            margin-bottom: 8px;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .header p {
            font-size: 14px;
            opacity: 0.9;
            max-width: 100%;
            margin: 0 auto;
            padding: 0 10px;
        }
        .content {
            padding: 20px;
        }
        @media (max-width: 375px) {
            .content {
                padding: 15px;
            }
        }
        .input-section {
            background: #f8f9fb;
            padding: 18px;
            border-radius: 12px;
            border: 1px solid #eaeef2;
            margin-bottom: 18px;
        }
        .input-group {
            display: flex;
            margin-bottom: 15px;
            flex-direction: column;
        }
        @media (min-width: 375px) {
            .input-group {
                flex-direction: row;
            }
        }
        input {
            flex: 1;
            padding: 14px 16px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            outline: none;
            transition: border-color 0.3s;
            -webkit-appearance: none;
            width: 100%;
            margin-bottom: 12px;
        }
        @media (min-width: 375px) {
            input {
                border-radius: 8px 0 0 8px;
                margin-bottom: 0;
                width: auto;
            }
        }
        input:focus {
            border-color: #4b6cb7;
        }
        button {
            background: #4b6cb7;
            color: white;
            border: none;
            padding: 14px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background 0.3s, transform 0.2s;
            white-space: nowrap;
            font-weight: 600;
            width: 100%;
        }
        @media (min-width: 375px) {
            button {
                width: auto;
                border-radius: 0 8px 8px 0;
            }
        }
        button:hover {
            background: #3a559d;
        }
        button:active {
            transform: scale(0.98);
        }
        .ai-analyze-btn {
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            margin-top: 12px;
        }
        @media (min-width: 375px) {
            .ai-analyze-btn {
                margin-top: 0;
                margin-left: 12px;
            }
        }
        .ai-analyze-btn:hover {
            background: linear-gradient(90deg, #219955 0%, #16a085 100%);
        }
        .instruction {
            background: #fef6e3;
            padding: 14px;
            border-radius: 8px;
            margin-bottom: 18px;
            border-left: 4px solid #ffd580;
            font-size: 13px;
            line-height: 1.5;
        }
        .instruction i {
            color: #e67e22;
            margin-right: 8px;
        }
        .result-section {
            background: #f8f9fb;
            border-radius: 12px;
            padding: 18px;
            border: 1px solid #eaeef2;
            margin-bottom: 20px;
            min-height: 200px;
        }
        .result-title {
            color: #4b6cb7;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 2px solid #eaeef2;
            font-size: 17px;
            display: flex;
            align-items: center;
        }
        .result-title i {
            margin-right: 10px;
        }
        .result-content {
            flex: 1;
            font-size: 14px;
        }
        .placeholder {
            color: #999;
            font-style: italic;
            text-align: center;
            padding: 40px 20px;
            font-size: 15px;
        }
        .tab-container {
            display: flex;
            margin-bottom: 15px;
            border-bottom: 1px solid #eaeef2;
            background: #f8f9fb;
            border-radius: 8px 8px 0 0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .tab-container::-webkit-scrollbar {
            display: none;
        }
        .tab {
            flex: 1;
            min-width: 110px;
            padding: 14px 12px;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
            font-size: 14px;
            text-align: center;
            background: #f0f4f8;
            white-space: nowrap;
        }
        .tab.active {
            border-bottom: 3px solid #4b6cb7;
            color: #4b6cb7;
            font-weight: bold;
            background: white;
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
        }
        /* API密钥相关样式 */
        .api-key-section {
            background: linear-gradient(135deg, #f0f4f8 0%, #e3eaf7 100%);
            padding: 16px;
            border-radius: 10px;
            margin-bottom: 18px;
            border: 1px solid #d1e3ff;
        }
        .api-key-controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 10px;
        }
        @media (min-width: 375px) {
            .api-key-controls {
                flex-direction: row;
            }
        }
        .api-key-input {
            flex: 1;
            padding: 12px 14px;
            border: 2px solid #b8d4fe;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            width: 100%;
        }
        @media (min-width: 375px) {
            .api-key-input {
                width: auto;
            }
        }
        .api-key-buttons {
            display: flex;
            gap: 10px;
        }
        .api-key-btn {
            padding: 12px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            flex: 1;
        }
        .setup-btn {
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            color: white;
        }
        .clear-btn {
            background: #718096;
            color: white;
        }
        .api-key-hint {
            font-size: 12px;
            color: #666;
            margin-top: 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 6px;
            border-left: 3px solid #4b6cb7;
        }
        .api-key-hint a {
            color: #4b6cb7;
            text-decoration: none;
            font-weight: bold;
        }
        .api-key-hint a:hover {
            text-decoration: underline;
        }
        /* AI控制面板 */
        .ai-control-panel {
            background: linear-gradient(135deg, #f8f9fb 0%, #eef2f7 100%);
            padding: 16px;
            border-radius: 10px;
            margin-bottom: 18px;
            border: 1px solid #eaeef2;
        }
        .ai-control-row {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        @media (min-width: 425px) {
            .ai-control-row {
                flex-direction: row;
                align-items: center;
            }
        }
        .model-selector {
            flex: 1;
            min-width: 100%;
        }
        @media (min-width: 425px) {
            .model-selector {
                min-width: 200px;
            }
        }
        .model-selector label {
            display: block;
            font-size: 13px;
            color: #4b6cb7;
            margin-bottom: 8px;
            font-weight: 600;
        }
        .model-select {
            width: 100%;
            padding: 12px 14px;
            border: 2px solid #d1e3ff;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            color: #333;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b6cb7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 14px;
        }
        .web-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: white;
            border-radius: 6px;
            border: 2px solid #d1e3ff;
            justify-content: center;
        }
        .web-toggle input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
        }
        .web-toggle label {
            font-size: 14px;
            color: #333;
            cursor: pointer;
        }
        /* AI分析状态 */
        .ai-status {
            display: none;
            padding: 15px;
            margin: 15px 0;
            background: linear-gradient(135deg, #e8f6f3 0%, #d1ede6 100%);
            border-radius: 8px;
            border-left: 4px solid #1abc9c;
            font-size: 14px;
            color: #16a085;
            text-align: center;
        }
        .ai-status i {
            margin-right: 10px;
        }
        /* AI分析结果样式 */
        .ai-analysis-result {
            animation: fadeIn 0.5s ease-in;
            margin-bottom: 20px;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .ai-analysis-header {
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            color: white;
            padding: 16px;
            border-radius: 8px 8px 0 0;
            margin-bottom: 0;
        }
        .ai-analysis-header h3 {
            margin: 0;
            font-size: 15px;
            display: flex;
            align-items: center;
            font-weight: 600;
        }
        .ai-analysis-header i {
            margin-right: 10px;
        }
        .ai-analysis-content {
            padding: 18px;
            background: white;
            border-radius: 0 0 8px 8px;
            border: 1px solid #eaeef2;
            line-height: 1.7;
            font-size: 14px;
            color: #333;
        }
        .ai-analysis-footer {
            margin-top: 10px;
            font-size: 12px;
            color: #666;
            text-align: right;
            padding-right: 10px;
        }
        .ai-analysis-footer i {
            margin-right: 5px;
        }
        /* 底部导航 - 已移除 */
        .bottom-nav {
            display: none;
        }
        /* 加载动画 */
        .loading-spinner {
            text-align: center;
            padding: 30px;
        }
        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #27ae60;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* 提示信息 */
        .hint-message {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 12px 18px;
            background: rgba(255, 255, 255, 0.98);
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
            z-index: 1000;
            animation: slideInRight 0.3s ease-out;
            border-left: 4px solid #27ae60;
            max-width: calc(100vw - 40px);
            word-break: break-word;
        }
        @media (max-width: 768px) {
            .hint-message {
                top: 10px;
                right: 10px;
                left: 10px;
                max-width: none;
                text-align: center;
            }
        }
        @keyframes slideInRight {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        /* 专业分析结果样式 */
        .analysis-section {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        .analysis-section:last-child {
            border-bottom: none;
        }
        .section-title {
            color: #4b6cb7;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
        }
        .section-title i {
            margin-right: 8px;
        }
        .analysis-text {
            color: #444;
            line-height: 1.7;
            margin-bottom: 8px;
        }
        .analysis-point {
            margin-bottom: 10px;
            padding-left: 15px;
            position: relative;
        }
        .analysis-point:before {
            content: "•";
            color: #4b6cb7;
            position: absolute;
            left: 0;
            font-weight: bold;
        }
        .key-finding {
            background: #e8f4f8;
            padding: 12px;
            border-radius: 6px;
            margin: 12px 0;
            border-left: 3px solid #3498db;
        }
        .recommendation {
            background: #e8f6e8;
            padding: 12px;
            border-radius: 6px;
            margin: 12px 0;
            border-left: 3px solid #27ae60;
        }
        .warning-note {
            background: #fef6e6;
            padding: 12px;
            border-radius: 6px;
            margin: 12px 0;
            border-left: 3px solid #e67e22;
        }
        .element-distribution {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
            gap: 8px;
            margin: 12px 0;
        }
        .element-item {
            text-align: center;
            padding: 8px;
            background: #f0f4f8;
            border-radius: 6px;
        }
        .element-name {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
        }
        .element-count {
            font-size: 18px;
            font-weight: bold;
            color: #4b6cb7;
        }
        /* API密钥相关样式 - 垂直布局版本 */
        .api-key-section {
            background: linear-gradient(135deg, #f0f4f8 0%, #e3eaf7 100%);
            padding: 16px;
            border-radius: 10px;
            margin-bottom: 18px;
            border: 1px solid #d1e3ff;
        }

        .api-key-row {
            margin-bottom: 12px;
            width: 100%;
        }

        .api-key-input {
            width: 100%;
            padding: 12px 14px;
            border: 2px solid #b8d4fe;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            box-sizing: border-box;
        }

        .api-key-button-row {
            display: flex;
            gap: 12px;
            margin-bottom: 10px;
            width: 100%;
        }

        .api-key-btn {
            flex: 1;
            padding: 12px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .setup-btn {
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            color: white;
        }

        .clear-btn {
            background: #718096;
            color: white;
        }

        .api-key-hint {
            font-size: 12px;
            color: #666;
            padding: 10px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 6px;
            border-left: 3px solid #4b6cb7;
        }

        .api-key-hint a {
            color: #4b6cb7;
            text-decoration: none;
            font-weight: bold;
        }

        .api-key-hint a:hover {
            text-decoration: underline;
        }

        /* 响应式调整 */
        @media (min-width: 375px) {
            .api-key-button-row {
                gap: 10px;
            }
        }

        @media (min-width: 768px) {
            .api-key-button-row {
                gap: 15px;
            }
            
            .api-key-btn {
                padding: 12px 20px;
            }
        }
        /* 输入区域样式 - 垂直布局版本 */
        .input-section {
            background: #f8f9fb;
            padding: 18px;
            border-radius: 12px;
            border: 1px solid #eaeef2;
            margin-bottom: 18px;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
        }

        .number-input-full {
            width: 100%;
            padding: 14px 16px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            outline: none;
            transition: border-color 0.3s;
            -webkit-appearance: none;
            box-sizing: border-box;
        }

        .number-input-full:focus {
            border-color: #4b6cb7;
        }

        .ai-analyze-btn-full {
            width: 100%;
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            color: white;
            border: none;
            padding: 16px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background 0.3s, transform 0.2s;
            white-space: nowrap;
            font-weight: 600;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .ai-analyze-btn-full:hover {
            background: linear-gradient(90deg, #219955 0%, #16a085 100%);
        }

        .ai-analyze-btn-full:active {
            transform: scale(0.98);
        }

        .ai-analyze-btn-full i {
            font-size: 16px;
        }

        /* 移动端响应式优化 */
        @media (max-width: 374px) {
            .ai-analyze-btn-full {
                padding: 14px 16px;
                font-size: 15px;
            }
            
            .number-input-full {
                padding: 12px 14px;
                font-size: 15px;
            }
        }

        /* 平板和桌面端优化 */
        @media (min-width: 768px) {
            .input-group {
                max-width: 400px;
                margin: 0 auto;
            }
            
            .ai-analyze-btn-full {
                padding: 16px 24px;
            }
            
            .number-input-full {
                padding: 16px 18px;
            }
        }

        /* 建议输入框样式 */
        .suggestion-input-container {
            margin-top: 15px;
            padding: 15px;
            background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
            border-radius: 8px;
            border: 1px solid #cce7ff;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .suggestion-textarea {
            width: 100%;
            min-height: 100px;
            padding: 12px 14px;
            border: 2px solid #99d6ff;
            border-radius: 6px;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
            box-sizing: border-box;
            margin-bottom: 12px;
            font-family: inherit;
            transition: border-color 0.3s;
        }

        .suggestion-textarea:focus {
            outline: none;
            border-color: #4b6cb7;
        }

        .suggestion-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .suggestion-submit-btn {
            background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .suggestion-cancel-btn {
            background: #718096;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .suggestion-submit-btn:hover {
            background: linear-gradient(90deg, #219955 0%, #16a085 100%);
            transform: translateY(-1px);
        }

        .suggestion-cancel-btn:hover {
            background: #5a6c7d;
            transform: translateY(-1px);
        }

        .suggestion-thanks {
            margin-top: 10px;
            padding: 10px;
            background: #e8f6f3;
            border-radius: 6px;
            border-left: 3px solid #1abc9c;
            text-align: center;
            animation: fadeIn 0.5s ease-in;
        }

        .suggestion-thanks i {
            color: #1abc9c;
            margin-right: 5px;
        }

        .suggestion-thanks span {
            font-size: 13px;
            color: #16a085;
        }

        .feedback-btn.suggestion.active {
            background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
        }
/* 文件上传相关样式 */
.file-upload-area {
    width: 100%;
    margin-bottom: 12px;
    background: #f8f9fb;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #eaeef2;
}

.file-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-association-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.file-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.file-association-toggle {
    display: none;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: .4s;
    cursor: pointer;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

.file-association-toggle:checked + .toggle-slider {
    background-color: #4b6cb7;
}

.file-association-toggle:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-text {
    font-weight: 600;
    color: #4b6cb7;
}

.file-upload-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-upload-label {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.file-upload-label:hover {
    background: linear-gradient(90deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-1px);
}

.file-input-hidden {
    display: none;
}

.selected-file-count {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #e8f6f3;
    border-radius: 6px;
    border-left: 3px solid #1abc9c;
    font-size: 12px;
    color: #16a085;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

/* 文件列表容器 */
.file-list-container {
    width: 100%;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeef2;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fb;
    border-bottom: 1px solid #eaeef2;
    font-size: 13px;
    font-weight: 600;
    color: #4b6cb7;
}

.clear-all-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-all-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* 文件列表内容 */
.file-list-content {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
    padding: 5px;
}

.file-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    color: #999;
    font-size: 13px;
    gap: 8px;
}

.file-list-empty i {
    font-size: 24px;
    opacity: 0.5;
}

/* 单个文件项 */
.file-list-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 6px;
    background: #fdfdfd;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeIn 0.3s ease-in;
}

.file-list-item:hover {
    background: #f0f7ff;
    border-color: #cce7ff;
    transform: translateX(2px);
}

.file-list-item.active {
    background: #e8f6f3;
    border-color: #1abc9c;
}

.file-item-icon {
    width: 24px;
    text-align: center;
    color: #3498db;
    font-size: 14px;
}

.file-item-info {
    flex: 1;
    min-width: 0;
    margin: 0 10px;
}

.file-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.file-size {
    font-size: 10px;
    color: #666;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-file-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    transition: background 0.3s;
}

.preview-file-btn:hover {
    background: rgba(52, 152, 219, 0.1);
}

.remove-file-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    transition: background 0.3s;
}

.remove-file-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* 文件列表底部 */
.file-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: #f8f9fb;
    border-top: 1px solid #eaeef2;
    font-size: 11px;
    color: #666;
}

#totalFileSize, #totalFileCount {
    font-weight: 600;
    color: #4b6cb7;
}

/* 文件预览容器 */
.file-preview-container {
    width: 100%;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeef2;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fb;
    border-bottom: 1px solid #eaeef2;
    font-size: 13px;
    font-weight: 600;
    color: #4b6cb7;
}

.file-content-preview {
    flex: 1;
    max-height: 250px;
    overflow-y: auto;
    padding: 15px;
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    background: #fdfdfd;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', monospace;
}

.preview-close-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.3s;
}

.preview-close-btn:hover {
    background: rgba(102, 102, 102, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .file-association-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-upload-btn-group {
        width: 100%;
    }
    
    .file-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-item-info {
        margin: 0;
        width: 100%;
    }
    
    .file-item-actions {
        align-self: flex-end;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 在现有CSS中添加神数分析的特殊样式 */
.result-title i.fa-calculator {
    color: #9b59b6; /* 紫色，表示神数分析 */
}

.tab[data-tab="shenshu"].active {
    border-bottom-color: #9b59b6;
    color: #9b59b6;
}
/* 分析要求输入容器 */
.analysis-request-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.request-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b6cb7;
    font-weight: 600;
}

.request-label i {
    color: #3498db;
}

.request-input-full {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e7ff;
    border-radius: 8px;
    font-size: 15px;
    background: #f8faff;
    transition: all 0.3s;
    box-sizing: border-box;
}

.request-input-full:focus {
    outline: none;
    border-color: #4b6cb7;
    background: white;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.1);
}

.request-input-full::placeholder {
    color: #94a3b8;
    font-size: 14px;
}

/* 分析要求显示区域 */
.request-display-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border-radius: 12px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.request-display-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-display-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e7ff;
}

.request-display-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2d3748;
    flex-grow: 1;
}

.request-display-header i {
    color: #4b6cb7;
    font-size: 20px;
}

.request-clear-btn {
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: #94a3b8;
    transition: all 0.3s;
}

.request-clear-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.request-display-content {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4b6cb7;
    font-size: 15px;
    line-height: 1.6;
    color: #2d3748;
}

.request-display-content .request-text {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.request-display-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.request-display-footer i {
    color: #f59e0b;
}
/* 在style.css中添加以下样式 */
.requirement-input-section {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.requirement-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.requirement-textarea:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.1);
}

.requirement-rule-display {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 13px;
}

.requirement-rule-display h4 {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 14px;
}

.requirement-analysis-result {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 20px;
    border-left: 4px solid #4b6cb7;
}

.requirement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.requirement-source {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-source i {
    color: #4b6cb7;
}

.requirement-content {
    line-height: 1.6;
}

.requirement-section {
    margin-bottom: 20px;
}

.requirement-section h4 {
    color: #4b6cb7;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eaeef2;
}

.requirement-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
    display: flex;
    justify-content: space-between;
}
/* 复制按钮样式 */
.copy-analysis-btn {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.copy-analysis-btn:hover {
    background: linear-gradient(90deg, #2980b9 0%, #1f618d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.2);
}

.copy-analysis-btn:active {
    transform: translateY(0);
}

.requirement-copy-btn {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
}

.requirement-copy-btn:hover {
    background: linear-gradient(90deg, #8e44ad 0%, #7d3c98 100%);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.2);
}

/* 分析头部布局调整 */
.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ai-analysis-header h3 {
    margin: 0;
    font-size: 16px;
    color: #4b6cb7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.requirement-header h3 {
    margin: 0;
    font-size: 16px;
    color: #4b6cb7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.requirement-header-details {
    margin-bottom: 15px;
}
/* 复制按钮反馈动画 */
.copy-analysis-btn:active {
    transform: scale(0.95);
}

.copy-analysis-btn.copied {
    animation: copySuccess 2s ease;
}

@keyframes copySuccess {
    0% {
        background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    }
    50% {
        background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
        box-shadow: 0 0 15px rgba(39, 174, 96, 0.5);
    }
    100% {
        background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    }
}

.requirement-copy-btn.copied {
    animation: copySuccessPurple 2s ease;
}

@keyframes copySuccessPurple {
    0% {
        background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    }
    50% {
        background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
        box-shadow: 0 0 15px rgba(39, 174, 96, 0.5);
    }
    100% {
        background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    }
}

/* 分析结果内容样式优化 */
.ai-analysis-content,
.requirement-content {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* 确保所有分析文本都可选择 */
.result-content * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}
/* 需求分析分段样式 */
.requirement-section-with-copy {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeef2;
    transition: all 0.3s ease;
}

.requirement-section-with-copy:hover {
    border-color: #4b6cb7;
    box-shadow: 0 2px 8px rgba(75, 108, 183, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h4 {
    margin: 0;
    color: #4b6cb7;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-section-btn {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.copy-section-btn:hover {
    background: linear-gradient(90deg, #8e44ad 0%, #7d3c98 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(142, 68, 173, 0.2);
}

.copy-section-btn:active {
    transform: translateY(0);
}

.section-content {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

/* 段落复制样式 */
.analysis-paragraph {
    position: relative;
    margin-bottom: 15px;
    padding: 12px;
    padding-left: 20px;
    border-left: 3px solid #eaeef2;
    transition: all 0.3s ease;
}

.analysis-paragraph:hover {
    border-left-color: #4b6cb7;
    background-color: #f8f9fa;
}

.analysis-step {
    border-left-color: #3498db;
}

.analysis-step:hover {
    border-left-color: #2980b9;
    background-color: #e8f4fc;
}

.rule-reference {
    border-left-color: #27ae60;
}

.rule-reference:hover {
    border-left-color: #219a52;
    background-color: #e8f6f3;
}

.conclusion {
    border-left-color: #e74c3c;
}

.conclusion:hover {
    border-left-color: #c0392b;
    background-color: #fdedec;
}

.reasoning {
    border-left-color: #f39c12;
}

.reasoning:hover {
    border-left-color: #d68910;
    background-color: #fef5e7;
}

.analysis-basis {
    border-left-color: #9b59b6;
}

.analysis-basis:hover {
    border-left-color: #8e44ad;
    background-color: #f4ecf7;
}

.paragraph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.paragraph-number {
    font-size: 13px;
    font-weight: 600;
    color: #4b6cb7;
    min-width: 24px;
}

.paragraph-copy-btn {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(10px);
}

.analysis-paragraph:hover .paragraph-copy-btn {
    opacity: 1;
    transform: translateX(0);
}

.paragraph-copy-btn:hover {
    background: linear-gradient(90deg, #2980b9 0%, #1f618d 100%);
    transform: scale(1.05) !important;
}

.paragraph-content {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

/* 复制成功动画 */
.copy-section-btn.copied,
.paragraph-copy-btn.copied,
.full-copy.copied {
    animation: copySuccess 1s ease;
}

@keyframes copySuccess {
    0% {
        background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    }
    50% {
        background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
        box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
    }
    100% {
        background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    }
}

.requirement-copy-btn.copied {
    animation: copySuccessPurple 1s ease;
}

@keyframes copySuccessPurple {
    0% {
        background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    }
    50% {
        background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
        box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
    }
    100% {
        background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    }
}

/* 全文复制按钮样式 */
.requirement-actions .full-copy {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.requirement-actions .full-copy:hover {
    background: linear-gradient(90deg, #8e44ad 0%, #7d3c98 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.2);
}

.requirement-actions .full-copy:active {
    transform: translateY(0);
}

/* 复制按钮组布局优化 */
.requirement-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* 确保状态显示区域样式正确 */
.ai-status {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border-radius: 8px;
    border: 1px solid #eaeef2;
    transition: all 0.3s ease;
}

.ai-status i.fa-spinner {
    margin-right: 10px;
    font-size: 18px;
    color: #4b6cb7;
}

.ai-status i.fa-check-circle {
    margin-right: 10px;
    font-size: 18px;
    color: #27ae60;
}

.ai-status i.fa-exclamation-circle {
    margin-right: 10px;
    font-size: 18px;
    color: #e74c3c;
}

/* 需求分析状态特殊样式 */
#requirementStatus {
    display: none;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-color: #b3d9ff;
}

#requirementStatus i.fa-spinner {
    color: #9b59b6;
}

#requirementStatus i.fa-check-circle {
    color: #1abc9c;
}
/* 新建文件按钮样式 */
.create-file-btn {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.create-file-btn:hover {
    background: linear-gradient(90deg, #2980b9 0%, #1f6392 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.create-file-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 160px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.modal-input, .modal-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.modal-input:focus, .modal-textarea:focus {
    outline: none;
    border-color: #4b6cb7;
}

.modal-textarea {
    resize: vertical;
    min-height: 150px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
}

.form-hint {
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
    font-style: italic;
}

.modal-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eaeaea;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-btn {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.cancel-btn {
    background: linear-gradient(90deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.save-btn {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 文件列表中的新建按钮容器 */
.create-file-container {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
}

/* 预览区域样式 */
.file-content-preview {
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
}

.preview-content {
    padding: 15px;
    background: #f8f9fa;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}


/* 建议按钮容器 */
.suggestion-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.suggestion-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.suggestion-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6392 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.suggestion-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.suggestion-button i {
    font-size: 16px;
}

/* 建议对话框 */
.suggestion-dialog {
    max-width: 500px;
}

.modal-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.modal-select:focus {
    outline: none;
    border-color: #4b6cb7;
}

/* 优先级选择器 */
.priority-selector {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.priority-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.priority-option:hover {
    background-color: #f5f5f5;
}

.priority-option input[type="radio"] {
    display: none;
}

.priority-option input[type="radio"]:checked + .priority-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.priority-badge.low {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.priority-badge.medium {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

.priority-badge.high {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.priority-desc {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* 建议预览区域 */
.suggestion-preview {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-preview .preview-content {
    padding: 15px;
    background: #f8f9fa;
}

.suggestion-preview .preview-content > div {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #4b6cb7;
}

.suggestion-preview .preview-content strong {
    color: #2c3e50;
    margin-right: 5px;
}

/* 提交按钮的加载动画 */
#submitSuggestionBtn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

#submitSuggestionBtn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .suggestion-container {
        bottom: 20px;
        right: 20px;
    }
    
    .suggestion-button {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .suggestion-dialog {
        width: 95%;
        max-width: 95%;
    }
    
    .priority-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .priority-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 8px 12px;
    }
    
    .priority-badge {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .priority-desc {
        font-size: 11px;
        margin-left: 10px;
    }
}
`
/* 提交按钮成功状态 */
#submitSuggestionBtn.success {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%) !important;
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 提交成功提示 */
.suggestion-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out, fadeOut 0.5s ease-in 2.5s forwards;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.global-hint {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-out;
    display: flex;
    align-items: center;
}

.global-hint.show {
    transform: translateX(0);
    opacity: 1;
}

.global-hint .hint-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.global-hint.hint-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-left: 4px solid #2980b9;
}

.global-hint.hint-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-left: 4px solid #2ecc71;
}

.global-hint.hint-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: white;
    border-left: 4px solid #f1c40f;
}

.global-hint.hint-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-left: 4px solid #c0392b;
}
/* 文件操作按钮样式 */
.file-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-file-btn,
.preview-file-btn,
.remove-file-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-file-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.preview-file-btn:hover {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.remove-file-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* 文件列表项悬停效果 */
.file-list-item:hover .file-item-actions {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .file-item-actions {
        opacity: 1;
        transform: translateX(0);
    }
}
/* 增强的需求分析样式 */
.analysis-source-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    color: #1565c0;
}

.analysis-source-note i {
    margin-right: 8px;
    color: #2196f3;
}

.analysis-summary-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.analysis-summary-section h5 {
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.analysis-summary-section h5 i {
    margin-right: 8px;
    color: #3498db;
}

.summary-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dfe6e9;
    margin-bottom: 8px;
}

.summary-content {
    font-size: 14px;
    line-height: 1.5;
    color: #2d3436;
}

.detailed-analysis-section {
    margin-bottom: 30px;
}

.detailed-analysis-section h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.detailed-analysis-section h5 i {
    margin-right: 8px;
    color: #3498db;
}

.detailed-analysis-paragraph {
    background: white;
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.detailed-analysis-paragraph:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.detailed-analysis-paragraph .paragraph-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f2f6;
}

.paragraph-number {
    background: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 10px;
}

.paragraph-type {
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #7f8c8d;
    margin-right: auto;
}

.detailed-analysis-paragraph .paragraph-content {
    font-size: 14px;
    line-height: 1.7;
    color: #2d3436;
    margin-bottom: 10px;
}

.analysis-metadata {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dfe6e9;
}

.metadata-item {
    font-size: 11px;
    color: #636e72;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.metadata-item i {
    margin-right: 4px;
    font-size: 10px;
}

.conclusion-section {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    border: 1px solid #c8e6c9;
}

.conclusion-section h5 {
    color: #2e7d32;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.conclusion-section h5 i {
    margin-right: 8px;
    color: #4caf50;
}

.conclusion-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #c8e6c9;
}

.conclusion-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #2e7d32;
    font-weight: 600;
}

.conclusion-header i {
    margin-right: 8px;
    color: #4caf50;
}

.conclusion-content {
    font-size: 14px;
    line-height: 1.6;
    color: #424242;
}

.professional-note {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 8px;
    border: 1px solid #ffcc80;
}

.note-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #ef6c00;
    font-weight: 600;
}

.note-header i {
    margin-right: 8px;
    color: #ff9800;
}

.note-content {
    font-size: 13px;
    line-height: 1.6;
    color: #5d4037;
}

.note-content p {
    margin-bottom: 8px;
}
/* 反馈样式 */
.feedback-section {
    margin-top: 25px;
    padding: 20px 0;
    border-top: 1px solid #eaeef2;
}

.feedback-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border-radius: 10px;
    border: 1px solid #dfe6e9;
    padding: 20px;
    text-align: center;
}

.feedback-container p:first-child {
    color: #4b6cb7;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feedback-container p:nth-child(2) {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.feedback-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.requirement-feedback-btn {
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.requirement-feedback-btn.positive {
    background: linear-gradient(90deg, #27ae60 0%, #1abc9c 100%);
    color: white;
}

.requirement-feedback-btn.negative {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.requirement-feedback-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.requirement-feedback-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.feedback-hint {
    font-size: 11px;
    color: #999;
    margin-top: 15px;
}

.thank-you-message {
    margin-top: 15px;
    animation: fadeIn 0.5s ease;
}

.thank-you-container {
    background: #e8f6f3;
    border-radius: 8px;
    border-left: 4px solid #1abc9c;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.thank-you-container i {
    color: #1abc9c;
    font-size: 16px;
}

.thank-you-container span {
    color: #16a085;
    font-size: 13px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 优化的需求分析样式 */
.optimized-analysis-section {
    margin-bottom: 25px;
}

.analysis-process-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.analysis-process-header i {
    font-size: 18px;
    color: #3498db;
    margin-right: 10px;
}

.analysis-process-header h5 {
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.optimized-analysis-paragraph {
    background: white;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.optimized-analysis-paragraph:hover {
    border-color: #3498db;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.1);
}

.optimized-paragraph-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.optimized-paragraph-number {
    background: #3498db;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.optimized-paragraph-type {
    background: #ecf0f1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #7f8c8d;
    margin-right: auto;
}

.optimized-paragraph-copy-btn {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.optimized-paragraph-copy-btn:hover {
    background: #f8f9fa;
    color: #3498db;
}

.optimized-paragraph-content {
    font-size: 14px;
    line-height: 1.6;
    color: #2d3436;
}

.optimized-conclusion-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeef2;
}

.conclusion-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.conclusion-header i {
    color: #27ae60;
    font-size: 16px;
    margin-right: 8px;
}

.conclusion-header h5 {
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.optimized-conclusion-item {
    background: #f8f9fa;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #27ae60;
}

.optimized-conclusion-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #27ae60;
}

.optimized-conclusion-label i {
    margin-right: 6px;
    font-size: 14px;
}

.optimized-conclusion-content {
    font-size: 14px;
    line-height: 1.6;
    color: #424242;
}

.rtoken-stats {
    background: linear-gradient(90deg, #3498db, #2c3e50);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
/* 移动端模态框样式 */
.mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-modal-dialog {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.mobile-modal-body {
    padding: 20px;
}

.mobile-option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.mobile-option-item:hover {
    background: #e9ecef;
}

.mobile-option-item i {
    font-size: 24px;
    color: #4b6cb7;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.mobile-option-item h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.mobile-option-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.mobile-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.mobile-modal-btn {
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-modal-btn.cancel-btn {
    background: #f8f9fa;
    color: #666;
    width: 100%;
}

.mobile-modal-btn.cancel-btn:hover {
    background: #e9ecef;
}

/* 移动端文本输入工具栏 */
.mobile-textarea-wrapper {
    position: relative;
}

.mobile-textarea-toolbar {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.mobile-toolbar-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    margin: 0 3px;
}

.mobile-toolbar-btn:hover {
    background: #4b6cb7;
    color: white;
    border-color: #4b6cb7;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .rule-library-textarea {
        font-size: 16px; /* 移动端加大字体 */
        min-height: 200px; /* 增加最小高度 */
    }
    
    .rule-lib-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .rule-library-section {
        margin: 10px 0;
        padding: 12px;
    }
    
    .rule-library-section .instruction {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rule-library-section .instruction .rule-lib-btn {
        margin-left: 0;
        width: 100%;
    }
}
/* 已保存规则库文件管理区域样式 */
.saved-rule-files-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.saved-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.saved-files-header h4 {
    margin: 0;
    font-size: 16px;
    color: #4b6cb7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-files-header h4 .fa-folder-open {
    color: #6c757d;
}

.refresh-files-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s;
}

.refresh-files-btn:hover {
    background-color: #f8f9fa;
    border-color: #4b6cb7;
    color: #4b6cb7;
    transform: rotate(90deg);
}

.refresh-files-btn:active {
    transform: rotate(180deg);
}

.saved-files-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
}

.saved-files-empty {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
    font-size: 14px;
}

.saved-files-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #dee2e6;
}

.saved-files-empty span {
    display: block;
    line-height: 1.5;
}

.saved-rule-file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.saved-rule-file-item:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.saved-rule-file-item.active {
    background-color: #e3f2fd;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2);
}

.saved-file-icon {
    flex-shrink: 0;
    margin-right: 12px;
    color: #4b6cb7;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.saved-file-info {
    flex-grow: 1;
    min-width: 0; /* 防止内容溢出 */
}

.saved-file-name {
    font-weight: 600;
    font-size: 14px;
    color: #343a40;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.saved-file-size {
    display: flex;
    align-items: center;
    gap: 4px;
}

.saved-file-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.saved-file-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.saved-file-action-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s;
    font-size: 12px;
}

.saved-file-action-btn:hover {
    transform: translateY(-1px);
}

.saved-file-action-btn.edit-btn:hover {
    background-color: #d4edda;
    border-color: #28a745;
    color: #28a745;
}

.saved-file-action-btn.preview-btn:hover {
    background-color: #cce5ff;
    border-color: #007bff;
    color: #007bff;
}

.saved-file-action-btn.delete-btn:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #dc3545;
}

.saved-files-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #6c757d;
    text-align: right;
}

/* 规则库文件预览模态框 */
.rule-file-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rule-file-modal-dialog {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rule-file-modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-file-modal-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-file-modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.rule-file-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rule-file-modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.rule-file-preview-content {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    max-height: 400px;
    overflow-y: auto;
}

.rule-file-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.rule-file-modal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-file-modal-btn.edit-btn {
    background: #28a745;
    color: white;
}

.rule-file-modal-btn.edit-btn:hover {
    background: #218838;
}

.rule-file-modal-btn.cancel-btn {
    background: #6c757d;
    color: white;
}

.rule-file-modal-btn.cancel-btn:hover {
    background: #5a6268;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .saved-rule-files-section {
        padding: 12px;
    }
    
    .saved-file-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .rule-file-modal-dialog {
        width: 95%;
        max-height: 90vh;
    }
}
/* 已保存规则库文件管理区域样式 */
.saved-rule-files-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.saved-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.saved-files-header h4 {
    margin: 0;
    font-size: 16px;
    color: #4b6cb7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-files-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
}

.saved-files-empty {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
    font-size: 14px;
}

.saved-rule-file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.saved-rule-file-item:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}
