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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0;
    overflow: hidden; /* 防止页面出现滚动条 */
}

/* 应用主容器 */
.app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    background-color: white;
}

/* 左侧侧边栏 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #34495e;
    position: relative;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    text-align: center;
    color: #ecf0f1;
}

/* 菜单项 */
.menu-list {
    list-style: none;
    padding: 10px 0;
    flex: 1;
}

/* 侧边栏底部样式 */
.sidebar-footer {
    padding: 20px 0 30px;
    margin-top: auto;
    border-top: 1px solid #34495e;
}

.footer-item {
    margin-bottom: 10px;
}

.feedback-link,
.icp-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.feedback-link:hover,
.icp-link:hover {
    color: #ffffff;
    background-color: #34495e;
    text-decoration: none;
}

.feedback-link .menu-text,
.icp-link .menu-text {
    font-size: 14px;
    font-weight: normal;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #34495e;
    border-left-color: #3498db;
}

.menu-item.active {
    background-color: #3498db;
    border-left-color: #2980b9;
    font-weight: 600;
}

.menu-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.menu-text {
    font-size: 15px;
}

/* 敬请期待标签样式 */
.coming-soon {
    margin-left: auto;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 敬请期待文本样式 */
.coming-soon-text {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 600;
    margin-top: 30px;
    animation: bounce 2s infinite;
}

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

/* 主内容区域 */
.main-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

/* 内容面板 */
.content-panel {
    background-color: white;
    padding: 20px;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin-bottom: 20px;
}

/* 插件信息卡片样式 */
.plugin-info-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: 100%;
    max-width: none;
    border: 1px solid #eaeaea;
}

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

