/* css判定与可视化查看 */
        :root {
--primary-color: #4361ee;
--primary-light: #e0e7ff;
--error-color: #f72585;
--success-color: #4cc9f0;
--warning-color: #f8961e;
--text-color: #2b2d42;
--text-light: #6c757d;
--bg-color: #f8f9fa;
--panel-bg: #ffffff;
--border-color: #e9ecef;
--border-radius: 8px;
--box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            line-height: 1.6;
            color: var(--text-color);
            background-color: var(--bg-color);
            padding: 20px;
            overflow-x: auto;
        }
        
        .app-container {
            display: flex;
            width: 100%;
            min-width: 100%;
            gap: 20px;
        }
        
        .editor-panel {
            background: var(--panel-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 25px;
            width: 50%;
            min-width: 400px;
            flex-shrink: 0;
        }
        
        .analysis-panel {
            background: var(--panel-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 25px;
            width: 25%;
            min-width: 300px;
            flex-shrink: 0;
        }
        
        .visualization-panel {
            background: var(--panel-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 25px;
            width: 25%;
            min-width: 300px;
            flex-shrink: 0;
            border: 1px dashed var(--border-color);
        }
        
        .app-header {
            text-align: center;
            margin-bottom: 20px;
        }
        
        .app-title {
            font-size: 1.8rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 5px;
        }
        
        .app-description {
            color: var(--text-light);
            font-size: 0.95rem;
        }
        
        .panel-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--primary-color);
            display: flex;
            align-items: center;
        }
        
        .panel-title svg {
            margin-right: 8px;
        }
        
        .code-editor {
            width: 100%;
            height: 300px;
            padding: 15px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 20px;
            resize: vertical;
            background-color: #f8fafc;
            color: #334155;
        }
        
        .property-toolbar {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 20px;
        }
        
        .property-category {
            margin-bottom: 15px;
            grid-column: 1 / -1;
        }
        
        .category-title {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-light);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .property-btn {
            background: var(--primary-light);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            color: var(--primary-color);
            font-weight: 500;
            white-space: nowrap;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .property-btn:hover {
            background: #dbe4ff;
            border-color: #bac8ff;
        }
        
        .property-btn.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .property-btn .en-text {
            display: none;
        }
        
        .property-btn.show-en .en-text {
            display: inline;
        }
        
        .property-btn.show-en .zh-text {
            display: none;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }
        
        .btn {
            padding: 10px 16px;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s;
            border: none;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn svg {
            margin-right: 6px;
        }
        
        .btn-primary {
            background: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background: #3a56d4;
        }
        
        .btn-secondary {
            background: var(--panel-bg);
            color: var(--text-color);
            border: 1px solid var(--border-color);
        }
        
        .btn-secondary:hover {
            background: #f1f3f9;
        }
        
        .btn-toggle {
            background: var(--panel-bg);
            color: var(--text-color);
            border: 1px solid var(--border-color);
            margin-left: auto;
        }
        
        .btn-toggle:hover {
            background: #f1f3f9;
        }
        
        .analysis-content {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }
        
        .structure-info {
            margin-bottom: 20px;
        }
        
        .section-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--primary-color);
            display: flex;
            align-items: center;
        }
        
        .section-title svg {
            margin-right: 8px;
        }
        
        .info-box {
            background: #f8fafc;
            border-radius: var(--border-radius);
            padding: 15px;
            border-left: 3px solid var(--primary-color);
            margin-bottom: 15px;
        }
        
        .info-title {
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .info-desc {
            font-size: 0.85rem;
            color: var(--text-light);
            line-height: 1.5;
        }
        
        .color-picker-container {
            display: none;
            position: absolute;
            background: var(--panel-bg);
            padding: 10px;
            border-radius: var(--border-radius);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 100;
        }
        
        .analysis-result {
            margin-top: 20px;
            overflow-y: auto;
            max-height: 400px;
        }
        
        .rule-item {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .rule-selector {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--text-color);
        }
        
        .property-item {
            margin-bottom: 10px;
        }
        
        .property-row {
            display: flex;
            align-items: flex-start;
            margin-bottom: 3px;
        }
        
        .property-name {
            min-width: 120px;
            font-weight: 500;
            font-family: 'Fira Code', 'Consolas', monospace;
        }
        
        .property-value {
            font-family: 'Fira Code', 'Consolas', monospace;
        }
        
        .validation-status {
            display: inline-flex;
            align-items: center;
            margin-left: 8px;
            font-size: 0.75rem;
            padding: 2px 6px;
            border-radius: 4px;
        }
        
        .status-valid {
            background: #d1fae5;
            color: #065f46;
        }
        
        .status-invalid {
            background: #fee2e2;
            color: #b91c1c;
        }
        
        .status-warning {
            background: #fef3c7;
            color: #92400e;
        }
        
        .error-message {
            font-size: 0.8rem;
            color: var(--error-color);
            margin-top: 3px;
            margin-left: 120px;
        }
        
        .suggestion {
            font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 3px;
            margin-left: 120px;
            display: flex;
            align-items: center;
        }
        
        .suggestion-btn {
            color: var(--primary-color);
            text-decoration: underline;
            cursor: pointer;
            margin-left: 5px;
            background: none;
            border: none;
            font-size: 0.8rem;
        }
        
        .syntax-errors {
            margin-top: 25px;
            padding: 15px;
            background: #fff5f5;
            border-radius: var(--border-radius);
            border-left: 3px solid var(--error-color);
        }
        
        .error-item {
            margin-bottom: 8px;
            font-size: 0.85rem;
            color: var(--error-color);
        }
        
        .visualization-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .visualization-content {
            height: 300px;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 15px;
            background: white;
            overflow: auto;
        }
        
        .visualization-placeholder {
            color: var(--text-light);
            text-align: center;
            padding: 40px 0;
            font-size: 0.9rem;
        }
        
        .selector-highlight {
            background-color: #fef08a;
            padding: 0 2px;
            border-radius: 2px;
        }
        
        .html-structure-warning {
            background: #fef3c7;
            padding: 10px;
            border-radius: var(--border-radius);
            margin-bottom: 15px;
            font-size: 0.85rem;
            color: #92400e;
        }
        
        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 100;
        }
        
        .back-to-top.visible {
            opacity: 1;
        }
        
        .back-to-top:hover {
            background: #3a56d4;
        }
        
        .error-line {
            background-color: #fee2e2;
            padding: 2px 4px;
            border-radius: 2px;
            font-family: 'Fira Code', monospace;
            font-size: 0.85rem;
        }
        
        .error-symbol {
            color: var(--error-color);
            font-weight: bold;
        }
        
        #color-picker {
            display: none;
            position: fixed;
            z-index: 1000;
            background: white;
            padding: 10px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        .visualization-iframe {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 4px;
        }