/* Diff Checker Styles */
.diff-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.10);
    overflow: hidden;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.diff-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e7ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diff-header h3 {
    margin: 0;
    color: #2a4d8f;
    font-size: 16px;
    font-weight: 600;
}

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

.diff-controls button {
    padding: 6px 12px;
    border: 1px solid #e0e7ef;
    background: #fff;
    color: #2a4d8f;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.diff-controls button:hover {
    background: #f0f6ff;
    border-color: #4f8cff;
}

.diff-content {
    display: grid;
    grid-template-columns: 12px 1fr 12px 1fr;
    min-height: 400px;
}

.diff-side {
    border-right: 1px solid #e0e7ef;
}

.diff-side:last-child {
    border-right: none;
}

.diff-side-header {
    background: #f1f3f6;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e7ef;
    font-weight: 600;
    color: #2a4d8f;
    font-size: 13px;
}

.diff-lines {
    max-height: 500px;
    overflow-y: auto;
}

.diff-line {
    display: flex;
    padding: 2px 0;
    border-bottom: 1px solid #f8fafc;
}

.diff-line:last-child {
    border-bottom: none;
}

.diff-line-number {
    width: 60px;
    padding: 2px 8px;
    background: #f8fafc;
    color: #4f5d75;
    font-size: 12px;
    text-align: right;
    border-right: 1px solid #e0e7ef;
    user-select: none;
    flex-shrink: 0;
}

.diff-line-content {
    flex: 1;
    padding: 2px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.diff-line.unchanged {
    background: #fff;
}

.diff-line.deleted {
    background: #fff5f5;
}

.diff-line.deleted .diff-line-content {
    background: #fed7d7;
    color: #c53030;
}

.diff-line.added {
    background: #f0fff4;
}

.diff-line.added .diff-line-content {
    background: #c6f6d5;
    color: #2f855a;
}

.diff-line.empty .diff-line-number {
    background: #f8fafc;
    color: #b0b8c1;
}

.diff-line.empty .diff-line-content {
    background: #f8fafc;
    color: #b0b8c1;
}

.diff-stats {
    background: #f8fafc;
    padding: 10px 20px;
    border-top: 1px solid #e0e7ef;
    font-size: 12px;
    color: #4f5d75;
    display: flex;
    justify-content: space-between;
}

.diff-input-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.diff-input-group {
    display: flex;
    flex-direction: column;
}

.diff-input-group label {
    font-weight: 600;
    color: #2a4d8f;
    margin-bottom: 8px;
    font-size: 14px;
}

.diff-input-group textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #b0b8c1;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: #fff;
    transition: border-color 0.2s;
}

.diff-input-group textarea:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.diff-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.diff-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.diff-actions .btn-primary {
    background: linear-gradient(90deg, #2a4d8f 60%, #4f8cff 100%);
    color: #fff;
}

.diff-actions .btn-primary:hover {
    background: linear-gradient(90deg, #1a2d4f 60%, #2a4d8f 100%);
}

.diff-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.diff-actions .btn-secondary:hover {
    background: #545b62;
}

.diff-actions .btn-success {
    background: #28a745;
    color: #fff;
}

.diff-actions .btn-success:hover {
    background: #1e7e34;
}

.no-diff {
    text-align: center;
    padding: 40px;
    color: #4f5d75;
    font-size: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
}

/* Copy feedback toast */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .diff-input-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .diff-content {
        grid-template-columns: 12px 1fr;
        min-height: 300px;
    }
    
    .diff-side {
        border-right: none;
        border-bottom: 1px solid #e0e7ef;
    }
    
    .diff-side:last-child {
        border-bottom: none;
    }
    
    .diff-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .diff-actions button {
        width: 100%;
        max-width: 200px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .diff-stats {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 15px;
    }
    
    .diff-minimap:last-child {
        display: none;
    }
    
    .diff-input-group textarea {
        min-height: 150px;
        font-size: 16px;
        padding: 15px;
    }
    
    .diff-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .diff-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }
    
    .diff-header h3 {
        font-size: 14px;
    }
    
    .diff-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .diff-controls button {
        padding: 8px;
        font-size: 12px;
        flex: 1;
        min-width: 80px;
    }
    
    .diff-line-number {
        width: 40px;
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .diff-line-content {
        padding: 2px 6px;
        font-size: 13px;
    }
    
    .diff-input-group label {
        font-size: 14px;
    }
    
    .diff-input-group textarea {
        padding: 10px;
        min-height: 120px;
    }
    
    .diff-side-header {
        font-size: 12px;
        padding: 8px 10px;
    }
}

.diff-inline-change {
    background: #fff3b0;
    color: #b45309;
    font-weight: bold;
    border-radius: 3px;
    padding: 0 2px;
}

.diff-minimap {
    width: 12px;
    background: #f8fafc;
    position: relative;
    height: 100%;
    border-right: 1px solid #e0e7ef;
    z-index: 2;
}

.diff-minimap:last-child {
    border-right: none;
}

.diff-minimap-marker {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.85;
}

.diff-minimap-marker.added {
    background: #28a745;
}
.diff-minimap-marker.deleted {
    background: #dc3545;
}
.diff-minimap-marker.unchanged {
    background: #b0b8c1;
    opacity: 0.2;
}