/* 插件图标样式 */
.plugin-icon {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin-right: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.plugin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.plugin-info-card:hover .plugin-icon img {
    transform: scale(1.05);
}

/* 插件详情样式 */
.plugin-details {
    flex: 1;
    color: #333333;
}

.plugin-details h2 {
    margin: 0 0 15px 0;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.plugin-description {
    margin-bottom: 20px;
    color: #666666;
    font-size: 16px;
    line-height: 1.6;
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.plugin-meta-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.plugin-meta-inline .rating {
    font-weight: bold;
    color: #ff9500;
}

.plugin-meta-inline .rating-count {
    color: #999;
}

.plugin-meta-inline .install-count,
.plugin-meta-inline .developer-info,
.plugin-meta-inline .version-info {
    white-space: nowrap;
}

/* 保留原有的样式类但添加新的内联功能 */
.plugin-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.rating-info {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 25px;
    border: 1px solid #e5e5e5;
}

.rating {
    font-size: 20px;
    font-weight: bold;
    color: #ff9500;
    margin-right: 5px;
}

.rating-count {
    color: #666666;
    font-size: 14px;
}

/*.install-count {*/
/*    color: #666666;*/
/*    font-size: 15px;*/
/*    font-weight: 500;*/
/*    background: #f5f5f5;*/
/*    padding: 6px 14px;*/
/*    border-radius: 25px;*/
/*    border: 1px solid #e5e5e5;*/
/*}*/

.developer-info,
.version-info,
.install-count{
    color: #555555;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.developer-info span,
.version-info span,
.install-count span{
    font-weight: 600;
    color: #333333;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 8px;
    font-size: 14px;
    border: 1px solid #e5e5e5;
}

/* 扩展页面容器 */
.extension-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.extension-container h1 {
    margin-bottom: 35px;
    color: #2c3e50;
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 15px;
}

.extension-container h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.extension-container p {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

/* 扩展卡片样式 */
.extension-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 25px;
    width: 100%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.extension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.extension-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.extension-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.extension-card:hover h3 {
    color: #667eea;
}

/* 敬请期待卡片特殊样式 */
.coming-soon-card {
    background-color: #fff8f8;
    border: 1px solid #ffe0e0;
}

.coming-soon-card h3 {
    color: #e74c3c;
    display: inline-block;
    position: relative;
}

.coming-soon-card h3::after {
    content: "(开发中)";
    font-size: 14px;
    color: #e74c3c;
    margin-left: 10px;
    font-weight: normal;
}

/* 分隔线样式 */
.extension-divider {
    width: 80%;
    height: 2px;
    background-color: #e0e0e0;
    margin: 30px 0;
    position: relative;
}

.extension-divider::before {
    content: ""; /* 分隔线内容 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    padding: 0 20px;
    color: #999;
    font-size: 16px;
}

/* 视频容器样式 */
.video-container {
    margin: 30px 0 50px 0;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background-color: #000;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.video-container video {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    transition: filter 0.3s ease;
}

.video-container:hover video {
    filter: brightness(1.05);
}

/* 更新日志容器样式 */
.changelog-container {
    margin-top: 60px;
    width: 100%;
    text-align: left;
    background-color: #fafbfc;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.changelog-container h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    font-size: 28px;
    font-weight: 800;
    position: relative;
}

.changelog-container h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.plugin-description {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 35px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    line-height: 1.6;
}

.changelog-item {
    margin-bottom: 35px;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.changelog-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.changelog-item h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.changelog-item h3::before {
    content: '•';
    color: #667eea;
    font-size: 24px;
    margin-right: 10px;
    font-weight: bold;
}

/* 更新日志列表样式 */
.changelog-item ol {
    margin-left: 25px;
    color: #555;
}

.changelog-item li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.changelog-item li strong {
    color: #2c3e50;
    font-weight: 600;
}

.changelog-item ul {
    margin-left: 25px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.changelog-item ul li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* 主要内容区域 - 左右布局 */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex: 1;
    min-height: 0; /* 确保flex子元素可以正常收缩 */
}

/* 左侧面板 - 生成的XPath和层级图 */
.left-panel {
    flex: 1;
    min-width: 0;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 右侧面板 - 元素编辑 */
.right-panel {
    flex: 1;
    min-width: 0;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 右侧编辑区域滚动容器 */
.elements-container-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 10px;
}

/* 优化滚动条样式 */
.elements-container-scroll::-webkit-scrollbar {
    width: 8px;
}

.elements-container-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.elements-container-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.elements-container-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.description {
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

/* 标题样式 */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
}

h4 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

/* 元素块和条件块样式 */
.elements-container {
    margin-bottom: 15px;
}

.element-block {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.element-block:hover {
    border-color: #3498db;
}

.element-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3f2fd;
}

.element-header h3 {
    color: #1976d2;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.element-controls {
    display: flex;
    gap: 10px;
}

.element-properties {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.conditions-group {
    margin-top: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.conditions-header {
    padding: 15px 15px 0 15px;
    margin-bottom: 15px;
}

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

.conditions-group h4 {
    color: #37474f;
    margin: 0 0 15px 0;
    padding-left: 5px;
    border-left: 3px solid #42a5f5;
}

.subconditions-container {
    padding: 0 15px;
    margin-bottom: 15px;
}

.subcondition-block {
    background-color: #f8fafc;
    border: 1px solid #e0f2fe;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.subcondition-block:hover {
    background-color: #f0f9ff;
    border-color: #bae6fd;
}

.subcondition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0f2fe;
}

.subcondition-header span {
    font-weight: 600;
    color: #0277bd;
    font-size: 14px;
    background-color: #e3f2fd;
    padding: 2px 8px;
    border-radius: 12px;
}

.subcondition-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}


/* 字段样式 */
.field {
    display: flex;
    flex-direction: column;
}

.field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.field select,
.field input {
    width: 100%;
    max-width: 100%;
    min-width: 120px;
}

.field input[type="text"],
.field input[type="number"],
.field select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.field input[type="text"]::placeholder {
    color: #999;
}

/* 按钮样式 - 优化样式 */
.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2980b9;
}

.btn-primary.btn-large {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    margin: 20px 0;
}

.mb-2 {
    margin-bottom: 10px;
}

.btn-secondary {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c0392b;
}

.btn-danger:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

button:active {
    transform: translateY(1px);
}

/* 原按钮选择器兼容 */
.remove-condition,
.remove-element,
.remove-subcondition {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
}

.remove-condition:hover:not(:disabled),
.remove-element:hover:not(:disabled),
.remove-subcondition:hover:not(:disabled) {
    background-color: #c0392b;
}

.remove-condition:disabled,
.remove-element:disabled,
.remove-subcondition:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.condition-actions {
    padding: 10px 15px 15px;
    display: flex;
    gap: 10px;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}

.add-subcondition {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-primary-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 3px;
}

.add-subcondition:hover {
    background-color: #218838;
}

.condition-actions .add-subcondition[data-logic="or"] {
    background-color: #007bff;
}

.condition-actions .add-subcondition[data-logic="or"]:hover {
    background-color: #0056b3;
}

#add-element {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0;
    transition: background-color 0.3s, transform 0.1s;
}

#add-element:hover {
    background-color: #27ae60;
}

#copy-xpath {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: background-color 0.3s, transform 0.1s;
}

#copy-xpath:hover {
    background-color: #2980b9;
}

/* 结果区域样式 - 优化为右侧显示 */
.result-section {
    background-color: #e8f4fc;
    border: 1px solid #b3e5fc;
    border-radius: 0;
    padding: 15px;
    margin-bottom: 15px;
}

.xpath-result-container label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

.xpath-result-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.xpath-result {
    background-color: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #ecf0f1;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* 层级关系图样式 */
.hierarchy-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
}

.hierarchy-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.hierarchy-container {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 20px;
    min-height: 250px;
    overflow-x: auto;
}

.hierarchy-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
}

.hierarchy-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.hierarchy-item:hover {
    transform: translateX(5px);
}

.hierarchy-item.root {
    background-color: #2c3e50;
    color: white;
    align-self: center;
    font-weight: bold;
}

.hierarchy-item.element {
    background-color: #3498db;
    color: white;
    margin-left: 30px;
}

.hierarchy-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 30px;
    height: 2px;
    background-color: #95a5a6;
}

.hierarchy-item:first-child::before {
    display: none;
}

.node-label {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-right: 10px;
}

.axis-indicator {
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 10px;
    font-weight: bold;
}

.condition-badge {
    background-color: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
    font-weight: bold;
}

/* 条件内容样式 */
.conditions-content {
    margin-top: 5px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 12px;
}

.condition-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #555;
}

