/* 纯原生 CSS，无任何工具类，无 Tailwind */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
}

.title-section {
    text-align: center;
    margin-bottom: 32px;
}

.main-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.sub-title {
    font-size: 16px;
    color: #666;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-edit {
    background: #3b82f6;
    color: #fff;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-default {
    background: #e5e7eb;
}

.btn-default:hover {
    background: #d1d5db;
}

.btn-compare {
    padding: 8px 16px;
    background: #10b981;
    color: #fff;
}

.btn-compare:hover {
    background: #059669;
}

.btn-nav {
    background: #fbcfe8;
    color: #db2777;
}

.compare-wrapper {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.text-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 500px;
}

.panel-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.text-editor {
    width: 100%;
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: none;
    font-family: monospace, Consolas;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-all;
    height: 100%;
}

.text-viewer {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    outline: none;
    font-family: monospace, Consolas;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-all;
    height: 100%;
    display: none;
}

.diff-separator {
    width: 32px;
    height: 500px;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    font-size: 12px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 24px;
    display: none;
}

.options-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.option-label {
    font-size: 14px;
}

.diff-stats {
    font-size: 14px;
    color: #4b5563;
    margin-left: auto;
    display: none;
}

.diff-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    display: none;
}

.current-info {
    padding: 4px 12px;
    background: #22c55e;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
}

/* 差异高亮样式 */
.diff-line {
    background: #fff3cd !important;
}

.diff-char {
    background: #f8d7da;
    text-decoration: underline;
    text-decoration-color: #dc3545;
    text-decoration-thickness: 2px;
}

.current-line {
    background: #dbeafe !important;
    border-left: 3px solid #2563eb !important;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

input[type="checkbox"] {
    accent-color: #22c55e;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}