﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #f5f5f5;
}

.container {
    max-width: 1400px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 5% auto auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.section {
    display: flex;
    flex-direction: column;
}

.section h2 {
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
}

.file-input {
    margin-bottom: 15px;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.left-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    resize: vertical;
}

#yaml_content {
    flex: 1;
    min-height: 350px;
}

#schema_content {
    height: 100%;
    min-height: 450px;
}

textarea:read-only {
    background: #f9f9f9;
    color: #666;
}

.button-container {
    text-align: center;
    margin: 20px 0;
}

button {
    padding: 12px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    background: #5568d3;
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 4px;
}

.result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result h3 {
    margin-bottom: 10px;
}

.result ul {
    margin-left: 20px;
}

.result li {
    margin: 5px 0;
}

input[type="file"] {
    padding: 8px;
}

.editor-wrapper {
    position: relative;
    display: flex;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #f8fafc;
}

.line-numbers {
    padding: 10px 8px 10px 10px;
    background: #eef1f5;
    color: #8996a8;
    text-align: right;
    user-select: none;
    min-width: 42px;
    border-right: 1px solid #d0d7de;
    overflow: hidden;
    white-space: pre;
    pointer-events: none;
    line-height: 1.6;
}

.line-numbers .ln-error {
    color: #c0392b;
    font-weight: 700;
    background: #fdecea;
    display: block;
    margin: 0 -8px 0 -10px;
    padding: 0 8px 0 10px;
}

.line-numbers .ln-active {
    color: #e74c3c;
    font-weight: 900;
    background: #fbd5d1;
    display: block;
    margin: 0 -8px 0 -10px;
    padding: 0 8px 0 10px;
}

.yaml-editor {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    padding: 10px 12px;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.6;
    color: #1e2a38;
    white-space: pre;
    overflow: auto;
    tab-size: 2;
}

.result.error {
    background: #fff8f8;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.result.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.error-item {
    background: #fff;
    border: 1px solid #f5c2c7;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}

.error-item:hover {
    border-left-color: #c0392b;
    box-shadow: 0 2px 12px rgba(192, 57, 43, 0.15);
    transform: translateX(2px);
}

.error-item.active-error-card {
    border-left-color: #c0392b;
    background: #fff5f5;
    box-shadow: 0 3px 16px rgba(192, 57, 43, 0.2);
}

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

.error-line-badge {
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.error-path {
    font-size: 12px;
    color: #7b8794;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.error-message {
    font-size: 14px;
    font-weight: 600;
    color: #c0392b;
    margin-bottom: 8px;
    line-height: 1.5;
}

.error-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.error-detail-chip {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
}

.error-detail-chip .chip-label {
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.error-detail-chip .chip-value {
    color: #212529;
    word-break: break-word;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.click-hint {
    font-size: 11px;
    color: #aab4be;
    position: absolute;
    right: 14px;
    top: 14px;
}

.error-count-header {
    font-size: 16px;
    font-weight: 700;
    color: #c0392b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jump-to-line-note {
    font-size: 12px;
    color: #7b8794;
    background: #f1f3f5;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
}