.condition-item {
    padding: 2px 0;
    color: #333;
    font-family: 'Courier New', monospace;
    background-color: #fff;
    padding: 2px 5px;
    border-radius: 2px;
    margin-bottom: 2px;
}

/* 示例区域样式 */
.examples-section {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 30px;
}

.examples-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.example-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.example-item p {
    margin: 5px 0 10px 0;
    color: #666;
}

.example-item code {
    background-color: #f8f9fa;
    padding: 5px 8px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    color: #e74c3c;
}

.author-tag {
    display: inline-block;
    background-color: #80c1e7;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.author-tag:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 在中等屏幕上改为上下布局 */
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel,
    .right-panel {
        width: 100%;
    }
    
    .left-panel {
        max-height: 500px;
    }
    
    .hierarchy-content .hierarchy-item {
        margin-left: 15px;
    }
    
    .btn-primary, .btn-secondary, .btn-danger {
        margin-bottom: 10px;
    }
    
    .subcondition-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .menu-list {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .menu-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 15px;
    }
    
    .menu-item:hover,
    .menu-item.active {
        border-left-color: transparent;
        border-bottom-color: #3498db;
    }
    
    .main-area {
        order: 1;
        padding: 15px;
    }
    
    .content-panel {
        padding: 15px;
    }
    
    /* 小屏幕上的侧边栏底部样式 */
    .sidebar-footer {
        order: 3;
        padding: 10px 0;
        display: flex;
        justify-content: center;
        border-top: none;
        border-bottom: 1px solid #34495e;
    }
    
    .footer-item {
        margin-bottom: 0;
        margin-right: 15px;
    }
    
    .footer-item:last-child {
        margin-right: 0;
    }
    
    .feedback-link,
    .icp-link {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .feedback-link .menu-text,
    .icp-link .menu-text {
        font-size: 12px;
    }
    
    .element-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .element-controls {
        width: 100%;
    }
    
    .add-subcondition,
    .remove-element {
        flex: 1;
    }
    
    .element-properties,
    .subcondition-fields {
        grid-template-columns: 1fr;
    }
    
    .xpath-result-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    #copy-xpath {
        align-self: flex-start;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .xpath-result {
        min-width: 100%;
    }
    
    /* 层级图适配 */
    .hierarchy-content {
        min-width: auto;
    }
    
    .hierarchy-item.element {
        margin-left: 15px;
    }
    
    .hierarchy-item::before {
        left: -15px;
        width: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .sidebar-header h2 {
        font-size: 16px;
    }
    
    .menu-item {
        padding: 10px 12px;
    }
    
    .menu-text {
        font-size: 14px;
    }
    
    .main-area {
        padding: 10px;
    }
    
    .content-panel {
        padding: 10px;
    }
    
    .extension-container {
        padding: 20px 15px;
        height: auto;
    }
    
    .extension-container h1 {
        font-size: 22px;
    }
    
    .extension-card {
        padding: 20px;
    }
    
    .extension-card h3 {
        font-size: 18px;
    }
    
    .extension-divider {
        width: 90%;
        margin: 20px 0;
    }
    
    .extension-divider::before {
        padding: 0 15px;
        font-size: 14px;
    }
    
    .coming-soon-text {
        font-size: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .element-block {
        padding: 15px;
    }
    
    .hierarchy-container {
        padding: 15px;
    }
}