.header {
    background: white;
    padding: 12px 24px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor {
    display: none;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    flex-direction: column;
    left: 0;
    z-index: 999;
}

.logo {
    font-size: 14px;
    color: #666;
}

.upload-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.panel {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.logo span {
    color: #1a73e8;
    font-weight: 600;
}

.share-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.share-btn:hover {
    background: #1557b0;
}

.toolbar {
    background: #fafafa;
    border-bottom: 1px solid #ddd;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn {
    background: white;
    border: 1px solid #dadce0;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #5f6368;
    transition: all 0.2s;
}

.btn:hover {
    background: #f0f0f0;
}

.btn.active {
    background: #e8f0fe;
    color: #1a73e8;
}

.btn svg {
    width: 14px;
    height: 14px;
}

.compare-main-btn {
    background: #1B2FE7;
      display: block;          /* 👈 force block */
    margin: 20px auto;
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    align-items: center;
    gap: 10px;
}

.compare-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.compare-main-btn svg {
    width: 20px;
    height: 20px;
}

.sep {
    width: 1px;
    height: 24px;
    background: #dadce0;
    margin: 0 4px;
}

input[type="number"] {
    width: 45px;
    text-align: center;
    border: 1px solid #dadce0;
    padding: 4px;
    font-size: 12px;
}

select {
    border: 1px solid #dadce0;
    padding: 5px 8px;
    font-size: 12px;
    background: white;
}

.main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.viewers {
    flex: 1;
    display: flex;
    background: #525659;
}

.panel.hidden {
    display: none;
}

.scroll {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.scroll::-webkit-scrollbar-track {
    background: #3a3d40;
}

.scroll::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 5px;
}

.pdf-page {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

canvas {
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mark {
    position: absolute;
    opacity: 0.3;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.mark:hover {
    opacity: 0.5;
    border-color: #1a73e8;
}

.mark.active {
    opacity: 0.6;
    border: 2px solid #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3);
}

.mark.del {
    background: var(--del-color, #ff6b6b);
}

.mark.ins {
    background: var(--ins-color, #51cf66);
}

.mark.move {
    background: var(--move-color, #4dabf7);
}

.divider {
    width: 2px;
    background: #3a3d40;
}

.upload {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.upload.hide {
    display: none;
}

.upload-box {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    width: 100%;
}

.upload-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #1B2FE7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.upload-box h3 {
    margin-bottom: 8px;
    font-size: 24px;
    color: #2d3748;
    font-weight: 700;
}

.upload-desc {
    color: #718096;
    margin-bottom: 30px;
    font-size: 14px;
}

.upload-btn {
    background: #1B2FE7;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.upload-btn svg {
    width: 18px;
    height: 18px;
}

.file-info {
    margin-top: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.file-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #38a169;
    font-weight: 600;
}

.file-success svg {
    width: 24px;
    height: 24px;
    color: #38a169;
}

.file-name {
    color: #2d3748;
    font-size: 14px;
    word-break: break-word;
}

.change-file-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    margin-top: 10px;
}

.change-file-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.change-file-btn svg {
    width: 16px;
    height: 16px;
}

.text-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 5;
    display: none;
}

.text-area.show {
    display: block;
}

.text-area textarea {
    width: 100%;
    height: 100%;
    border: none;
    padding: 20px;
    font-family: monospace;
    font-size: 14px;
    resize: none;
}

.sidebar {
    width: 340px;
    background: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.sidebar-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fa;
    border: none;
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-tab.active {
    background: white;
    color: #1a73e8;
    border-bottom: 2px solid #1a73e8;
}

.sidebar-tab:hover {
    background: #f0f0f0;
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

.filters {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.badge {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.changes {
    flex: 1;
    overflow-y: auto;
}

.change {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.change:hover {
    background: #f8f9fa;
}

.change.active {
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
}

.change-num {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.change-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.change-badge.del {
    background: #ffe0e0;
    color: #d32f2f;
}

.change-badge.ins {
    background: #e0f2e0;
    color: #388e3c;
}

.change-text {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
}

.change-text.del {
    background: #fff5f5;
    padding: 6px;
    border-left: 3px solid #d32f2f;
}

.change-text.ins {
    background: #f1f8f4;
    padding: 6px;
    border-left: 3px solid #388e3c;
}

input[type="file"] {
    display: none;
}

.text-view {
    background: white;
    padding: 20px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.del-text {
    background: #ffebee;
    color: #c62828;
    text-decoration: line-through;
}

.ins-text {
    background: #e8f5e9;
    color: #2e7d32;
}

.textLayer {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 1;
    line-height: 1;
}

.textLayer span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.textLayer ::selection {
    background: rgba(0, 0, 255, 0.3);
}

.settings-panel {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.setting-group {
    margin-bottom: 24px;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-icon {
    width: 16px;
    height: 16px;
    color: #5f6368;
    cursor: help;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 13px;
    color: #5f6368;
    cursor: pointer;
}

.color-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    cursor: pointer;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid #ddd;
}

.reset-btn {
    background: #f8f9fa;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .upload-container {
        flex-direction: column;
        padding: 40px 20px;
    }
    
    .panel {
        max-width: 100%;
    }
    
    .compare-main-btn {
        bottom: 20px;
        padding: 14px 30px;
        font-size: 14px;
    }
}